Commit f5ce79e4 authored by Robert Maynard's avatar Robert Maynard

zfp worklets now can handle array handles with non default storage

parent 35b73908
......@@ -78,7 +78,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPDecompressor1D::DoExecute(
}
}
vtkm::cont::ArrayHandle<vtkm::Float64, StorageType> decompress;
vtkm::cont::ArrayHandle<vtkm::Float64> decompress;
decompressor.Decompress(field, decompress, rate, field.GetNumberOfValues());
vtkm::cont::DataSet dataset;
......
......@@ -83,7 +83,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPDecompressor2D::DoExecute(
input.GetCellSet(0).CopyTo(cellSet);
vtkm::Id2 pointDimensions = cellSet.GetPointDimensions();
vtkm::cont::ArrayHandle<vtkm::Float64, StorageType> decompress;
vtkm::cont::ArrayHandle<vtkm::Float64> decompress;
decompressor.Decompress(field, decompress, rate, pointDimensions);
vtkm::cont::DataSet dataset;
......
......@@ -82,7 +82,7 @@ inline VTKM_CONT vtkm::cont::DataSet ZFPDecompressor3D::DoExecute(
input.GetCellSet(0).CopyTo(cellSet);
vtkm::Id3 pointDimensions = cellSet.GetPointDimensions();
vtkm::cont::ArrayHandle<vtkm::Float64, StorageType> decompress;
vtkm::cont::ArrayHandle<vtkm::Float64> decompress;
decompressor.Decompress(field, decompress, rate, pointDimensions);
vtkm::cont::DataSet dataset;
......
......@@ -45,10 +45,11 @@ namespace worklet
class ZFP1DCompressor
{
public:
template <typename Scalar>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(const vtkm::cont::ArrayHandle<Scalar>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id dims)
template <typename Scalar, typename Storage>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(
const vtkm::cont::ArrayHandle<Scalar, Storage>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id dims)
{
DataDump(data, "uncompressed");
zfp::ZFPStream stream;
......
......@@ -51,9 +51,9 @@ namespace detail
class ZFP1DDecompressor
{
public:
template <typename Scalar>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64>& encodedData,
vtkm::cont::ArrayHandle<Scalar>& output,
template <typename Scalar, typename StorageIn, typename StorageOut>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64, StorageIn>& encodedData,
vtkm::cont::ArrayHandle<Scalar, StorageOut>& output,
const vtkm::Float64 requestedRate,
vtkm::Id dims)
{
......
......@@ -45,10 +45,11 @@ namespace worklet
class ZFP2DCompressor
{
public:
template <typename Scalar>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(const vtkm::cont::ArrayHandle<Scalar>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id2 dims)
template <typename Scalar, typename Storage>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(
const vtkm::cont::ArrayHandle<Scalar, Storage>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id2 dims)
{
DataDump(data, "uncompressed");
zfp::ZFPStream stream;
......
......@@ -51,9 +51,9 @@ namespace detail
class ZFP2DDecompressor
{
public:
template <typename Scalar>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64>& encodedData,
vtkm::cont::ArrayHandle<Scalar>& output,
template <typename Scalar, typename StorageIn, typename StorageOut>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64, StorageIn>& encodedData,
vtkm::cont::ArrayHandle<Scalar, StorageOut>& output,
const vtkm::Float64 requestedRate,
vtkm::Id2 dims)
{
......
......@@ -44,10 +44,11 @@ namespace worklet
class ZFPCompressor
{
public:
template <typename Scalar>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(const vtkm::cont::ArrayHandle<Scalar>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id3 dims)
template <typename Scalar, typename Storage>
vtkm::cont::ArrayHandle<vtkm::Int64> Compress(
const vtkm::cont::ArrayHandle<Scalar, Storage>& data,
const vtkm::Float64 requestedRate,
const vtkm::Id3 dims)
{
DataDump(data, "uncompressed");
zfp::ZFPStream stream;
......
......@@ -81,9 +81,9 @@ namespace detail
class ZFPDecompressor
{
public:
template <typename Scalar>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64>& encodedData,
vtkm::cont::ArrayHandle<Scalar>& output,
template <typename Scalar, typename StorageIn, typename StorageOut>
void Decompress(const vtkm::cont::ArrayHandle<vtkm::Int64, StorageIn>& encodedData,
vtkm::cont::ArrayHandle<Scalar, StorageOut>& output,
const vtkm::Float64 requestedRate,
vtkm::Id3 dims)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment