Go to the documentation of this file.
10 #ifndef vtk_m_worklet_zfp_block_writer_h
11 #define vtk_m_worklet_zfp_block_writer_h
22 using Word = vtkm::UInt64;
24 template <
int block_size,
typename AtomicPortalType>
58 const int wbits =
sizeof(
Word) * 8;
62 unsigned int seg_end = seg_start + n_bits - 1;
64 unsigned int shift = seg_start;
70 Word left = (bits >> n_bits) << n_bits;
73 Word add = b << shift;
74 Add(write_index, add);
77 bool straddle = seg_start <
sizeof(
Word) * 8 && seg_end >=
sizeof(
Word) * 8;
80 Word rem = b >> (
sizeof(
Word) * 8 - shift);
81 Add(write_index + 1, rem);
84 return bits >> (
Word)n_bits;
90 const int wbits =
sizeof(
Word) * 8;
94 unsigned int shift = seg_start;
102 Add(write_index, add);
112 #endif // vtk_m_worklet_zfp_block_writer_h
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
AtomicPortalType & Portal
Definition: ZFPBlockWriter.h:36
const int m_maxbits
Definition: ZFPBlockWriter.h:35
vtkm::Int32 m_current_bit
Definition: ZFPBlockWriter.h:34
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
VTKM_EXEC BlockWriter(AtomicPortalType &portal, const int &maxbits, const vtkm::Id &block_idx)
Definition: ZFPBlockWriter.h:38
vtkm::Int64 intpart
Definition: ZFPBlockWriter.h:29
vtkm::Int32 m_start_bit
Definition: ZFPBlockWriter.h:33
vtkm::UInt64 Word
Definition: ZFPBlockReader.h:22
VTKM_EXEC vtkm::UInt64 write_bits(const vtkm::UInt64 &bits, const unsigned int &n_bits)
Definition: ZFPBlockWriter.h:56
vtkm::UInt32 VTKM_EXEC write_bit(const unsigned int &bit)
Definition: ZFPBlockWriter.h:88
vtkm::UInt64 uintpart
Definition: ZFPBlockWriter.h:28
Definition: ZFPBlockWriter.h:27
uint32_t UInt32
Definition: Types.h:161
Definition: ZFPBlockWriter.h:25
int32_t Int32
Definition: Types.h:160
vtkm::Id m_word_index
Definition: ZFPBlockWriter.h:32
VTKM_EXEC void Add(const vtkm::Id index, Word &value)
Definition: ZFPBlockWriter.h:47