Go to the documentation of this file.
10 #ifndef vtk_m_worklet_zfp_encode2_h
11 #define vtk_m_worklet_zfp_encode2_h
32 template <
typename Scalar,
typename PortalType>
34 const PortalType& scalars,
42 for (y = 0; y < ny; y++, offset += sy - nx * sx)
44 for (x = 0; x < nx; x++, offset += 1)
45 q[4 * y + x] = scalars.Get(offset);
48 for (x = 0; x < 4; x++)
52 template <
typename Scalar,
typename PortalType>
54 const PortalType& scalars,
61 for (
vtkm::Id y = 0; y < 4; y++, offset += sy - 4 * sx)
62 for (
vtkm::Id x = 0; x < 4; x++, offset += sx)
64 fblock[counter] = scalars.Get(offset);
88 template <
class InputScalarPortal,
typename BitstreamPortal>
90 const InputScalarPortal& scalars,
91 BitstreamPortal& stream)
const
93 using Scalar =
typename InputScalarPortal::ValueType;
96 zfpBlock[0] = blockIdx %
ZFPDims[0];
99 vtkm::Id offset = logicalStart[1] *
Dims[0] + logicalStart[0];
102 Scalar fblock[BlockSize];
104 bool partial =
false;
105 if (logicalStart[0] + 4 >
Dims[0])
107 if (logicalStart[1] + 4 >
Dims[1])
Definition: ZFPEncode.h:314
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::Id2 Dims
Definition: ZFPEncode2.h:72
VTKM_EXEC void operator()(const vtkm::Id blockIdx, const InputScalarPortal &scalars, BitstreamPortal &stream) const
Definition: ZFPEncode2.h:89
void(FieldIn, WholeArrayIn, AtomicArrayInOut bitstream) ControlSignature
Definition: ZFPEncode2.h:86
vtkm::Id2 PaddedDims
Definition: ZFPEncode2.h:73
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
A control signature tag for input fields.
Definition: WorkletMapField.h:49
VTKM_EXEC void PadBlock(Scalar *p, vtkm::UInt32 n, vtkm::UInt32 s)
Definition: ZFPEncode.h:27
Definition: ZFPEncode2.h:69
uint32_t UInt32
Definition: Types.h:161
int32_t Int32
Definition: Types.h:160
VTKM_EXEC void Gather2(Scalar *fblock, const PortalType &scalars, vtkm::Id offset, int sx, int sy)
Definition: ZFPEncode2.h:53
VTKM_EXEC void GatherPartial2(Scalar *q, const PortalType &scalars, vtkm::Id offset, vtkm::Int32 nx, vtkm::Int32 ny, vtkm::Int32 sx, vtkm::Int32 sy)
Definition: ZFPEncode2.h:33
vtkm::Id2 ZFPDims
Definition: ZFPEncode2.h:74
vtkm::UInt32 MaxBits
Definition: ZFPEncode2.h:75
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
Encode2(const vtkm::Id2 dims, const vtkm::Id2 paddedDims, const vtkm::UInt32 maxbits)
Definition: ZFPEncode2.h:78