mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-08 11:29:02 +00:00
Merge topic 'device-free-execwholearray'
0797359c5 Make ExecutionWholeArray objects not depend on device type 0bee74438 Support DeviceAdapterId in deprecated ArrayHandle Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Nick Thompson <nathompson7@protonmail.com> Merge-request: !2405
This commit is contained in:
commit
34b6bea013
@ -226,20 +226,20 @@ public:
|
|||||||
using ExecutionSignature = void(_1, _2, _3, _4);
|
using ExecutionSignature = void(_1, _2, _3, _4);
|
||||||
using InputDomain = _1;
|
using InputDomain = _1;
|
||||||
|
|
||||||
template <typename WeightType, typename T, typename S, typename D>
|
template <typename WeightType, typename T, typename S>
|
||||||
VTKM_EXEC void operator()(const vtkm::Id2& low_high,
|
VTKM_EXEC void operator()(const vtkm::Id2& low_high,
|
||||||
const WeightType& weight,
|
const WeightType& weight,
|
||||||
const vtkm::exec::ExecutionWholeArrayConst<T, S, D>& inPortal,
|
const vtkm::exec::ExecutionWholeArrayConst<T, S>& inPortal,
|
||||||
T& result) const
|
T& result) const
|
||||||
{
|
{
|
||||||
//fetch the low / high values from inPortal
|
//fetch the low / high values from inPortal
|
||||||
result = vtkm::Lerp(inPortal.Get(low_high[0]), inPortal.Get(low_high[1]), weight);
|
result = vtkm::Lerp(inPortal.Get(low_high[0]), inPortal.Get(low_high[1]), weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename WeightType, typename T, typename S, typename D, typename U>
|
template <typename WeightType, typename T, typename S, typename U>
|
||||||
VTKM_EXEC void operator()(const vtkm::Id2&,
|
VTKM_EXEC void operator()(const vtkm::Id2&,
|
||||||
const WeightType&,
|
const WeightType&,
|
||||||
const vtkm::exec::ExecutionWholeArrayConst<T, S, D>&,
|
const vtkm::exec::ExecutionWholeArrayConst<T, S>&,
|
||||||
U&) const
|
U&) const
|
||||||
{
|
{
|
||||||
//the inPortal and result need to be the same type so this version only
|
//the inPortal and result need to be the same type so this version only
|
||||||
|
@ -56,7 +56,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayIn, ContObjectType, Devi
|
|||||||
using ValueType = typename ContObjectType::ValueType;
|
using ValueType = typename ContObjectType::ValueType;
|
||||||
using StorageTag = typename ContObjectType::StorageTag;
|
using StorageTag = typename ContObjectType::StorageTag;
|
||||||
|
|
||||||
using ExecObjectType = vtkm::exec::ExecutionWholeArrayConst<ValueType, StorageTag, Device>;
|
using ExecObjectType = vtkm::exec::ExecutionWholeArrayConst<ValueType, StorageTag>;
|
||||||
|
|
||||||
template <typename InputDomainType>
|
template <typename InputDomainType>
|
||||||
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
||||||
@ -69,7 +69,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayIn, ContObjectType, Devi
|
|||||||
// array might not have the same size depending on how the user is using
|
// array might not have the same size depending on how the user is using
|
||||||
// the array.
|
// the array.
|
||||||
|
|
||||||
return ExecObjectType(array, token);
|
return ExecObjectType(array, Device{}, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VTKM_MSVC
|
#ifdef VTKM_MSVC
|
||||||
|
@ -58,7 +58,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayInOut, ContObjectType, D
|
|||||||
using ValueType = typename ContObjectType::ValueType;
|
using ValueType = typename ContObjectType::ValueType;
|
||||||
using StorageTag = typename ContObjectType::StorageTag;
|
using StorageTag = typename ContObjectType::StorageTag;
|
||||||
|
|
||||||
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device>;
|
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag>;
|
||||||
|
|
||||||
template <typename InputDomainType>
|
template <typename InputDomainType>
|
||||||
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
||||||
@ -71,7 +71,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayInOut, ContObjectType, D
|
|||||||
// array might not have the same size depending on how the user is using
|
// array might not have the same size depending on how the user is using
|
||||||
// the array.
|
// the array.
|
||||||
|
|
||||||
return ExecObjectType(array, token);
|
return ExecObjectType(array, Device{}, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VTKM_MSVC
|
#ifdef VTKM_MSVC
|
||||||
|
@ -58,7 +58,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayOut, ContObjectType, Dev
|
|||||||
using ValueType = typename ContObjectType::ValueType;
|
using ValueType = typename ContObjectType::ValueType;
|
||||||
using StorageTag = typename ContObjectType::StorageTag;
|
using StorageTag = typename ContObjectType::StorageTag;
|
||||||
|
|
||||||
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag, Device>;
|
using ExecObjectType = vtkm::exec::ExecutionWholeArray<ValueType, StorageTag>;
|
||||||
|
|
||||||
template <typename InputDomainType>
|
template <typename InputDomainType>
|
||||||
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
VTKM_CONT ExecObjectType operator()(ContObjectType& array,
|
||||||
@ -71,7 +71,7 @@ struct Transport<vtkm::cont::arg::TransportTagWholeArrayOut, ContObjectType, Dev
|
|||||||
// array might not have the same size depending on how the user is using
|
// array might not have the same size depending on how the user is using
|
||||||
// the array.
|
// the array.
|
||||||
|
|
||||||
return ExecObjectType(array, array.GetNumberOfValues(), token);
|
return ExecObjectType(array, array.GetNumberOfValues(), Device{}, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VTKM_MSVC
|
#ifdef VTKM_MSVC
|
||||||
|
@ -43,6 +43,10 @@ private:
|
|||||||
|
|
||||||
mutable vtkm::cont::internal::Buffer BufferAsStorageWrapper;
|
mutable vtkm::cont::internal::Buffer BufferAsStorageWrapper;
|
||||||
|
|
||||||
|
struct PrepareForInputFunctor;
|
||||||
|
struct PrepareForOutputFunctor;
|
||||||
|
struct PrepareForInPlaceFunctor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using StorageType = vtkm::cont::internal::Storage<T, StorageTag_>;
|
using StorageType = vtkm::cont::internal::Storage<T, StorageTag_>;
|
||||||
using ValueType = T;
|
using ValueType = T;
|
||||||
@ -359,8 +363,8 @@ public:
|
|||||||
/// already attached. This can potentially lead to deadlocks.
|
/// already attached. This can potentially lead to deadlocks.
|
||||||
///
|
///
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
VTKM_CONT typename ExecutionTypes<DeviceAdapterTag>::PortalConst PrepareForInput(
|
VTKM_CONT ReadPortalType PrepareForInput(DeviceAdapterTag, vtkm::cont::Token& token) const;
|
||||||
DeviceAdapterTag,
|
VTKM_CONT ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device,
|
||||||
vtkm::cont::Token& token) const;
|
vtkm::cont::Token& token) const;
|
||||||
|
|
||||||
/// Prepares (allocates) this array to be used as an output from an operation
|
/// Prepares (allocates) this array to be used as an output from an operation
|
||||||
@ -378,8 +382,12 @@ public:
|
|||||||
/// already attached. This can potentially lead to deadlocks.
|
/// already attached. This can potentially lead to deadlocks.
|
||||||
///
|
///
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
VTKM_CONT typename ExecutionTypes<DeviceAdapterTag>::Portal
|
VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues,
|
||||||
PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag, vtkm::cont::Token& token);
|
DeviceAdapterTag,
|
||||||
|
vtkm::cont::Token& token);
|
||||||
|
VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues,
|
||||||
|
vtkm::cont::DeviceAdapterId device,
|
||||||
|
vtkm::cont::Token& token);
|
||||||
|
|
||||||
/// Prepares this array to be used in an in-place operation (both as input
|
/// Prepares this array to be used in an in-place operation (both as input
|
||||||
/// and output) in the execution environment. If necessary, copies data to
|
/// and output) in the execution environment. If necessary, copies data to
|
||||||
@ -395,8 +403,8 @@ public:
|
|||||||
/// already attached. This can potentially lead to deadlocks.
|
/// already attached. This can potentially lead to deadlocks.
|
||||||
///
|
///
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
VTKM_CONT typename ExecutionTypes<DeviceAdapterTag>::Portal PrepareForInPlace(
|
VTKM_CONT WritePortalType PrepareForInPlace(DeviceAdapterTag, vtkm::cont::Token& token);
|
||||||
DeviceAdapterTag,
|
VTKM_CONT WritePortalType PrepareForInPlace(vtkm::cont::DeviceAdapterId device,
|
||||||
vtkm::cont::Token& token);
|
vtkm::cont::Token& token);
|
||||||
|
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
@ -959,8 +967,8 @@ void ArrayHandleDeprecated<T, S>::Shrink(vtkm::Id numberOfValues, vtkm::cont::To
|
|||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
typename ArrayHandleDeprecated<T, S>::template ExecutionTypes<DeviceAdapterTag>::PortalConst
|
typename ArrayHandleDeprecated<T, S>::ReadPortalType ArrayHandleDeprecated<T, S>::PrepareForInput(
|
||||||
ArrayHandleDeprecated<T, S>::PrepareForInput(DeviceAdapterTag device,
|
DeviceAdapterTag device,
|
||||||
vtkm::cont::Token& token) const
|
vtkm::cont::Token& token) const
|
||||||
{
|
{
|
||||||
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag);
|
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag);
|
||||||
@ -985,10 +993,34 @@ ArrayHandleDeprecated<T, S>::PrepareForInput(DeviceAdapterTag device,
|
|||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
struct ArrayHandleDeprecated<T, S>::PrepareForInputFunctor
|
||||||
|
{
|
||||||
|
template <typename Device>
|
||||||
|
bool operator()(Device device,
|
||||||
|
const ArrayHandleDeprecated<T, S>& self,
|
||||||
|
vtkm::cont::Token& token,
|
||||||
|
ReadPortalType& portal) const
|
||||||
|
{
|
||||||
|
portal = self.PrepareForInput(device, token);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
typename ArrayHandleDeprecated<T, S>::ReadPortalType ArrayHandleDeprecated<T, S>::PrepareForInput(
|
||||||
|
vtkm::cont::DeviceAdapterId device,
|
||||||
|
vtkm::cont::Token& token) const
|
||||||
|
{
|
||||||
|
ReadPortalType portal;
|
||||||
|
vtkm::cont::TryExecuteOnDevice(device, PrepareForInputFunctor{}, *this, token, portal);
|
||||||
|
return portal;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
typename ArrayHandleDeprecated<T, S>::template ExecutionTypes<DeviceAdapterTag>::Portal
|
typename ArrayHandleDeprecated<T, S>::WritePortalType ArrayHandleDeprecated<T, S>::PrepareForOutput(
|
||||||
ArrayHandleDeprecated<T, S>::PrepareForOutput(vtkm::Id numberOfValues,
|
vtkm::Id numberOfValues,
|
||||||
DeviceAdapterTag device,
|
DeviceAdapterTag device,
|
||||||
vtkm::cont::Token& token)
|
vtkm::cont::Token& token)
|
||||||
{
|
{
|
||||||
@ -1020,9 +1052,36 @@ ArrayHandleDeprecated<T, S>::PrepareForOutput(vtkm::Id numberOfValues,
|
|||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
struct ArrayHandleDeprecated<T, S>::PrepareForOutputFunctor
|
||||||
|
{
|
||||||
|
template <typename Device>
|
||||||
|
bool operator()(Device device,
|
||||||
|
ArrayHandleDeprecated<T, S>& self,
|
||||||
|
vtkm::Id numberOfValues,
|
||||||
|
vtkm::cont::Token& token,
|
||||||
|
WritePortalType& portal) const
|
||||||
|
{
|
||||||
|
portal = self.PrepareForOutput(numberOfValues, device, token);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
typename ArrayHandleDeprecated<T, S>::WritePortalType ArrayHandleDeprecated<T, S>::PrepareForOutput(
|
||||||
|
vtkm::Id numberOfValues,
|
||||||
|
vtkm::cont::DeviceAdapterId device,
|
||||||
|
vtkm::cont::Token& token)
|
||||||
|
{
|
||||||
|
WritePortalType portal;
|
||||||
|
vtkm::cont::TryExecuteOnDevice(
|
||||||
|
device, PrepareForOutputFunctor{}, *this, numberOfValues, token, portal);
|
||||||
|
return portal;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
typename ArrayHandleDeprecated<T, S>::template ExecutionTypes<DeviceAdapterTag>::Portal
|
typename ArrayHandleDeprecated<T, S>::WritePortalType
|
||||||
ArrayHandleDeprecated<T, S>::PrepareForInPlace(DeviceAdapterTag device, vtkm::cont::Token& token)
|
ArrayHandleDeprecated<T, S>::PrepareForInPlace(DeviceAdapterTag device, vtkm::cont::Token& token)
|
||||||
{
|
{
|
||||||
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag);
|
VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag);
|
||||||
@ -1052,6 +1111,30 @@ ArrayHandleDeprecated<T, S>::PrepareForInPlace(DeviceAdapterTag device, vtkm::co
|
|||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
struct ArrayHandleDeprecated<T, S>::PrepareForInPlaceFunctor
|
||||||
|
{
|
||||||
|
template <typename Device>
|
||||||
|
bool operator()(Device device,
|
||||||
|
ArrayHandleDeprecated<T, S>& self,
|
||||||
|
vtkm::cont::Token& token,
|
||||||
|
ReadPortalType& portal) const
|
||||||
|
{
|
||||||
|
portal = self.PrepareForInPlace(device, token);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T, typename S>
|
||||||
|
typename ArrayHandleDeprecated<T, S>::WritePortalType
|
||||||
|
ArrayHandleDeprecated<T, S>::PrepareForInPlace(vtkm::cont::DeviceAdapterId device,
|
||||||
|
vtkm::cont::Token& token)
|
||||||
|
{
|
||||||
|
WritePortalType portal;
|
||||||
|
vtkm::cont::TryExecuteOnDevice(device, PrepareForInPlaceFunctor{}, *this, token, portal);
|
||||||
|
return portal;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
template <typename DeviceAdapterTag>
|
template <typename DeviceAdapterTag>
|
||||||
void ArrayHandleDeprecated<T, S>::PrepareForDevice(LockType& lock,
|
void ArrayHandleDeprecated<T, S>::PrepareForDevice(LockType& lock,
|
||||||
|
@ -13,12 +13,14 @@
|
|||||||
#include <vtkm/cont/ArrayHandle.h>
|
#include <vtkm/cont/ArrayHandle.h>
|
||||||
#include <vtkm/cont/DeviceAdapter.h>
|
#include <vtkm/cont/DeviceAdapter.h>
|
||||||
|
|
||||||
|
#include <vtkm/Deprecated.h>
|
||||||
|
|
||||||
namespace vtkm
|
namespace vtkm
|
||||||
{
|
{
|
||||||
namespace exec
|
namespace exec
|
||||||
{
|
{
|
||||||
|
|
||||||
/// The following classes have been deprecated and are meant to be used
|
/// The following classes have been sort of deprecated and are meant to be used
|
||||||
/// internally only. Please use the \c WholeArrayIn, \c WholeArrayOut, and
|
/// internally only. Please use the \c WholeArrayIn, \c WholeArrayOut, and
|
||||||
/// \c WholeArrayInOut \c ControlSignature tags instead.
|
/// \c WholeArrayInOut \c ControlSignature tags instead.
|
||||||
|
|
||||||
@ -27,8 +29,11 @@ namespace exec
|
|||||||
/// function. This can be used to allow worklets to have a shared search
|
/// function. This can be used to allow worklets to have a shared search
|
||||||
/// structure.
|
/// structure.
|
||||||
///
|
///
|
||||||
template <typename T, typename StorageTag, typename DeviceAdapterTag>
|
template <typename T, typename StorageTag, typename... MaybeDevice>
|
||||||
class ExecutionWholeArray
|
class ExecutionWholeArray;
|
||||||
|
|
||||||
|
template <typename T, typename StorageTag>
|
||||||
|
class ExecutionWholeArray<T, StorageTag>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using ValueType = T;
|
using ValueType = T;
|
||||||
@ -41,29 +46,20 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// This constructor is deprecated in VTK-m 1.6
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ExecutionWholeArray(HandleType& handle)
|
ExecutionWholeArray(HandleType& handle,
|
||||||
: Portal(handle.PrepareForInPlace(DeviceAdapterTag()))
|
vtkm::cont::DeviceAdapterId device,
|
||||||
{
|
vtkm::cont::Token& token)
|
||||||
}
|
: Portal(handle.PrepareForInPlace(device, token))
|
||||||
|
|
||||||
// This constructor is deprecated in VTK-m 1.6
|
|
||||||
VTKM_CONT
|
|
||||||
ExecutionWholeArray(HandleType& handle, vtkm::Id length)
|
|
||||||
: Portal(handle.PrepareForOutput(length, DeviceAdapterTag()))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ExecutionWholeArray(HandleType& handle, vtkm::cont::Token& token)
|
ExecutionWholeArray(HandleType& handle,
|
||||||
: Portal(handle.PrepareForInPlace(DeviceAdapterTag(), token))
|
vtkm::Id length,
|
||||||
{
|
vtkm::cont::DeviceAdapterId device,
|
||||||
}
|
vtkm::cont::Token& token)
|
||||||
|
: Portal(handle.PrepareForOutput(length, device, token))
|
||||||
VTKM_CONT
|
|
||||||
ExecutionWholeArray(HandleType& handle, vtkm::Id length, vtkm::cont::Token& token)
|
|
||||||
: Portal(handle.PrepareForOutput(length, DeviceAdapterTag(), token))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,13 +82,50 @@ private:
|
|||||||
PortalType Portal;
|
PortalType Portal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T, typename StorageTag, typename Device>
|
||||||
|
class VTKM_DEPRECATED(1.6, "ExecutionWholeArray no longer uses Device template parameter.")
|
||||||
|
ExecutionWholeArray<T, StorageTag, Device> : public ExecutionWholeArray<T, StorageTag>
|
||||||
|
{
|
||||||
|
using Superclass = ExecutionWholeArray<T, StorageTag>;
|
||||||
|
using HandleType = typename Superclass::HandleType;
|
||||||
|
|
||||||
|
public:
|
||||||
|
using Superclass::Superclass;
|
||||||
|
|
||||||
|
VTKM_CONT ExecutionWholeArray(HandleType& handle)
|
||||||
|
: Superclass(handle, Device{}, vtkm::cont::Token{})
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VTKM_CONT
|
||||||
|
ExecutionWholeArray(HandleType& handle, vtkm::Id length)
|
||||||
|
: Superclass(handle, length, Device{}, vtkm::cont::Token{})
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VTKM_CONT
|
||||||
|
ExecutionWholeArray(HandleType& handle, vtkm::cont::Token& token)
|
||||||
|
: Superclass(handle, Device{}, token)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VTKM_CONT
|
||||||
|
ExecutionWholeArray(HandleType& handle, vtkm::Id length, vtkm::cont::Token& token)
|
||||||
|
: Superclass(handle, length, Device{}, token)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/// \c ExecutionWholeArrayConst is an execution object that allows an array handle
|
/// \c ExecutionWholeArrayConst is an execution object that allows an array handle
|
||||||
/// content to be a parameter in an execution environment
|
/// content to be a parameter in an execution environment
|
||||||
/// function. This can be used to allow worklets to have a shared search
|
/// function. This can be used to allow worklets to have a shared search
|
||||||
/// structure
|
/// structure
|
||||||
///
|
///
|
||||||
template <typename T, typename StorageTag, typename DeviceAdapterTag>
|
template <typename T, typename StorageTag, typename... MaybeDevice>
|
||||||
class ExecutionWholeArrayConst
|
class ExecutionWholeArrayConst;
|
||||||
|
|
||||||
|
template <typename T, typename StorageTag>
|
||||||
|
class ExecutionWholeArrayConst<T, StorageTag>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using ValueType = T;
|
using ValueType = T;
|
||||||
@ -105,16 +138,11 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// This constructor is deprecated in VTK-m 1.6
|
|
||||||
VTKM_CONT
|
VTKM_CONT
|
||||||
ExecutionWholeArrayConst(const HandleType& handle)
|
ExecutionWholeArrayConst(const HandleType& handle,
|
||||||
: Portal(handle.PrepareForInput(DeviceAdapterTag()))
|
vtkm::cont::DeviceAdapterId device,
|
||||||
{
|
vtkm::cont::Token& token)
|
||||||
}
|
: Portal(handle.PrepareForInput(device, token))
|
||||||
|
|
||||||
VTKM_CONT
|
|
||||||
ExecutionWholeArrayConst(const HandleType& handle, vtkm::cont::Token& token)
|
|
||||||
: Portal(handle.PrepareForInput(DeviceAdapterTag(), token))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +161,30 @@ public:
|
|||||||
private:
|
private:
|
||||||
PortalType Portal;
|
PortalType Portal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <typename T, typename StorageTag, typename Device>
|
||||||
|
class VTKM_DEPRECATED(1.6, "ExecutionWholeArray no longer uses Device template parameter.")
|
||||||
|
ExecutionWholeArrayConst<T, StorageTag, Device> : public ExecutionWholeArrayConst<T, StorageTag>
|
||||||
|
{
|
||||||
|
using Superclass = ExecutionWholeArrayConst<T, StorageTag>;
|
||||||
|
using HandleType = typename Superclass::HandleType;
|
||||||
|
|
||||||
|
public:
|
||||||
|
using Superclass::Superclass;
|
||||||
|
|
||||||
|
VTKM_CONT ExecutionWholeArrayConst(HandleType& handle)
|
||||||
|
: Superclass(handle, Device{}, vtkm::cont::Token{})
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VTKM_CONT
|
||||||
|
ExecutionWholeArrayConst(HandleType& handle, vtkm::cont::Token& token)
|
||||||
|
: Superclass(handle, Device{}, token)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} // namespace vtkm::exec
|
} // namespace vtkm::exec
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user