Commit d0eb528a authored by Robert Maynard's avatar Robert Maynard

Merge branch 'reduce_amount_of_weak_vtables' into 'master'

Reduce amount of weak vtables

See merge request !612
parents 28b86692 2dc23cf1
......@@ -110,7 +110,7 @@ macro(vtkm_configure_component_Base)
vtkm_finish_configure_component(Base
DEPENDENT_VARIABLES VTKm_base_vtkm_target_FOUND
ADD_LIBRARIES vtkm
ADD_LIBRARIES vtkm vtkm_cont
)
endmacro()
......
//=============================================================================
//
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//
// Copyright 2016 Sandia Corporation.
// Copyright 2016 UT-Battelle, LLC.
// Copyright 2016 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//
//=============================================================================
#ifndef @EXPORT_MACRO_NAME@_EXPORT_H
#define @EXPORT_MACRO_NAME@_EXPORT_H
#if defined(_MSC_VER)
# if @EXPORT_IS_BUILT_STATIC@
/* This is a static component and has no need for exports
elf based static libraries are able to have hidden/default visibility
controls on symbols so we should propagate this information in that
use case
*/
# define @EXPORT_MACRO_NAME@_EXPORT_DEFINE
# define @EXPORT_MACRO_NAME@_IMPORT_DEFINE
# define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
# else
# define @EXPORT_MACRO_NAME@_EXPORT_DEFINE __declspec(dllexport)
# define @EXPORT_MACRO_NAME@_IMPORT_DEFINE __declspec(dllimport)
# define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
# endif
#else
# define @EXPORT_MACRO_NAME@_EXPORT_DEFINE __attribute__((visibility("default")))
# define @EXPORT_MACRO_NAME@_IMPORT_DEFINE __attribute__((visibility("default")))
# define @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE __attribute__((visibility("hidden")))
#endif
#ifndef @EXPORT_MACRO_NAME@_EXPORT
# if defined(@EXPORT_IMPORT_CONDITION@)
/* We are building this library */
# define @EXPORT_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@_EXPORT_DEFINE
# else
/* We are using this library */
# define @EXPORT_MACRO_NAME@_EXPORT @EXPORT_MACRO_NAME@_IMPORT_DEFINE
# endif
#endif
#ifndef @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT
# if defined(@EXPORT_IMPORT_CONDITION@) && defined(_MSC_VER)
/* Warning C4910 on windows state that extern explicit template can't be
labeled with __declspec(dllexport). So that is why we use a new custom
define. But when other modules ( e.g. rendering ) include this header
we need them to see that the extern template is actually being imported.
*/
/* We are building this library with MSVC */
# define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT
# elif defined(@EXPORT_IMPORT_CONDITION@)
/* We are building this library */
# define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT @EXPORT_MACRO_NAME@_EXPORT_DEFINE
# else
/* We are using this library */
# define @EXPORT_MACRO_NAME@_TEMPLATE_EXPORT @EXPORT_MACRO_NAME@_IMPORT_DEFINE
# endif
#endif
#ifndef @EXPORT_MACRO_NAME@_NO_EXPORT
#define @EXPORT_MACRO_NAME@_NO_EXPORT @EXPORT_MACRO_NAME@_NO_EXPORT_DEFINE
#endif
#endif
......@@ -19,7 +19,6 @@
##============================================================================
include(CMakeParseArguments)
include(GenerateExportHeader)
# Utility to build a kit name from the current directory.
function(vtkm_get_kit_name kitvar)
......@@ -631,7 +630,13 @@ function(vtkm_library)
set_property(TARGET ${lib_name} APPEND PROPERTY
INCLUDE_DIRECTORIES ${VTKm_INCLUDE_DIRS} )
target_link_libraries(${lib_name} ${VTKm_LIBRARIES})
set(lib_subset)
foreach(lib ${VTKm_LIBRARIES})
if(NOT lib STREQUAL lib_name)
list(APPEND lib_subset ${lib})
endif()
endforeach()
target_link_libraries(${lib_name} ${lib_subset})
set(cxx_args ${VTKm_COMPILE_OPTIONS})
separate_arguments(cxx_args)
......@@ -657,15 +662,34 @@ function(vtkm_library)
)
endif(VTKm_EXTRA_COMPILER_WARNINGS)
generate_export_header(${lib_name})
#Now generate a header that holds the macros needed to easily export
#template classes. This
string(TOUPPER ${lib_name} BASE_NAME_UPPER)
set(EXPORT_MACRO_NAME "${BASE_NAME_UPPER}")
#generate_export_header creates the header in CMAKE_CURRENT_BINARY_DIR.
#The build expects it in the install directory.
file(COPY
${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_export.h
DESTINATION
${CMAKE_BINARY_DIR}/${VTKm_INSTALL_INCLUDE_DIR}/${dir_prefix}
)
set(EXPORT_IS_BUILT_STATIC 0)
get_target_property(is_static ${lib_name} TYPE)
if(${is_static} STREQUAL "STATIC_LIBRARY")
#If we are building statically set the define symbol
set(EXPORT_IS_BUILT_STATIC 1)
endif()
unset(is_static)
get_target_property(EXPORT_IMPORT_CONDITION ${lib_name} DEFINE_SYMBOL)
if(NOT EXPORT_IMPORT_CONDITION)
#set EXPORT_IMPORT_CONDITION to what the DEFINE_SYMBOL would be when
#building shared
set(EXPORT_IMPORT_CONDITION ${lib_name}_EXPORTS)
endif()
configure_file(
${VTKm_SOURCE_DIR}/CMake/VTKmExportHeaderTemplate.h.in
${CMAKE_BINARY_DIR}/${VTKm_INSTALL_INCLUDE_DIR}/${dir_prefix}/${lib_name}_export.h
@ONLY)
unset(EXPORT_MACRO_NAME)
unset(EXPORT_IS_BUILT_STATIC)
unset(EXPORT_IMPORT_CONDITION)
install(TARGETS ${lib_name}
EXPORT ${VTKm_EXPORT_NAME}
......
......@@ -297,6 +297,7 @@ install(
${VTKm_SOURCE_DIR}/CMake/VTKmConfigureComponents.cmake
${VTKm_SOURCE_DIR}/CMake/VTKmCompilerOptimizations.cmake
${VTKm_SOURCE_DIR}/CMake/VTKmDetectCUDAVersion.cu
${VTKm_SOURCE_DIR}/CMake/VTKmExportHeaderTemplate.h.in
DESTINATION ${VTKm_INSTALL_CMAKE_MODULE_DIR}
)
......
......@@ -348,13 +348,13 @@ struct Negate
// Pre declaration
template <typename T, vtkm::IdComponent Size>
class Vec;
class VTKM_ALWAYS_EXPORT Vec;
template<typename T>
class VecC;
class VTKM_ALWAYS_EXPORTVecC;
template<typename T>
class VecCConst;
class VTKM_ALWAYS_EXPORT VecCConst;
namespace detail {
......@@ -377,7 +377,7 @@ namespace detail {
#endif // gcc || clang
#endif // use cuda < 8
template <typename T, typename DerivedClass>
class VecBaseCommon
class VTKM_ALWAYS_EXPORT VecBaseCommon
{
public:
typedef T ComponentType;
......@@ -653,7 +653,7 @@ public:
/// Base implementation of all Vec classes.
///
template <typename T, vtkm::IdComponent Size, typename DerivedClass>
class VecBase : public vtkm::detail::VecBaseCommon<T, DerivedClass>
class VTKM_ALWAYS_EXPORT VecBase : public vtkm::detail::VecBaseCommon<T, DerivedClass>
{
public:
typedef T ComponentType;
......@@ -798,7 +798,7 @@ protected:
/// Base of all VecC and VecCConst classes.
///
template <typename T, typename DerivedClass>
class VecCBase : public vtkm::detail::VecBaseCommon<T, DerivedClass>
class VTKM_ALWAYS_EXPORT VecCBase : public vtkm::detail::VecBaseCommon<T, DerivedClass>
{
protected:
VTKM_EXEC_CONT
......@@ -827,7 +827,7 @@ protected:
/// designed for small sequences (seldom more than 10).
///
template<typename T, vtkm::IdComponent Size>
class Vec : public detail::VecBase<T, Size, Vec<T,Size> >
class VTKM_ALWAYS_EXPORT Vec : public detail::VecBase<T, Size, Vec<T,Size> >
{
typedef detail::VecBase<T, Size, Vec<T,Size> > Superclass;
public:
......@@ -852,7 +852,7 @@ public:
// zero length array which troubles compilers. Vecs of size 0 are a bit
// pointless but might occur in some generic functions or classes.
template<typename T>
class Vec<T, 0>
class VTKM_ALWAYS_EXPORT Vec<T, 0>
{
public:
typedef T ComponentType;
......@@ -892,7 +892,7 @@ public:
// Vectors of size 1 should implicitly convert between the scalar and the
// vector. Otherwise, it should behave the same.
template<typename T>
class Vec<T,1> : public detail::VecBase<T, 1, Vec<T,1> >
class VTKM_ALWAYS_EXPORT Vec<T,1> : public detail::VecBase<T, 1, Vec<T,1> >
{
typedef detail::VecBase<T, 1, Vec<T,1> > Superclass;
......@@ -916,7 +916,7 @@ public:
// Specializations for common tuple sizes (with special names).
template<typename T>
class Vec<T,2> : public detail::VecBase<T, 2, Vec<T,2> >
class VTKM_ALWAYS_EXPORT Vec<T,2> : public detail::VecBase<T, 2, Vec<T,2> >
{
typedef detail::VecBase<T, 2, Vec<T,2> > Superclass;
......@@ -940,7 +940,7 @@ typedef vtkm::Vec<vtkm::Id,2> Id2;
template<typename T>
class Vec<T,3> : public detail::VecBase<T, 3, Vec<T,3> >
class VTKM_ALWAYS_EXPORT Vec<T,3> : public detail::VecBase<T, 3, Vec<T,3> >
{
typedef detail::VecBase<T, 3, Vec<T,3> > Superclass;
public:
......@@ -965,7 +965,7 @@ typedef vtkm::Vec<vtkm::Id,3> Id3;
template<typename T>
class Vec<T,4> : public detail::VecBase<T, 4, Vec<T,4> >
class VTKM_ALWAYS_EXPORT Vec<T,4> : public detail::VecBase<T, 4, Vec<T,4> >
{
typedef detail::VecBase<T, 4, Vec<T,4> > Superclass;
public:
......@@ -1046,7 +1046,7 @@ vtkm::Vec<T,4> make_Vec(const T &x, const T &y, const T &z, const T &w)
/// <tt>VecCConst<vtkm::Id></tt>).
///
template<typename T>
class VecC : public detail::VecCBase<T, VecC<T> >
class VTKM_ALWAYS_EXPORT VecC : public detail::VecCBase<T, VecC<T> >
{
using Superclass = detail::VecCBase<T, VecC<T> >;
......@@ -1135,7 +1135,7 @@ private:
/// need to be changed.
///
template<typename T>
class VecCConst : public detail::VecCBase<T, VecCConst<T> >
class VTKM_ALWAYS_EXPORT VecCConst : public detail::VecCBase<T, VecCConst<T> >
{
using Superclass = detail::VecCBase<T, VecCConst<T> >;
......
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//
// Copyright 2015 Sandia Corporation.
// Copyright 2015 UT-Battelle, LLC.
// Copyright 2015 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#define vtkm_cont_ArrayHandle_cxx
#include <vtkm/cont/ArrayHandle.h>
#ifdef VTKM_MSVC
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<char, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Int8, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::UInt8, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Int16, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::UInt16, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Int32, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::UInt32, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Int64, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::UInt64, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Float32, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle<vtkm::Float64, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Int64,2>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Int32,2>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32,2>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float64,2>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Int64,3>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Int32,3>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32,3>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float64,3>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<char,4>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Int8,4>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::UInt8,4>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float32,4>, vtkm::cont::StorageTagBasic>::InternalStruct >;
template class VTKM_CONT_EXPORT std::shared_ptr< vtkm::cont::ArrayHandle< vtkm::Vec<vtkm::Float64,4>, vtkm::cont::StorageTagBasic>::InternalStruct >;
#endif
namespace vtkm {
namespace cont {
template class VTKM_CONT_EXPORT ArrayHandle<char, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Int8, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::UInt8, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Int16, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::UInt16, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Int32, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::UInt32, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Int64, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::UInt64, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Float32, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle<vtkm::Float64, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Int64,2>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Int32,2>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float32,2>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float64,2>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Int64,3>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Int32,3>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float32,3>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float64,3>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<char,4>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Int8,4>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::UInt8,4>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float32,4>, StorageTagBasic>;
template class VTKM_CONT_EXPORT ArrayHandle< vtkm::Vec<vtkm::Float64,4>, StorageTagBasic>;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -35,7 +35,7 @@ template<typename ValueType_,
typename PortalTypeFirst_,
typename PortalTypeSecond_,
typename PortalTypeThird_>
class ArrayPortalCartesianProduct
class VTKM_ALWAYS_EXPORT ArrayPortalCartesianProduct
{
public:
typedef ValueType_ ValueType;
......@@ -151,7 +151,7 @@ namespace cont {
namespace internal {
template<typename FirstHandleType, typename SecondHandleType, typename ThirdHandleType>
struct StorageTagCartesianProduct { };
struct VTKM_ALWAYS_EXPORT StorageTagCartesianProduct { };
/// This helper struct defines the value type for a zip container containing
/// the given two array handles.
......
......@@ -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;
......@@ -219,7 +219,7 @@ private:
};
template<typename SignatureWithArrays>
struct StorageTagCompositeVector { };
struct VTKM_ALWAYS_EXPORT StorageTagCompositeVector { };
/// A convenience class that provides a typedef to the appropriate tag for
/// a composite storage.
......
......@@ -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;
......@@ -115,7 +115,7 @@ namespace cont {
namespace internal {
template<typename SourceArrayHandleType, vtkm::IdComponent NUM_COMPONENTS>
struct StorageTagGroupVec { };
struct VTKM_ALWAYS_EXPORT StorageTagGroupVec { };
template<typename SourceArrayHandleType,
vtkm::IdComponent 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 =
......@@ -180,7 +180,7 @@ namespace cont {
namespace internal {
template<typename SourceArrayHandleType, typename OffsetsArrayHandleType>
struct StorageTagGroupVecVariable { };
struct VTKM_ALWAYS_EXPORT StorageTagGroupVecVariable { };
template<typename SourceArrayHandleType, typename OffsetsArrayHandleType>
class Storage<
......
......@@ -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;
......@@ -104,7 +104,7 @@ namespace cont {
namespace internal {
template<typename IndexArrayType, typename ValueArrayType>
struct StorageTagPermutation { };
struct VTKM_ALWAYS_EXPORT StorageTagPermutation { };
template<typename IndexArrayType, typename ValueArrayType>
class Storage<
......
......@@ -28,7 +28,7 @@ namespace cont {
namespace internal {
template<typename P>
class ArrayPortalStreaming
class VTKM_ALWAYS_EXPORT ArrayPortalStreaming
{
public:
typedef P PortalType;
......@@ -38,14 +38,14 @@ public:
ArrayPortalStreaming() : InputPortal(), BlockIndex(0), BlockSize(0), CurBlockSize(0) { }
VTKM_CONT
ArrayPortalStreaming(const PortalType &inputPortal, vtkm::Id blockIndex,
vtkm::Id blockSize, vtkm::Id curBlockSize) :
InputPortal(inputPortal), BlockIndex(blockIndex),
ArrayPortalStreaming(const PortalType &inputPortal, vtkm::Id blockIndex,
vtkm::Id blockSize, vtkm::Id curBlockSize) :
InputPortal(inputPortal), BlockIndex(blockIndex),
BlockSize(blockSize), CurBlockSize(curBlockSize) { }
template<typename OtherP>
VTKM_CONT
ArrayPortalStreaming(const ArrayPortalStreaming<OtherP> &src) :
ArrayPortalStreaming(const ArrayPortalStreaming<OtherP> &src) :
InputPortal(src.GetPortal()),
BlockIndex(src.GetBlockIndex()),
BlockSize(src.GetBlockSize()),
......@@ -53,7 +53,7 @@ public:
VTKM_CONT
vtkm::Id GetNumberOfValues() const {
return this->CurBlockSize;
return this->CurBlockSize;
}
VTKM_CONT
......@@ -97,7 +97,7 @@ private:
} // internal
template<typename ArrayHandleInputType>
struct StorageTagStreaming { };
struct VTKM_ALWAYS_EXPORT StorageTagStreaming { };