41 static constexpr Int16 MAX_BLOCK_SIZE = 512;
45 BlockIndex(
const Int32* ptr, Int32 value_offset, Int16 size)
47 , m_value_offset(value_offset)
56 ARCANE_CHECK_AT(i, m_size);
57 return m_block_start[i] + m_value_offset;
61 Int16
size()
const {
return m_size; }
68 const Int32* m_block_start =
nullptr;
69 Int32 m_value_offset = 0;
88 Int32 nbBlock()
const {
return m_nb_block; }
89 Real memoryRatio()
const;
93 Int32 index = m_blocks_index_and_offset[i * 2];
94 Int32 offset = m_blocks_index_and_offset[(i * 2) + 1];
95 Int16 size = ((i + 1) != m_nb_block) ? m_block_size : m_last_block_size;
96 return BlockIndex(m_indexes.span().ptrAt(index), offset, size);
107 Int32 m_original_size = 0;
109 Int32 m_nb_block = 0;
111 Int16 m_block_size = 0;
113 Int16 m_last_block_size = 0;
117 void _setBlockIndexAndOffset(Int32 block, Int32 index, Int32 offset);
118 void _setNbBlock(Int32 nb_block);
119 Int32 _currentIndexPosition()
const;
120 void _addBlockInfo(
const Int32* data, Int16 size);
121 Int32 _computeNbContigusBlock()
const;