Go to the documentation of this file.
10 #ifndef vtk_m_worklet_zfp_decode2_h
11 #define vtk_m_worklet_zfp_decode2_h
30 template <
typename Scalar,
typename PortalType>
39 for (y = 0; y < ny; y++, offset += dims[0] - nx, q += 4 - nx)
41 for (x = 0; x < nx; x++, offset++, q++)
43 scalars.Set(offset, *q);
48 template <
typename Scalar,
typename PortalType>
54 for (
vtkm::Id y = 0; y < 4; y++, offset += dims[0] - 4)
56 for (
vtkm::Id x = 0; x < 4; x++, ++offset)
58 scalars.Set(offset, *q++);
81 template <
typename InputScalarPortal,
typename BitstreamPortal>
83 InputScalarPortal& scalars,
84 BitstreamPortal& stream)
const
86 using Scalar =
typename InputScalarPortal::ValueType;
88 Scalar fblock[BlockSize];
92 fblock[i] =
static_cast<Scalar
>(0);
96 zfp::zfp_decode<BlockSize>(
100 zfpBlock[0] = blockIdx %
ZFPDims[0];
104 vtkm::Id offset = logicalStart[0] + logicalStart[1] *
Dims[0];
105 bool partial =
false;
106 if (logicalStart[0] + 4 >
Dims[0])
108 if (logicalStart[1] + 4 >
Dims[1])
VTKM_EXEC void Scatter2(const Scalar *q, PortalType &scalars, const vtkm::Id2 dims, vtkm::Id offset)
Definition: ZFPDecode2.h:49
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
Definition: ZFPDecode2.h:63
void(FieldIn, WholeArrayOut, WholeArrayIn bitstream) ControlSignature
Definition: ZFPDecode2.h:79
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::Id2 PaddedDims
Definition: ZFPDecode2.h:67
Decode2(const vtkm::Id2 dims, const vtkm::Id2 paddedDims, const vtkm::UInt32 maxbits)
Definition: ZFPDecode2.h:71
vtkm::Id2 Dims
Definition: ZFPDecode2.h:66
A control signature tag for input fields.
Definition: WorkletMapField.h:49
VTKM_EXEC void ScatterPartial2(const Scalar *q, PortalType &scalars, const vtkm::Id2 dims, vtkm::Id offset, vtkm::Int32 nx, vtkm::Int32 ny)
Definition: ZFPDecode2.h:31
vtkm::UInt32 MaxBits
Definition: ZFPDecode2.h:69
uint32_t UInt32
Definition: Types.h:161
int32_t Int32
Definition: Types.h:160
vtkm::Id2 ZFPDims
Definition: ZFPDecode2.h:68
VTKM_EXEC void operator()(const vtkm::Id blockIdx, InputScalarPortal &scalars, BitstreamPortal &stream) const
Definition: ZFPDecode2.h:82
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38