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
ErrorExecution.h
ErrorInternal.h
ExecutionObjectFactoryBase.h
ExecutionObjectBase.h
Field.h
FieldRangeCompute.h
FieldRangeGlobalCompute.h

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

@ -17,23 +17,23 @@
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_ExecutionObjectFactoryBase_h
#define vtk_m_cont_ExecutionObjectFactoryBase_h
#ifndef vtk_m_cont_ExecutionObjectBase_h
#define vtk_m_cont_ExecutionObjectBase_h
#include <vtkm/Types.h>
namespace vtkm
{
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
/// function. Any method you want to use on the execution side must have the
/// VTKM_EXEC modifier.
/// \tparam Device
class ExecutionObjectFactoryBase
class ExecutionObjectBase
{
};
}
} // 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/ExecutionObjectFactoryBase.h>
#include <vtkm/cont/ExecutionObjectBase.h>
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
// 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(
(std::is_base_of<vtkm::cont::ExecutionObjectFactoryBase, ContObjectType>::value),
"All execution objects are expected to inherit from vtkm::exec::ExecutionObjectFactoryBase");
(std::is_base_of<vtkm::cont::ExecutionObjectBase, ContObjectType>::value),
"All execution objects are expected to inherit from vtkm::cont::ExecutionObjectBase");
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForExecution(Device()));
template <typename InputDomainType>

@ -24,7 +24,7 @@
#include <vtkm/cont/arg/TypeCheck.h>
#include <vtkm/cont/ExecutionObjectFactoryBase.h>
#include <vtkm/cont/ExecutionObjectBase.h>
#include <type_traits>
@ -36,7 +36,7 @@ namespace arg
{
/// 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.
///
struct TypeCheckTagExecObject
@ -46,8 +46,7 @@ struct TypeCheckTagExecObject
template <typename Type>
struct TypeCheck<TypeCheckTagExecObject, Type>
{
static constexpr bool value =
std::is_base_of<vtkm::cont::ExecutionObjectFactoryBase, Type>::value;
static constexpr bool value = std::is_base_of<vtkm::cont::ExecutionObjectBase, Type>::value;
};
}
}

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

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

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

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

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

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

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

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

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

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

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

@ -56,7 +56,7 @@ struct ExecutionObject
vtkm::Id Value;
};
struct TestExecObjectType : vtkm::cont::ExecutionObjectFactoryBase
struct TestExecObjectType : vtkm::cont::ExecutionObjectBase
{
template <typename Functor, typename... Args>
void CastAndCall(Functor f, Args&&... args) const
@ -74,7 +74,7 @@ struct TestExecObjectType : vtkm::cont::ExecutionObjectFactoryBase
};
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>
void CastAndCall(Functor f, Args&&... args) const
{

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

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