keep fighting on compiler errors
This commit is contained in:
parent
372cd6729b
commit
165199c890
@ -56,7 +56,6 @@ public:
|
||||
}
|
||||
if( nLevels == 0 ) // 0 levels means no transform
|
||||
{
|
||||
//WaveletBase::DeviceCopy( sigIn, coeffOut, DeviceTag );
|
||||
vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut );
|
||||
return 0;
|
||||
}
|
||||
@ -163,14 +162,15 @@ public:
|
||||
|
||||
|
||||
// Multi-level 2D wavelet decomposition
|
||||
template< typename InArrayType, typename OutArrayType>
|
||||
template< typename InArrayType, typename OutArrayType, typename DeviceTag>
|
||||
VTKM_CONT_EXPORT
|
||||
vtkm::Id WaveDecompose2D( const InArrayType &sigIn, // Input
|
||||
vtkm::Id nLevels, // n levels of DWT
|
||||
vtkm::Id inX, // Input X dim
|
||||
vtkm::Id inY, // Input Y dim
|
||||
OutArrayType &coeffOut,
|
||||
std::vector<vtkm::Id> &L)
|
||||
std::vector<vtkm::Id> &L,
|
||||
DeviceTag )
|
||||
{
|
||||
vtkm::Id sigInLen = sigIn.GetNumberOfValues();
|
||||
VTKM_ASSERT( inX * inY == sigInLen );
|
||||
@ -181,7 +181,7 @@ public:
|
||||
}
|
||||
if( nLevels == 0 ) // 0 levels means no transform
|
||||
{
|
||||
WaveletBase::DeviceCopy( sigIn, coeffOut );
|
||||
vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ public:
|
||||
vtkm::Id currentLenY = inY;
|
||||
std::vector<vtkm::Id> L2d(10, 0);
|
||||
|
||||
WaveletBase::DeviceCopy( sigIn, coeffOut );
|
||||
vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( sigIn, coeffOut );
|
||||
|
||||
typedef typename OutArrayType::ValueType OutValueType;
|
||||
typedef vtkm::cont::ArrayHandle<OutValueType> OutBasicArray;
|
||||
@ -223,14 +223,15 @@ public:
|
||||
|
||||
|
||||
// Multi-level 2D wavelet reconstruction
|
||||
template< typename InArrayType, typename OutArrayType>
|
||||
template< typename InArrayType, typename OutArrayType, typename DeviceTag>
|
||||
VTKM_CONT_EXPORT
|
||||
vtkm::Id WaveReconstruct2D( const InArrayType &arrIn, // Input
|
||||
vtkm::Id nLevels, // n levels of DWT
|
||||
vtkm::Id inX, // Input X dim
|
||||
vtkm::Id inY, // Input Y dim
|
||||
OutArrayType &arrOut,
|
||||
std::vector<vtkm::Id> &L)
|
||||
std::vector<vtkm::Id> &L,
|
||||
DeviceTag )
|
||||
{
|
||||
vtkm::Id arrInLen = arrIn.GetNumberOfValues();
|
||||
VTKM_ASSERT( inX * inY == arrInLen );
|
||||
@ -240,7 +241,7 @@ public:
|
||||
throw vtkm::cont::ErrorControlBadValue("Number of levels of transform is not supported! ");
|
||||
}
|
||||
// fill the output array
|
||||
WaveletBase::DeviceCopy( arrIn, arrOut );
|
||||
vtkm::cont::DeviceAdapterAlgorithm< DeviceTag >::Copy( arrIn, arrOut );
|
||||
if( nLevels == 0 ) // 0 levels means no transform
|
||||
{
|
||||
return 0;
|
||||
|
@ -93,8 +93,10 @@ void DebugRectangleCopy()
|
||||
// make bookkeeping array
|
||||
std::vector<vtkm::Id> L;
|
||||
|
||||
vtkm::worklet::WaveletCompressor wavelet( "CDF5/3" );
|
||||
wavelet.WaveDecompose2D( inputArray, 2, sigX, sigY, outputArray, L );
|
||||
vtkm::worklet::wavelets::WaveletName wname = vtkm::worklet::wavelets::CDF5_3;
|
||||
vtkm::worklet::WaveletCompressor wavelet( wname );
|
||||
wavelet.WaveDecompose2D( inputArray, 2, sigX, sigY, outputArray, L,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_TAG() );
|
||||
|
||||
for( vtkm::Id i = 0; i < outputArray.GetNumberOfValues(); i++ )
|
||||
{
|
||||
@ -124,8 +126,10 @@ void DebugDWTIDWT2D()
|
||||
vtkm::Id nlevels = 2;
|
||||
|
||||
// Forward Transform
|
||||
vtkm::worklet::WaveletCompressor wavelet( "CDF9/7" );
|
||||
wavelet.WaveDecompose2D( inputArray, nlevels, sigX, sigY, coeffOut, L );
|
||||
vtkm::worklet::wavelets::WaveletName wname = vtkm::worklet::wavelets::CDF9_7;
|
||||
vtkm::worklet::WaveletCompressor wavelet( wname );
|
||||
wavelet.WaveDecompose2D( inputArray, nlevels, sigX, sigY, coeffOut, L,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_TAG() );
|
||||
|
||||
/*
|
||||
for( vtkm::Id i = 0; i < coeffOut.GetNumberOfValues(); i++ )
|
||||
@ -140,7 +144,8 @@ void DebugDWTIDWT2D()
|
||||
|
||||
// Inverse Transform
|
||||
vtkm::cont::ArrayHandle<vtkm::Float64> reconstructArray;
|
||||
wavelet.WaveReconstruct2D( coeffOut, nlevels, sigX, sigY, reconstructArray, L );
|
||||
wavelet.WaveReconstruct2D( coeffOut, nlevels, sigX, sigY, reconstructArray, L,
|
||||
VTKM_DEFAULT_DEVICE_ADAPTER_TAG() );
|
||||
for( vtkm::Id i = 0; i < reconstructArray.GetNumberOfValues(); i++ )
|
||||
{
|
||||
std::cout << reconstructArray.GetPortalConstControl().Get(i) << " ";
|
||||
|
Loading…
Reference in New Issue
Block a user