MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Variables
mds::base::PartedData Namespace Reference

Namespace containing constants used by the CPartedData<> allocator. More...

Variables

const tSize BLOCK_SIZE = 1 << DIV_SHIFT
 Data block size in elements.
const tSize DIV_SHIFT = 24
 Divisor used to calculate an index j of a concrete data block for a specified data element i: j = i / BLOCK_SIZE = i >> DIV_SHIFT.
const tSize MOD_MASK = BLOCK_SIZE - 1
 Mask used to calculate an index k of a subscripted element i within a data block: k = i % BLOCK_SIZE = i & MOD_MASK.

Detailed Description

Namespace containing constants used by the CPartedData<> allocator.


Variable Documentation

Data block size in elements.

  • The block size must be a power of two!

Divisor used to calculate an index j of a concrete data block for a specified data element i: j = i / BLOCK_SIZE = i >> DIV_SHIFT.

Mask used to calculate an index k of a subscripted element i within a data block: k = i % BLOCK_SIZE = i & MOD_MASK.