Rename pragma header guard so it makes sense for tbb and thrust.

Boost is not the only thirdparty that we are supressing warnings for, so
make the name more generic.
This commit is contained in:
Robert Maynard 2015-08-12 15:08:45 -04:00
parent 8204db2f6a
commit ab59e34a2f
43 changed files with 97 additions and 95 deletions

@ -24,10 +24,10 @@
#include <vtkm/internal/ExportMacros.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {

@ -38,17 +38,17 @@
// boost seems to want to undefine those macros so that it can implement the
// C99 templates and other implementations of the same name. Get around the
// problem by using the boost version when compiling for a CPU.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/special_functions/sign.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <cmath>
#define VTKM_USE_BOOST_CLASSIFY
#define VTKM_USE_BOOST_SIGN
#endif // !VTKM_CUDA
#if defined(VTKM_MSVC) && !defined(VTKM_CUDA)
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/math/special_functions/acosh.hpp>
#include <boost/math/special_functions/asinh.hpp>
#include <boost/math/special_functions/atanh.hpp>
@ -56,7 +56,7 @@ VTKM_BOOST_PRE_INCLUDE
#include <boost/math/special_functions/expm1.hpp>
#include <boost/math/special_functions/log1p.hpp>
#include <boost/math/special_functions/round.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#define VTKM_USE_BOOST_MATH
#if _MSC_VER <= 1600
#define VTKM_USE_STL_MIN_MAX

@ -50,17 +50,17 @@ $# Ignore the following comment. It is meant for the generated file.
// boost seems to want to undefine those macros so that it can implement the
// C99 templates and other implementations of the same name. Get around the
// problem by using the boost version when compiling for a CPU.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/math/special_functions/sign.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <cmath>
#define VTKM_USE_BOOST_CLASSIFY
#define VTKM_USE_BOOST_SIGN
#endif // !VTKM_CUDA
#if defined(VTKM_MSVC) && !defined(VTKM_CUDA)
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/math/special_functions/acosh.hpp>
#include <boost/math/special_functions/asinh.hpp>
#include <boost/math/special_functions/atanh.hpp>
@ -68,7 +68,7 @@ VTKM_BOOST_PRE_INCLUDE
#include <boost/math/special_functions/expm1.hpp>
#include <boost/math/special_functions/log1p.hpp>
#include <boost/math/special_functions/round.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#define VTKM_USE_BOOST_MATH
#if _MSC_VER <= 1600
#define VTKM_USE_STL_MIN_MAX

@ -22,9 +22,9 @@
#include <vtkm/Types.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {

