77783dc8e3
The renar dashboard gave some warnings about shadowed variables in the boost random library (version 1.57.0). This might be a bug in boost that is already fixed (I didn't get the same warning on my gcc compile with boost 1.58.0), but I don't see a problem with disabling the shadow warning everywhere in boost.
143 lines
4.2 KiB
C
143 lines
4.2 KiB
C
//============================================================================
|
|
// 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 2014 Sandia Corporation.
|
|
// Copyright 2014 UT-Battelle, LLC.
|
|
// Copyright 2014 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 vtk_m_internal_Configure_h
|
|
#define vtk_m_internal_Configure_h
|
|
|
|
#ifdef __CUDACC__
|
|
#define VTKM_CUDA
|
|
#endif
|
|
|
|
#ifdef _OPENMP
|
|
#define VTKM_OPENMP
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
#define VTKM_MSVC
|
|
#endif
|
|
|
|
#ifdef ____clang__
|
|
#define VTKM_CLANG
|
|
#endif
|
|
|
|
#ifdef __INTEL_COMPILER
|
|
#define VTKM_ICC
|
|
#endif
|
|
|
|
// Several compilers pretend to be GCC but have minor differences. Try to
|
|
// compensate for that.
|
|
#if defined(__GNUC__) && !defined(VTKM_CLANG) && !defined(VTKM_ICC)
|
|
#define VTKM_GCC
|
|
#endif
|
|
|
|
#if !defined(VTKM_USE_DOUBLE_PRECISION) && !defined(VTKM_NO_DOUBLE_PRECISION)
|
|
#cmakedefine VTKM_USE_DOUBLE_PRECISION
|
|
#endif
|
|
|
|
#if defined(VTKM_USE_DOUBLE_PRECISION) && defined(VTKM_NO_DOUBLE_PRECISION)
|
|
# error Both VTKM_USE_DOUBLE_PRECISION and VTKM_NO_DOUBLE_PRECISION defined. Do not know what to do.
|
|
#endif
|
|
|
|
#if !defined(VTKM_USE_64BIT_IDS) && !defined(VTKM_NO_64BIT_IDS)
|
|
#cmakedefine VTKM_USE_64BIT_IDS
|
|
#endif
|
|
|
|
#if defined(VTKM_USE_64BIT_IDS) && defined(VTKM_NO_64BIT_IDS)
|
|
# error Both VTKM_USE_64BIT_IDS and VTKM_NO_64BIT_IDS defined. Do not know what to do.
|
|
#endif
|
|
|
|
#define VTKM_SIZE_FLOAT @VTKm_SIZE_FLOAT@
|
|
#define VTKM_SIZE_DOUBLE @VTKm_SIZE_DOUBLE@
|
|
#define VTKM_SIZE_CHAR @VTKm_SIZE_CHAR@
|
|
#define VTKM_SIZE_SHORT @VTKm_SIZE_SHORT@
|
|
#define VTKM_SIZE_INT @VTKm_SIZE_INT@
|
|
#define VTKM_SIZE_LONG @VTKm_SIZE_LONG@
|
|
#define VTKM_SIZE_LONG_LONG @VTKm_SIZE_LONG_LONG@
|
|
|
|
#ifdef VTKM_USE_DOUBLE_PRECISION
|
|
# ifndef VTKM_SIZE_SCALAR
|
|
# define VTKM_SIZE_SCALAR VTKM_SIZE_DOUBLE
|
|
# endif
|
|
# ifndef VTKM_ALIGNMENT_TWO_SCALAR
|
|
# define VTKM_ALIGNMENT_TWO_SCALAR 16
|
|
# endif
|
|
# ifndef VTKM_ALIGNMENT_FOUR_SCALAR
|
|
# define VTKM_ALIGNMENT_FOUR_SCALAR 8
|
|
# endif
|
|
#else
|
|
# ifndef VTKM_SIZE_SCALAR
|
|
# define VTKM_SIZE_SCALAR VTKM_SIZE_FLOAT
|
|
# define VTKM_ALIGNMENT_SCALAR VTKM_SIZE_SCALAR
|
|
# endif
|
|
# ifndef VTKM_ALIGNMENT_TWO_SCALAR
|
|
# define VTKM_ALIGNMENT_TWO_SCALAR 8
|
|
# endif
|
|
# ifndef VTKM_ALIGNMENT_FOUR_SCALAR
|
|
# define VTKM_ALIGNMENT_FOUR_SCALAR 16
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef VTKM_USE_64BIT_IDS
|
|
# ifndef VTKM_SIZE_ID
|
|
# define VTKM_SIZE_ID 8
|
|
# endif
|
|
#else
|
|
# ifndef VTKM_SIZE_ID
|
|
# define VTKM_SIZE_ID 4
|
|
# 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
|
|
// this is used to set pragmas that dissable warnings that VTK-m checks for
|
|
// but boost does not.
|
|
#if defined(VTKM_GCC) || defined(VTKM_CLANG)
|
|
#define VTKM_BOOST_PRE_INCLUDE \
|
|
_Pragma("GCC diagnostic push") \
|
|
_Pragma("GCC diagnostic ignored \"-Wconversion\"") \
|
|
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
|
#define VTKM_BOOST_POST_INCLUDE \
|
|
_Pragma("GCC diagnostic pop")
|
|
#else
|
|
#define VTKM_BOOST_PRE_INCLUDE
|
|
#define VTKM_BOOST_POST_INCLUDE
|
|
#endif
|
|
|
|
// Determine whether we will use variadic templates (a new feature in C++11).
|
|
// Currently have VARIADIC_TEMPLATE support off.
|
|
#cmakedefine VTKM_NO_VARIADIC_TEMPLATE
|
|
#if !defined(VTKM_USE_VARIADIC_TEMPLATE) && !defined(VTKM_NO_VARIADIC_TEMPLATE)
|
|
// Currently using Boost to determine support.
|
|
|
|
VTKM_BOOST_PRE_INCLUDE
|
|
# include <boost/config.hpp>
|
|
VTKM_BOOST_POST_INCLUDE
|
|
|
|
|
|
# if defined(BOOST_HAS_VARIADIC_TMPL)
|
|
# define VTKM_USE_VARIADIC_TEMPLATE 1
|
|
# endif
|
|
#endif
|
|
|
|
#if defined(VTKM_USE_VARIADIC_TEMPLATE) && defined(VTKM_NO_VARIADIC_TEMPLATE)
|
|
# error Both VTKM_USE_VARIADIC_TEMPLATE and VTKM_NO_VARIADIC_TEMPLATE defined. Do not know what to do.
|
|
#endif
|
|
|
|
#endif //vtkm_internal_Configure_h
|