update working
This commit is contained in:
@@ -220,10 +220,11 @@ std::vector<SomaSolution> solve(uint64 *reprs_in, uint32 reprs_in_count, int dim
|
||||
Space space = empty_voxel_space;
|
||||
space.space = reprs_in[0];
|
||||
cullEmptySpace(&space);
|
||||
positions = getAllPositionsInPrism(arena, &space, dims);
|
||||
positions = getAllPositionsInPrism(permsArena, &space, dims);
|
||||
uint64 *insertion = PushArray(arena, uint64, positions.length);
|
||||
polycubes.length += positions.length;
|
||||
polycubes.head += positions.head;
|
||||
memcpy(polycubes.data, positions.data, positions.length / sizeof(uint64));
|
||||
memcpy(insertion, positions.data, positions.length * sizeof(uint64));
|
||||
};
|
||||
|
||||
for (size_t i = 1; i < reprs_in_count; i++) {
|
||||
@@ -232,9 +233,10 @@ std::vector<SomaSolution> solve(uint64 *reprs_in, uint32 reprs_in_count, int dim
|
||||
space.space = reprs_in[i];
|
||||
cullEmptySpace(&space);
|
||||
list<uint64> perms = getAllPermutationsInPrism(permsArena, &space, dims);
|
||||
polycubes.length += positions.length;
|
||||
polycubes.head += positions.head;
|
||||
memcpy(polycubes.data + polycubes.length, perms.data, perms.length / sizeof(uint64));
|
||||
uint64 *insertion = PushArray(arena, uint64, perms.length);
|
||||
polycubes.length += perms.length;
|
||||
polycubes.head += perms.head;
|
||||
memcpy(insertion, perms.data, perms.length * sizeof(uint64));
|
||||
}
|
||||
|
||||
appendList(&offsets, polycubes.length);
|
||||
|
||||
Reference in New Issue
Block a user