mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Make sure all custom storage containers are exported.
This commit is contained in:
parent
fc398d36a1
commit
a6bd3a22e0
@ -35,7 +35,7 @@ template<typename ValueType_,
|
||||
typename PortalTypeFirst_,
|
||||
typename PortalTypeSecond_,
|
||||
typename PortalTypeThird_>
|
||||
class ArrayPortalCartesianProduct
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCartesianProduct
|
||||
{
|
||||
public:
|
||||
typedef ValueType_ ValueType;
|
||||
|
@ -30,7 +30,7 @@ namespace cont {
|
||||
namespace internal {
|
||||
|
||||
template<typename FromType, typename ToType>
|
||||
struct Cast
|
||||
struct VTKM_ALWAYS_EXPORT Cast
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
ToType operator()(const FromType &val) const
|
||||
|
@ -39,7 +39,7 @@ namespace internal {
|
||||
namespace detail {
|
||||
|
||||
template<typename ValueType>
|
||||
struct CompositeVectorSwizzleFunctor
|
||||
struct VTKM_ALWAYS_EXPORT CompositeVectorSwizzleFunctor
|
||||
{
|
||||
static const vtkm::IdComponent NUM_COMPONENTS =
|
||||
vtkm::VecTraits<ValueType>::NUM_COMPONENTS;
|
||||
@ -92,7 +92,7 @@ struct CompositeVectorSwizzleFunctor
|
||||
};
|
||||
|
||||
template<typename ReturnValueType>
|
||||
struct CompositeVectorPullValueFunctor
|
||||
struct VTKM_ALWAYS_EXPORT CompositeVectorPullValueFunctor
|
||||
{
|
||||
vtkm::Id Index;
|
||||
|
||||
@ -170,7 +170,7 @@ struct CheckArraySizeFunctor {
|
||||
/// This is the portal used within ArrayHandleCompositeVector.
|
||||
///
|
||||
template<typename SignatureWithPortals>
|
||||
class ArrayPortalCompositeVector
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCompositeVector
|
||||
{
|
||||
typedef vtkm::internal::FunctionInterface<SignatureWithPortals> PortalTypes;
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace cont {
|
||||
namespace internal {
|
||||
|
||||
template< typename PortalType1, typename PortalType2 >
|
||||
class ArrayPortalConcatenate
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalConcatenate
|
||||
{
|
||||
public:
|
||||
typedef typename PortalType1::ValueType ValueType;
|
||||
@ -38,7 +38,7 @@ public:
|
||||
ArrayPortalConcatenate() : portal1(), portal2() {}
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ArrayPortalConcatenate( const PortalType1 &p1, const PortalType2 &p2 )
|
||||
ArrayPortalConcatenate( const PortalType1 &p1, const PortalType2 &p2 )
|
||||
: portal1( p1 ), portal2( p2 ) {}
|
||||
|
||||
// Copy constructor
|
||||
@ -53,7 +53,7 @@ public:
|
||||
return this->portal1.GetNumberOfValues() +
|
||||
this->portal2.GetNumberOfValues() ;
|
||||
}
|
||||
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
ValueType Get( vtkm::Id index) const
|
||||
{
|
||||
@ -112,11 +112,11 @@ public:
|
||||
|
||||
VTKM_CONT
|
||||
Storage() : valid( false ) { }
|
||||
|
||||
|
||||
VTKM_CONT
|
||||
Storage( const ArrayHandleType1 &a1, const ArrayHandleType2 &a2 )
|
||||
Storage( const ArrayHandleType1 &a1, const ArrayHandleType2 &a2 )
|
||||
: array1( a1 ), array2( a2 ), valid( true ) {};
|
||||
|
||||
|
||||
VTKM_CONT
|
||||
PortalConstType GetPortalConst() const
|
||||
{
|
||||
@ -176,7 +176,7 @@ public:
|
||||
}
|
||||
|
||||
VTKM_CONT
|
||||
const ArrayHandleType2 &GetArray2() const
|
||||
const ArrayHandleType2 &GetArray2() const
|
||||
{
|
||||
VTKM_ASSERT( this->valid );
|
||||
return this->array2;
|
||||
@ -184,7 +184,7 @@ public:
|
||||
|
||||
private:
|
||||
ArrayHandleType1 array1;
|
||||
ArrayHandleType2 array2;
|
||||
ArrayHandleType2 array2;
|
||||
bool valid;
|
||||
}; // class Storage
|
||||
|
||||
@ -196,7 +196,7 @@ class ArrayTransfer< typename ArrayHandleType1::ValueType,
|
||||
{
|
||||
public:
|
||||
typedef typename ArrayHandleType1::ValueType ValueType;
|
||||
|
||||
|
||||
private:
|
||||
typedef StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2 > StorageTag;
|
||||
typedef vtkm::cont::internal::Storage< ValueType, StorageTag> StorageType;
|
||||
@ -205,17 +205,17 @@ public:
|
||||
typedef typename StorageType::PortalType PortalControl;
|
||||
typedef typename StorageType::PortalConstType PortalConstControl;
|
||||
|
||||
typedef ArrayPortalConcatenate<
|
||||
typedef ArrayPortalConcatenate<
|
||||
typename ArrayHandleType1::template ExecutionTypes< Device >::Portal,
|
||||
typename ArrayHandleType2::template ExecutionTypes< Device >::Portal >
|
||||
typename ArrayHandleType2::template ExecutionTypes< Device >::Portal >
|
||||
PortalExecution;
|
||||
typedef ArrayPortalConcatenate<
|
||||
typedef ArrayPortalConcatenate<
|
||||
typename ArrayHandleType1::template ExecutionTypes< Device >::PortalConst,
|
||||
typename ArrayHandleType2::template ExecutionTypes< Device >::PortalConst >
|
||||
typename ArrayHandleType2::template ExecutionTypes< Device >::PortalConst >
|
||||
PortalConstExecution;
|
||||
|
||||
VTKM_CONT
|
||||
ArrayTransfer( StorageType* storage )
|
||||
ArrayTransfer( StorageType* storage )
|
||||
: array1( storage->GetArray1() ), array2( storage->GetArray2() ) {}
|
||||
|
||||
VTKM_CONT
|
||||
@ -268,7 +268,7 @@ public:
|
||||
{
|
||||
this->array1.ReleaseResourcesExecution();
|
||||
this->array2.ReleaseResourcesExecution();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
ArrayHandleType1 array1;
|
||||
@ -286,14 +286,14 @@ namespace vtkm {
|
||||
namespace cont {
|
||||
|
||||
template< typename ArrayHandleType1, typename ArrayHandleType2 >
|
||||
class ArrayHandleConcatenate
|
||||
class ArrayHandleConcatenate
|
||||
: public vtkm::cont::ArrayHandle< typename ArrayHandleType1::ValueType,
|
||||
StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2> >
|
||||
{
|
||||
public:
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS( ArrayHandleConcatenate,
|
||||
VTKM_ARRAY_HANDLE_SUBCLASS( ArrayHandleConcatenate,
|
||||
( ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2> ),
|
||||
( vtkm::cont::ArrayHandle< typename ArrayHandleType1::ValueType,
|
||||
( vtkm::cont::ArrayHandle< typename ArrayHandleType1::ValueType,
|
||||
StorageTagConcatenate< ArrayHandleType1, ArrayHandleType2 > > ));
|
||||
|
||||
protected:
|
||||
@ -302,21 +302,21 @@ protected:
|
||||
public:
|
||||
|
||||
VTKM_CONT
|
||||
ArrayHandleConcatenate( const ArrayHandleType1 &array1,
|
||||
ArrayHandleConcatenate( const ArrayHandleType1 &array1,
|
||||
const ArrayHandleType2 &array2 )
|
||||
: Superclass( StorageType( array1, array2 ) )
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template< typename ArrayHandleType1, typename ArrayHandleType2 >
|
||||
VTKM_CONT
|
||||
ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 >
|
||||
make_ArrayHandleConcatenate( const ArrayHandleType1 &array1,
|
||||
make_ArrayHandleConcatenate( const ArrayHandleType1 &array1,
|
||||
const ArrayHandleType2 &array2 )
|
||||
{
|
||||
return ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 >( array1, array2 );
|
||||
return ArrayHandleConcatenate< ArrayHandleType1, ArrayHandleType2 >( array1, array2 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ namespace cont {
|
||||
namespace detail {
|
||||
|
||||
template<typename ValueType>
|
||||
struct ConstantFunctor
|
||||
struct VTKM_ALWAYS_EXPORT ConstantFunctor
|
||||
{
|
||||
VTKM_EXEC_CONT
|
||||
ConstantFunctor(const ValueType &value = ValueType()) : Value(value) { }
|
||||
|
@ -32,7 +32,7 @@ namespace internal {
|
||||
|
||||
/// \brief An implicit array portal that returns an counting value.
|
||||
template <class CountingValueType>
|
||||
class ArrayPortalCounting
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalCounting
|
||||
{
|
||||
typedef typename vtkm::VecTraits<CountingValueType>::ComponentType
|
||||
ComponentType;
|
||||
|
@ -30,7 +30,7 @@ namespace exec {
|
||||
namespace internal {
|
||||
|
||||
template<typename _SourcePortalType, vtkm::IdComponent _NUM_COMPONENTS>
|
||||
class ArrayPortalGroupVec
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalGroupVec
|
||||
{
|
||||
public:
|
||||
static const vtkm::IdComponent NUM_COMPONENTS = _NUM_COMPONENTS;
|
||||
|
@ -38,7 +38,7 @@ namespace exec {
|
||||
namespace internal {
|
||||
|
||||
template<typename SourcePortalType, typename OffsetsPortalType>
|
||||
class ArrayPortalGroupVecVariable
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalGroupVecVariable
|
||||
{
|
||||
public:
|
||||
using ComponentType =
|
||||
|
@ -40,7 +40,7 @@ namespace detail {
|
||||
/// \c StorageImplicit container.
|
||||
///
|
||||
template <class ValueType_, class FunctorType_ >
|
||||
class ArrayPortalImplicit
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalImplicit
|
||||
{
|
||||
public:
|
||||
typedef ValueType_ ValueType;
|
||||
|
@ -29,7 +29,7 @@ namespace cont {
|
||||
|
||||
namespace detail {
|
||||
|
||||
struct IndexFunctor {
|
||||
struct VTKM_ALWAYS_EXPORT IndexFunctor {
|
||||
VTKM_EXEC_CONT
|
||||
vtkm::Id operator()(vtkm::Id index) const { return index; }
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ namespace exec {
|
||||
namespace internal {
|
||||
|
||||
template<typename IndexPortalType, typename ValuePortalType>
|
||||
class ArrayPortalPermutation
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalPermutation
|
||||
{
|
||||
public:
|
||||
typedef typename ValuePortalType::ValueType ValueType;
|
||||
|
@ -28,7 +28,7 @@ namespace cont {
|
||||
namespace internal {
|
||||
|
||||
template<typename P>
|
||||
class ArrayPortalStreaming
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalStreaming
|
||||
{
|
||||
public:
|
||||
typedef P PortalType;
|
||||
|
@ -47,10 +47,10 @@ typedef vtkm::cont::internal::NullFunctorType NullFunctorType;
|
||||
///
|
||||
template<typename ValueType_, typename PortalType_, typename FunctorType_,
|
||||
typename InverseFunctorType_=NullFunctorType>
|
||||
class ArrayPortalTransform;
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalTransform;
|
||||
|
||||
template<typename ValueType_, typename PortalType_, typename FunctorType_>
|
||||
class ArrayPortalTransform<ValueType_,PortalType_,FunctorType_,NullFunctorType>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalTransform<ValueType_,PortalType_,FunctorType_,NullFunctorType>
|
||||
{
|
||||
public:
|
||||
typedef PortalType_ PortalType;
|
||||
@ -103,7 +103,7 @@ protected:
|
||||
|
||||
template<typename ValueType_, typename PortalType_,
|
||||
typename FunctorType_, typename InverseFunctorType_>
|
||||
class ArrayPortalTransform : public ArrayPortalTransform<ValueType_,PortalType_,FunctorType_,NullFunctorType>
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalTransform : public ArrayPortalTransform<ValueType_,PortalType_,FunctorType_,NullFunctorType>
|
||||
{
|
||||
public:
|
||||
typedef ArrayPortalTransform<ValueType_,PortalType_,FunctorType_,NullFunctorType> Superclass;
|
||||
|
@ -139,10 +139,6 @@ DynamicArrayHandleTryCast(
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Failed to cast to: " << typeid(vtkm::cont::detail::PolymorphicArrayHandleContainer<Type,Storage>).name() << std::endl;
|
||||
std::cout << "The current rtti info is: " << typeid(*arrayContainer).name() << std::endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@ -519,7 +515,7 @@ void DynamicArrayHandleBase<TypeList,StorageList>::
|
||||
if (!tryType.FoundCast)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
"Could not find appropriate cast for array in CastAndCall.");
|
||||
"Could not find appropriate cast for array in CastAndCall1.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -543,7 +539,7 @@ void DynamicArrayHandleBase<VTKM_DEFAULT_TYPE_LIST_TAG,
|
||||
if (!tryType.FoundCast)
|
||||
{
|
||||
throw vtkm::cont::ErrorControlBadValue(
|
||||
"Could not find appropriate cast for array in CastAndCall.");
|
||||
"Could not find appropriate cast for array in CastAndCall2.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace internal {
|
||||
|
||||
/// \brief An implicit array port that computes point coordinates for a uniform grid.
|
||||
///
|
||||
class ArrayPortalUniformPointCoordinates
|
||||
class VTKM_ALWAYS_EXPORT ArrayPortalUniformPointCoordinates
|
||||
{
|
||||
public:
|
||||
typedef vtkm::Vec<vtkm::FloatDefault,3> ValueType;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <vtkm/rendering/testing/RenderTest.h>
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
void RenderTests()
|
||||
{
|
||||
typedef vtkm::rendering::MapperRayTracer M;
|
||||
@ -38,15 +38,15 @@ void RenderTests()
|
||||
|
||||
vtkm::cont::testing::MakeTestDataSet maker;
|
||||
vtkm::rendering::ColorTable colorTable("thermal");
|
||||
|
||||
|
||||
vtkm::rendering::testing::Render<M,C,V3>(maker.Make3DRegularDataSet0(),
|
||||
"pointvar", colorTable, "reg3D.pnm");
|
||||
vtkm::rendering::testing::Render<M,C,V3>(maker.Make3DRectilinearDataSet0(),
|
||||
"pointvar", colorTable, "rect3D.pnm");
|
||||
vtkm::rendering::testing::Render<M,C,V3>(maker.Make3DExplicitDataSet4(),
|
||||
"pointvar", colorTable, "expl3D.pnm");
|
||||
// vtkm::rendering::testing::Render<M,C,V3>(maker.Make3DRectilinearDataSet0(),
|
||||
// "pointvar", colorTable, "rect3D.pnm");
|
||||
// vtkm::rendering::testing::Render<M,C,V3>(maker.Make3DExplicitDataSet4(),
|
||||
// "pointvar", colorTable, "expl3D.pnm");
|
||||
}
|
||||
|
||||
|
||||
} //namespace
|
||||
|
||||
int UnitTestMapperRayTracer(int, char *[])
|
||||
|
Loading…
Reference in New Issue
Block a user