@ -24,12 +24,12 @@
#include <vtkm/internal/Configure.h>
#include <vtkm/internal/ExportMacros.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <boost/type_traits/is_signed.hpp>
#include <boost/utility/enable_if.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
/*!
* \namespace vtkm

@ -22,9 +22,9 @@
#include <vtkm/Types.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/remove_const.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {

@ -37,9 +37,9 @@
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/benchmarking/Benchmarker.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/random.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <algorithm>
#include <cmath>

@ -31,13 +31,13 @@
#include <vtkm/cont/internal/ArrayHandleExecutionManager.h>
#include <vtkm/cont/internal/DeviceAdapterTag.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/concept_check.hpp>
#include <boost/mpl/not.hpp>
#include <boost/smart_ptr/scoped_ptr.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <vector>

@ -28,9 +28,9 @@
#include <vtkm/internal/FunctionInterface.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <sstream>

@ -27,9 +27,9 @@
#include <vtkm/cont/DynamicArrayHandle.h>
#include <vtkm/cont/DeviceAdapterAlgorithm.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -29,10 +29,10 @@
#include <vtkm/cont/internal/DynamicTransform.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/utility/enable_if.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -27,9 +27,9 @@
#include <vtkm/cont/internal/DynamicTransform.h>
#include <vtkm/cont/internal/SimplePolymorphicContainer.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/smart_ptr/shared_ptr.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -27,9 +27,9 @@
#include <vtkm/cont/internal/DynamicTransform.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -30,9 +30,9 @@
#include <vtkm/internal/ExportMacros.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -22,10 +22,10 @@
#include <vtkm/internal/ExportMacros.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -26,10 +26,10 @@
#include <vtkm/exec/ExecutionObjectBase.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -26,9 +26,9 @@
#include <vtkm/exec/ExecutionObjectBase.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -25,11 +25,11 @@
#include <vtkm/cont/Storage.h>
// Disable warnings we check vtkm for but Thrust does not.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <thrust/system/cuda/vector.h>
#include <thrust/device_malloc_allocator.h>
#include <thrust/copy.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <vtkm/exec/cuda/internal/ArrayPortalFromThrust.h>

@ -35,7 +35,7 @@
#include <vtkm/exec/cuda/internal/WrappedOperators.h>
// Disable warnings we check vtkm for but Thrust does not.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <thrust/advance.h>
#include <thrust/binary_search.h>
#include <thrust/copy.h>
@ -47,7 +47,7 @@ VTKM_BOOST_PRE_INCLUDE
#include <thrust/iterator/counting_iterator.h>
#include <thrust/system/cuda/execution_policy.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -29,12 +29,12 @@
#include <vtkm/exec/cuda/internal/WrappedOperators.h>
// Disable warnings we check vtkm for but Thrust does not.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <thrust/system/cuda/memory.h>
#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -30,10 +30,10 @@
#include <vtkm/exec/internal/ErrorMessageBuffer.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/iterator/counting_iterator.hpp>
#include <boost/utility/enable_if.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <algorithm>
#include <numeric>

@ -25,9 +25,9 @@
#include <string>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#define VTKM_DEVICE_ADAPTER_ERROR -2
#define VTKM_DEVICE_ADAPTER_UNDEFINED -1

@ -24,9 +24,9 @@
#include <vtkm/cont/Assert.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/iterator/iterator_facade.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -22,10 +22,10 @@
#include <vtkm/Types.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
/// Checks that the argument is a proper \c PointCoordinates class. This is a
/// handy concept check for functions and classes to make sure that a template

@ -22,9 +22,9 @@
#include <vtkm/Types.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/smart_ptr/shared_ptr.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -32,7 +32,7 @@
#include <vtkm/cont/ErrorExecution.h>
#include <vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/remove_reference.hpp>
// gcc || clang
@ -67,7 +67,7 @@ VTKM_BOOST_PRE_INCLUDE
#undef NOMINMAX
#endif
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace cont {

@ -29,8 +29,10 @@
#ifndef __TBB_parallel_sort_H
#define __TBB_parallel_sort_H
VTKM_THIRDPARTY_PRE_INCLUDE
#include <tbb/parallel_for.h>
#include <tbb/blocked_range.h>
VTKM_THIRDPARTY_POST_INCLUDE
#include <algorithm>
#include <iterator>

@ -22,10 +22,10 @@
#include <vtkm/internal/ExportMacros.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -24,9 +24,9 @@
#include <vtkm/exec/arg/Fetch.h>
#include <vtkm/exec/TopologyData.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -25,10 +25,10 @@
#include <vtkm/exec/ExecutionObjectBase.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -25,13 +25,13 @@
#include <iterator>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/utility/enable_if.hpp>
#include <thrust/system/cuda/memory.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -25,11 +25,11 @@
#include <vtkm/internal/ExportMacros.h>
// Disable warnings we check vtkm for but Thrust does not.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <thrust/functional.h>
#include <thrust/iterator/iterator_facade.h>
#include <thrust/system/cuda/execution_policy.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -26,9 +26,9 @@
#include <vtkm/exec/cuda/internal/IteratorFromArrayPortal.h>
// Disable warnings we check vtkm for but Thrust does not.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <thrust/system/cuda/memory.h>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace exec {

@ -26,10 +26,10 @@
#include <vtkm/testing/Testing.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_same.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace {

@ -114,21 +114,21 @@
# endif
#endif
// Define a pair of macros, VTKM_BOOST_PRE_INCLUDE and VTKM_BOOST_POST_INCLUDE,
// that should be wrapped around any #include for a boost header file. Mostly
// Define a pair of macros, VTKM_THIRDPARTY_PRE_INCLUDE and VTKM_THIRDPARTY_POST_INCLUDE,
// that should be wrapped around any #include for a boost or thrust header file. Mostly
// this is used to set pragmas that dissable warnings that VTK-m checks for
// but boost does not.
// but boost and thrust does not.
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
#define VTKM_BOOST_PRE_INCLUDE \
#define VTKM_THIRDPARTY_PRE_INCLUDE \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wconversion\"") \
_Pragma("GCC diagnostic ignored \"-Wshadow\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
#define VTKM_BOOST_POST_INCLUDE \
#define VTKM_THIRDPARTY_POST_INCLUDE \
_Pragma("GCC diagnostic pop")
#else
#define VTKM_BOOST_PRE_INCLUDE
#define VTKM_BOOST_POST_INCLUDE
#define VTKM_THIRDPARTY_PRE_INCLUDE
#define VTKM_THIRDPARTY_POST_INCLUDE
#endif
// Determine whether we will use variadic templates (a new feature in C++11).
@ -137,9 +137,9 @@
#if !defined(VTKM_USE_VARIADIC_TEMPLATE) && !defined(VTKM_NO_VARIADIC_TEMPLATE)
// Currently using Boost to determine support.
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
# include <boost/config.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
# if defined(BOOST_HAS_VARIADIC_TMPL)

@ -25,9 +25,9 @@
#include <vtkm/TopologyElementTag.h>
#include <vtkm/Types.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <iostream>

@ -25,7 +25,7 @@
#include <vtkm/internal/IndexTag.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/function_types/components.hpp>
#include <boost/function_types/function_arity.hpp>
#include <boost/function_types/function_type.hpp>
@ -40,7 +40,7 @@ VTKM_BOOST_PRE_INCLUDE
#include <boost/mpl/less.hpp>
#include <boost/mpl/push_back.hpp>
#include <boost/utility/enable_if.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE

@ -30,10 +30,10 @@
#include <vtkm/Types.h>
#include <vtkm/internal/IndexTag.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/function_types/function_type.hpp>
#include <boost/mpl/at.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#define VTKM_MAX_FUNCTION_PARAMETERS 10

@ -42,10 +42,10 @@ $# Ignore the following comment. It is meant for the generated file.
#include <vtkm/Types.h>
#include <vtkm/internal/IndexTag.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/function_types/function_type.hpp>
#include <boost/mpl/at.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
$py(max_parameters=10)\
#define VTKM_MAX_FUNCTION_PARAMETERS $(max_parameters)

@ -26,9 +26,9 @@
#include <vtkm/TypeTraits.h>
#include <vtkm/VecTraits.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/static_assert.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <iostream>
#include <sstream>

@ -26,9 +26,9 @@
#include <vtkm/testing/Testing.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/type_traits/remove_const.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace vtkm {
namespace testing {

@ -36,12 +36,12 @@
#include <vtkm/exec/internal/WorkletInvokeFunctor.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/mpl/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/utility/enable_if.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
#include <sstream>

@ -24,9 +24,9 @@
#include <vtkm/cont/testing/Testing.h>
#include <vtkm/cont/testing/MakeTestDataSet.h>
VTKM_BOOST_PRE_INCLUDE
VTKM_THIRDPARTY_PRE_INCLUDE
#include <boost/shared_ptr.hpp>
VTKM_BOOST_POST_INCLUDE
VTKM_THIRDPARTY_POST_INCLUDE
namespace {