[WIP] fmsolvr: provided packed representation of a BoxID; enabled tasks to take input data of any type #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "m.zych/fmsolvr:WIP/parallelization/intra-node/lgpl21+minimize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The BoxID type should not be polymorphic, because its two possible representations: 1. packed: { sfcinfex, depth } 2. unpacked: { i, j, k, depth } have their strengths and weaknesses, and therefore a C++ code should declare on which representation it operates on. The PackedBoxID has smaller size and sfcindex is a linear coordinate, thus the packed representation is ideal for: - sending BoxIDs across functions or threads - using it as a cursor when indexing an octree - iterating through all the boxes at a given depth The UnpackedBoxID has larger size and (i,j,k) triplet is a 3D coordinate, thus the unpacked representation should be chosen when: - the BoxID of an ancestor or a descendant is needed - the position in 3D-space of the box itself must be obtainedThe value of depth_max should result from the width of sfcindex: <------------------- jsc::width_of<uint> -------------------> +-------------+-----------------------------------------------+ | | space-filling curve index | +-------------+---------------+---------------+---------------+ | | k | j | i | +-------------+---------------+---------------+---------------+ <--- depth ---> <--- depth ---> <--- depth ---> The (i,j,k) triplet consists of three depth-bit wide unsigned integers, therefore depth_max = jsc::width_of<uint> / 3.