Go to the documentation of this file.
10 #ifndef vtk_m_worklet_zfp_decode3_h
11 #define vtk_m_worklet_zfp_decode3_h
30 template <
typename Scalar,
typename PortalType>
40 for (z = 0; z < nz; z++, offset += dims[0] * dims[1] - ny * dims[0], q += 4 * (4 - ny))
42 for (y = 0; y < ny; y++, offset += dims[0] - nx, q += 4 - nx)
44 for (x = 0; x < nx; x++, offset++, q++)
46 scalars.Set(offset, *q);
52 template <
typename Scalar,
typename PortalType>
58 for (
vtkm::Id z = 0; z < 4; z++, offset += dims[0] * dims[1] - 4 * dims[0])
60 for (
vtkm::Id y = 0; y < 4; y++, offset += dims[0] - 4)
62 for (
vtkm::Id x = 0; x < 4; x++, ++offset)
64 scalars.Set(offset, *q++);
89 template <
typename InputScalarPortal,
typename BitstreamPortal>
91 InputScalarPortal& scalars,
92 BitstreamPortal& stream)
const
94 using Scalar =
typename InputScalarPortal::ValueType;
96 Scalar fblock[BlockSize];
100 fblock[i] =
static_cast<Scalar
>(0);
104 zfp::zfp_decode<BlockSize>(
108 zfpBlock[0] = blockIdx %
ZFPDims[0];
114 vtkm::Id offset = (logicalStart[2] *
Dims[1] + logicalStart[1]) *
Dims[0] + logicalStart[0];
115 bool partial =
false;
116 if (logicalStart[0] + 4 >
Dims[0])
118 if (logicalStart[1] + 4 >
Dims[1])
120 if (logicalStart[2] + 4 >
Dims[2])
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
Decode3(const vtkm::Id3 dims, const vtkm::Id3 paddedDims, const vtkm::UInt32 maxbits)
Definition: ZFPDecode3.h:78
vtkm::Id3 ZFPDims
Definition: ZFPDecode3.h:75
VTKM_EXEC void Scatter3(const Scalar *q, PortalType &scalars, const vtkm::Id3 dims, vtkm::Id offset)
Definition: ZFPDecode3.h:53
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::UInt32 MaxBits
Definition: ZFPDecode3.h:76
void(FieldIn, WholeArrayOut, WholeArrayIn bitstream) ControlSignature
Definition: ZFPDecode3.h:87
A control signature tag for input fields.
Definition: WorkletMapField.h:49
Definition: ZFPDecode3.h:70
uint32_t UInt32
Definition: Types.h:161
vtkm::Id3 Dims
Definition: ZFPDecode3.h:73
int32_t Int32
Definition: Types.h:160
VTKM_EXEC void operator()(const vtkm::Id blockIdx, InputScalarPortal &scalars, BitstreamPortal &stream) const
Definition: ZFPDecode3.h:90
VTKM_EXEC void ScatterPartial3(const Scalar *q, PortalType &scalars, const vtkm::Id3 dims, vtkm::Id offset, vtkm::Int32 nx, vtkm::Int32 ny, vtkm::Int32 nz)
Definition: ZFPDecode3.h:31
vtkm::Id3 PaddedDims
Definition: ZFPDecode3.h:74
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38