Go to the documentation of this file.
10 #ifndef vtk_m_worklet_zfp_block_reader_h
11 #define vtk_m_worklet_zfp_block_reader_h
24 template <vtkm::Int32 block_size,
typename WordsPortalType>
38 BlockReader(
const WordsPortalType& words,
const int& maxbits,
const int& block_idx)
41 ,
MaxIndex(words.GetNumberOfValues() - 1)
76 vtkm::Int32 first_read = vtkm::Min(rem_bits, n_bits);
78 Word mask = ((
Word)1 << ((first_read))) - 1;
83 if (n_bits >= rem_bits)
90 next_read = n_bits - first_read;
96 mask = ((
Word)1 << ((next_read))) - 1;
97 bits += (
m_buffer & mask) << first_read;
111 #endif // vtk_m_worklet_zfp_block_reader_h
Definition: ZFPBlockReader.h:25
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_EXEC unsigned int read_bit()
Definition: ZFPBlockReader.h:51
int m_block_idx
Definition: ZFPBlockReader.h:29
Word m_buffer
Definition: ZFPBlockReader.h:34
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
const WordsPortalType & Words
Definition: ZFPBlockReader.h:27
vtkm::Int32 m_current_bit
Definition: ZFPBlockReader.h:31
VTKM_EXEC vtkm::UInt64 read_bits(const int &n_bits)
Definition: ZFPBlockReader.h:70
VTKM_EXEC BlockReader()
Definition: ZFPBlockReader.h:104
vtkm::UInt64 Word
Definition: ZFPBlockReader.h:22
VTKM_EXEC BlockReader(const WordsPortalType &words, const int &maxbits, const int &block_idx)
Definition: ZFPBlockReader.h:38
uint32_t UInt32
Definition: Types.h:161
int32_t Int32
Definition: Types.h:160
const vtkm::Int32 m_maxbits
Definition: ZFPBlockReader.h:28
vtkm::Id Index
Definition: ZFPBlockReader.h:32
const vtkm::Id MaxIndex
Definition: ZFPBlockReader.h:35