[WIP] fmsolvr: provided packed representation of a BoxID; enabled tasks to take input data of any type #26

Member
No description provided.
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 obtained
The 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.
The interface of the BoxID4D was restricted
to provide only efficient basis operations.

The packing and unpacking has to be done explicitly,
and therefore nobody will invoke them accidentally.

By default BoxIDs use packed representation.
i.kabadshow merged commit a7b32f6acc into WIP/parallelization/intra-node/lgpl21+minimize 2023-09-11 23:14:37 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ATML-CAP/fmsolvr#26
No description provided.