Replace ExecutionObjectFactoryBase with ExecutionObjectBase

While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
This commit is contained in:
Kenneth Moreland 2018-05-10 17:53:39 -06:00
parent e79e6a3403
commit 0753131a04
20 changed files with 42 additions and 45 deletions

@ -78,7 +78,7 @@ set(headers
ErrorFilterExecution.h ErrorFilterExecution.h
ErrorExecution.h ErrorExecution.h
ErrorInternal.h ErrorInternal.h
ExecutionObjectFactoryBase.h ExecutionObjectBase.h
Field.h Field.h
FieldRangeCompute.h FieldRangeCompute.h
FieldRangeGlobalCompute.h FieldRangeGlobalCompute.h

@ -610,7 +610,7 @@ public:
ArrayPortalConst<vtkm::Id> CellIds; ArrayPortalConst<vtkm::Id> CellIds;
}; };
struct TwoLevelUniformGridExecutionObjectFactory : public vtkm::cont::ExecutionObjectFactoryBase struct TwoLevelUniformGridExecutionObjectFactory : public vtkm::cont::ExecutionObjectBase
{ {
template <typename DeviceAdapter> template <typename DeviceAdapter>
VTKM_CONT TwoLevelUniformGridExecution<DeviceAdapter> PrepareForExecution( VTKM_CONT TwoLevelUniformGridExecution<DeviceAdapter> PrepareForExecution(

@ -17,23 +17,23 @@
// Laboratory (LANL), the U.S. Government retains certain rights in // Laboratory (LANL), the U.S. Government retains certain rights in
// this software. // this software.
//============================================================================ //============================================================================
#ifndef vtk_m_cont_ExecutionObjectFactoryBase_h #ifndef vtk_m_cont_ExecutionObjectBase_h
#define vtk_m_cont_ExecutionObjectFactoryBase_h #define vtk_m_cont_ExecutionObjectBase_h
#include <vtkm/Types.h> #include <vtkm/Types.h>
namespace vtkm namespace vtkm
{ {
namespace cont namespace cont
{ {
/// Base \c ExecutionObjectFactoryBase for execution objects to inherit from so that /// Base \c ExecutionObjectBase for execution objects to inherit from so that
/// you can use an arbitrary object as a parameter in an execution environment /// you can use an arbitrary object as a parameter in an execution environment
/// function. Any method you want to use on the execution side must have the /// function. Any method you want to use on the execution side must have the
/// VTKM_EXEC modifier. /// VTKM_EXEC modifier.
/// \tparam Device /// \tparam Device
class ExecutionObjectFactoryBase class ExecutionObjectBase
{ {
}; };
} }
} // namespace vtkm::cont } // namespace vtkm::cont
#endif //vtk_m_cont_ExecutionObjectFactoryBase_h #endif //vtk_m_cont_ExecutionObjectBase_h

@ -24,7 +24,7 @@
#include <vtkm/cont/arg/Transport.h> #include <vtkm/cont/arg/Transport.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
namespace vtkm namespace vtkm
@ -48,10 +48,10 @@ struct Transport<vtkm::cont::arg::TransportTagExecObject, ContObjectType, Device
{ {
// If you get a compile error here, it means you tried to use an object that is not an execution // If you get a compile error here, it means you tried to use an object that is not an execution
// object as an argument that is expected to be one. All execution objects are expected to // object as an argument that is expected to be one. All execution objects are expected to
// inherit from vtkm::exec::ExecutionObjectFactoryBase. // inherit from vtkm::cont::ExecutionObjectBase.
VTKM_STATIC_ASSERT_MSG( VTKM_STATIC_ASSERT_MSG(
(std::is_base_of<vtkm::cont::ExecutionObjectFactoryBase, ContObjectType>::value), (std::is_base_of<vtkm::cont::ExecutionObjectBase, ContObjectType>::value),
"All execution objects are expected to inherit from vtkm::exec::ExecutionObjectFactoryBase"); "All execution objects are expected to inherit from vtkm::cont::ExecutionObjectBase");
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForExecution(Device())); using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForExecution(Device()));
template <typename InputDomainType> template <typename InputDomainType>

@ -24,7 +24,7 @@
#include <vtkm/cont/arg/TypeCheck.h> #include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <type_traits> #include <type_traits>
@ -36,7 +36,7 @@ namespace arg
{ {
/// The ExecObject type check passes for any object that inherits from \c /// The ExecObject type check passes for any object that inherits from \c
/// ExecutionObjectFactoryBase. This is supposed to signify that the object can be /// ExecutionObjectBase. This is supposed to signify that the object can be
/// used in the execution environment although there is no way to verify that. /// used in the execution environment although there is no way to verify that.
/// ///
struct TypeCheckTagExecObject struct TypeCheckTagExecObject
@ -46,8 +46,7 @@ struct TypeCheckTagExecObject
template <typename Type> template <typename Type>
struct TypeCheck<TypeCheckTagExecObject, Type> struct TypeCheck<TypeCheckTagExecObject, Type>
{ {
static constexpr bool value = static constexpr bool value = std::is_base_of<vtkm::cont::ExecutionObjectBase, Type>::value;
std::is_base_of<vtkm::cont::ExecutionObjectFactoryBase, Type>::value;
}; };
} }
} }

@ -24,7 +24,7 @@
#include <vtkm/cont/serial/DeviceAdapterSerial.h> #include <vtkm/cont/serial/DeviceAdapterSerial.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/cont/testing/Testing.h> #include <vtkm/cont/testing/Testing.h>
@ -39,7 +39,7 @@ struct ExecutionObject
vtkm::Int32 Number; vtkm::Int32 Number;
}; };
struct TestExecutionObject : public vtkm::cont::ExecutionObjectFactoryBase struct TestExecutionObject : public vtkm::cont::ExecutionObjectBase
{ {
vtkm::Int32 Number; vtkm::Int32 Number;

@ -27,7 +27,7 @@
namespace namespace
{ {
struct TestExecutionObject : vtkm::cont::ExecutionObjectFactoryBase struct TestExecutionObject : vtkm::cont::ExecutionObjectBase
{ {
}; };
struct TestNotExecutionObject struct TestNotExecutionObject

@ -23,7 +23,7 @@
#include <vtkm/ListTag.h> #include <vtkm/ListTag.h>
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/DeviceAdapter.h> #include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
namespace vtkm namespace vtkm
{ {
@ -51,7 +51,7 @@ struct AtomicArrayTypeListTag : vtkm::ListTagBase<vtkm::Int32, vtkm::Int64>
/// ///
/// ///
template <typename T, typename DeviceAdapterTag> template <typename T, typename DeviceAdapterTag>
class AtomicArray : public vtkm::cont::ExecutionObjectFactoryBase class AtomicArray : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
using ValueType = T; using ValueType = T;

@ -22,7 +22,7 @@
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/DeviceAdapter.h> #include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
namespace vtkm namespace vtkm
{ {
@ -39,7 +39,7 @@ namespace exec
/// structure. /// structure.
/// ///
template <typename T, typename StorageTag, typename DeviceAdapterTag> template <typename T, typename StorageTag, typename DeviceAdapterTag>
class ExecutionWholeArray : public vtkm::cont::ExecutionObjectFactoryBase class ExecutionWholeArray : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
using ValueType = T; using ValueType = T;
@ -89,7 +89,7 @@ private:
/// structure /// structure
/// ///
template <typename T, typename StorageTag, typename DeviceAdapterTag> template <typename T, typename StorageTag, typename DeviceAdapterTag>
class ExecutionWholeArrayConst : public vtkm::cont::ExecutionObjectFactoryBase class ExecutionWholeArrayConst : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
using ValueType = T; using ValueType = T;
@ -126,4 +126,4 @@ private:
} }
} // namespace vtkm::exec } // namespace vtkm::exec
#endif //vtk_m_exec_ExecutionObjectFactoryBase_h #endif //vtk_m_exec_ExecutionObjectBase_h

@ -23,8 +23,6 @@
#include <vtkm/exec/arg/AspectTagDefault.h> #include <vtkm/exec/arg/AspectTagDefault.h>
#include <vtkm/exec/arg/Fetch.h> #include <vtkm/exec/arg/Fetch.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h>
#include <type_traits> #include <type_traits>
namespace vtkm namespace vtkm

@ -22,7 +22,7 @@
#include <vtkm/exec/arg/testing/ThreadIndicesTesting.h> #include <vtkm/exec/arg/testing/ThreadIndicesTesting.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/testing/Testing.h> #include <vtkm/testing/Testing.h>
@ -31,7 +31,7 @@
namespace namespace
{ {
struct TestExecutionObject : public vtkm::cont::ExecutionObjectFactoryBase struct TestExecutionObject : public vtkm::cont::ExecutionObjectBase
{ {
TestExecutionObject() TestExecutionObject()
: Number(static_cast<vtkm::Int32>(0xDEADDEAD)) : Number(static_cast<vtkm::Int32>(0xDEADDEAD))

@ -20,7 +20,7 @@
#ifndef vtk_m_exec_internal_ReduceByKeyLookup_h #ifndef vtk_m_exec_internal_ReduceByKeyLookup_h
#define vtk_m_exec_internal_ReduceByKeyLookup_h #define vtk_m_exec_internal_ReduceByKeyLookup_h
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/StaticAssert.h> #include <vtkm/StaticAssert.h>
#include <vtkm/Types.h> #include <vtkm/Types.h>
@ -41,7 +41,7 @@ namespace internal
/// state. /// state.
/// ///
template <typename KeyPortalType, typename IdPortalType, typename IdComponentPortalType> template <typename KeyPortalType, typename IdPortalType, typename IdComponentPortalType>
struct ReduceByKeyLookup : vtkm::cont::ExecutionObjectFactoryBase struct ReduceByKeyLookup : vtkm::cont::ExecutionObjectBase
{ {
using KeyType = typename KeyPortalType::ValueType; using KeyType = typename KeyPortalType::ValueType;

@ -25,7 +25,7 @@
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/DeviceAdapter.h> #include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h> #include <vtkm/cont/DeviceAdapterAlgorithm.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
namespace vtkm namespace vtkm
{ {
@ -211,7 +211,7 @@ public:
TextureWrapMode WrapMode; TextureWrapMode WrapMode;
}; };
class Texture2DSampler : public vtkm::cont::ExecutionObjectFactoryBase class Texture2DSampler : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -149,7 +149,7 @@ private:
IdPortal IndexOffsets; IdPortal IndexOffsets;
}; };
class ExecutionConnectivityExplicit : vtkm::cont::ExecutionObjectFactoryBase class ExecutionConnectivityExplicit : vtkm::cont::ExecutionObjectBase
{ {
public: public:
VTKM_CONT VTKM_CONT

@ -120,7 +120,7 @@ private:
} //namespace gradient } //namespace gradient
template <typename T> template <typename T>
struct GradientOutputFields : public vtkm::cont::ExecutionObjectFactoryBase struct GradientOutputFields : public vtkm::cont::ExecutionObjectBase
{ {
using ValueType = T; using ValueType = T;

@ -26,7 +26,7 @@
#include <vtkm/cont/arg/TransportTagArrayOut.h> #include <vtkm/cont/arg/TransportTagArrayOut.h>
#include <vtkm/cont/arg/TransportTagExecObject.h> #include <vtkm/cont/arg/TransportTagExecObject.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/exec/arg/FetchTagArrayDirectOut.h> #include <vtkm/exec/arg/FetchTagArrayDirectOut.h>
#include <vtkm/worklet/gradient/Divergence.h> #include <vtkm/worklet/gradient/Divergence.h>
@ -39,7 +39,7 @@ namespace exec
{ {
template <typename T, typename DeviceAdapter> template <typename T, typename DeviceAdapter>
struct GradientScalarOutput : public vtkm::cont::ExecutionObjectFactoryBase struct GradientScalarOutput : public vtkm::cont::ExecutionObjectBase
{ {
using ValueType = vtkm::Vec<T, 3>; using ValueType = vtkm::Vec<T, 3>;
using BaseTType = typename vtkm::BaseComponent<T>::Type; using BaseTType = typename vtkm::BaseComponent<T>::Type;
@ -77,7 +77,7 @@ struct GradientScalarOutput : public vtkm::cont::ExecutionObjectFactoryBase
}; };
template <typename T, typename DeviceAdapter> template <typename T, typename DeviceAdapter>
struct GradientVecOutput : public vtkm::cont::ExecutionObjectFactoryBase struct GradientVecOutput : public vtkm::cont::ExecutionObjectBase
{ {
using ValueType = vtkm::Vec<T, 3>; using ValueType = vtkm::Vec<T, 3>;
using BaseTType = typename vtkm::BaseComponent<T>::Type; using BaseTType = typename vtkm::BaseComponent<T>::Type;

@ -23,7 +23,7 @@
#include <vtkm/CellShape.h> #include <vtkm/CellShape.h>
#include <vtkm/Types.h> #include <vtkm/Types.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/cont/ArrayHandle.h> #include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/StorageBasic.h> #include <vtkm/cont/StorageBasic.h>
@ -147,7 +147,7 @@ private:
PortalType Indices; PortalType Indices;
}; };
class TriangulateTablesExecutionObjectFactory : public vtkm::cont::ExecutionObjectFactoryBase class TriangulateTablesExecutionObjectFactory : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
template <typename Device> template <typename Device>
@ -344,7 +344,7 @@ private:
PortalType Indices; PortalType Indices;
}; };
class TetrahedralizeTablesExecutionObjectFactory : public vtkm::cont::ExecutionObjectFactoryBase class TetrahedralizeTablesExecutionObjectFactory : public vtkm::cont::ExecutionObjectBase
{ {
public: public:
template <typename Device> template <typename Device>

@ -56,7 +56,7 @@ struct ExecutionObject
vtkm::Id Value; vtkm::Id Value;
}; };
struct TestExecObjectType : vtkm::cont::ExecutionObjectFactoryBase struct TestExecObjectType : vtkm::cont::ExecutionObjectBase
{ {
template <typename Functor, typename... Args> template <typename Functor, typename... Args>
void CastAndCall(Functor f, Args&&... args) const void CastAndCall(Functor f, Args&&... args) const
@ -74,7 +74,7 @@ struct TestExecObjectType : vtkm::cont::ExecutionObjectFactoryBase
}; };
struct TestExecObjectTypeBad struct TestExecObjectTypeBad
{ //this will fail as it doesn't inherit from vtkm::cont::ExecutionObjectFactoryBase { //this will fail as it doesn't inherit from vtkm::cont::ExecutionObjectBase
template <typename Functor, typename... Args> template <typename Functor, typename... Args>
void CastAndCall(Functor f, Args&&... args) const void CastAndCall(Functor f, Args&&... args) const
{ {

@ -26,7 +26,7 @@
#include <vtkm/cont/ArrayHandleCast.h> #include <vtkm/cont/ArrayHandleCast.h>
#include <vtkm/cont/ArrayHandleCounting.h> #include <vtkm/cont/ArrayHandleCounting.h>
#include <vtkm/cont/CellSetExplicit.h> #include <vtkm/cont/CellSetExplicit.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
#include <vtkm/worklet/DispatcherMapField.h> #include <vtkm/worklet/DispatcherMapField.h>
#include <vtkm/worklet/particleadvection/Particles.h> #include <vtkm/worklet/particleadvection/Particles.h>

@ -25,7 +25,7 @@ class ParticleExecutionObjectType;
#include <vtkm/Types.h> #include <vtkm/Types.h>
#include <vtkm/cont/DeviceAdapter.h> #include <vtkm/cont/DeviceAdapter.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h> #include <vtkm/cont/ExecutionObjectBase.h>
namespace vtkm namespace vtkm
{ {
@ -205,7 +205,7 @@ protected:
}; };
template <typename T> template <typename T>
class Particles : public vtkm::cont::ExecutionObjectFactoryBase class Particles : public vtkm::cont::ExecutionObjectBase
{ {
private: private:
using ItemType = T; using ItemType = T;