Go to the documentation of this file. 33 #ifndef OPENVDB_PLATFORM_HAS_BEEN_INCLUDED 34 #define OPENVDB_PLATFORM_HAS_BEEN_INCLUDED 38 #define PRAGMA(x) _Pragma(#x) 43 #define OPENVDB_PREPROC_STRINGIFY_(x) #x 44 #define OPENVDB_PREPROC_STRINGIFY(x) OPENVDB_PREPROC_STRINGIFY_(x) 51 #define OPENVDB_PREPROC_CONCAT_(x, y) x ## y 52 #define OPENVDB_PREPROC_CONCAT(x, y) OPENVDB_PREPROC_CONCAT_(x, y) 63 #ifdef OPENVDB_DEPRECATED 64 #undef OPENVDB_DEPRECATED 67 #define OPENVDB_DEPRECATED __declspec(deprecated) 69 #define OPENVDB_DEPRECATED __attribute__ ((deprecated)) 74 #define OPENVDB_CHECK_GCC(MAJOR, MINOR) \ 75 (__GNUC__ > MAJOR || (__GNUC__ == MAJOR && __GNUC_MINOR__ >= MINOR)) 77 #define OPENVDB_CHECK_GCC(MAJOR, MINOR) 0 81 #ifdef __INTEL_COMPILER 82 #ifdef __INTEL_CXX11_MODE__ 83 #define OPENVDB_HAS_CXX11 1 85 #elif defined(__clang__) 86 #ifndef _LIBCPP_VERSION 89 #ifdef _LIBCPP_VERSION 90 #define OPENVDB_HAS_CXX11 1 92 #elif defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus > 199711L) 93 #define OPENVDB_HAS_CXX11 1 94 #elif defined(_MSC_VER) 95 #if (_MSC_VER >= 1700) 96 #define OPENVDB_HAS_CXX11 1 99 #if defined(__GNUC__) && !OPENVDB_CHECK_GCC(4, 4) 102 #undef OPENVDB_HAS_CXX11 108 #if defined(__GNUC__) && OPENVDB_CHECK_GCC(4, 4) 109 #define OPENVDB_STATIC_SPECIALIZATION 111 #define OPENVDB_STATIC_SPECIALIZATION static 130 #if defined(__INTEL_COMPILER) 134 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN \ 135 _Pragma("warning (push)") \ 136 _Pragma("warning (disable:111)") \ 137 _Pragma("warning (disable:128)") \ 138 _Pragma("warning (disable:185)") \ 139 _Pragma("warning (disable:280)") 140 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_END \ 141 _Pragma("warning (pop)") 142 #elif defined(__clang__) 143 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN \ 144 PRAGMA(clang diagnostic push) \ 145 PRAGMA(clang diagnostic ignored "-Wunreachable-code") 146 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_END \ 147 PRAGMA(clang diagnostic pop) 149 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN 150 #define OPENVDB_NO_UNREACHABLE_CODE_WARNING_END 167 #if defined __INTEL_COMPILER 168 #define OPENVDB_NO_DEPRECATION_WARNING_BEGIN \ 169 _Pragma("warning (push)") \ 170 _Pragma("warning (disable:1478)") \ 171 PRAGMA(message("NOTE: ignoring deprecation warning at " __FILE__ \ 172 ":" OPENVDB_PREPROC_STRINGIFY(__LINE__))) 173 #define OPENVDB_NO_DEPRECATION_WARNING_END \ 174 _Pragma("warning (pop)") 175 #elif defined __clang__ 176 #define OPENVDB_NO_DEPRECATION_WARNING_BEGIN \ 177 _Pragma("clang diagnostic push") \ 178 _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") 180 #define OPENVDB_NO_DEPRECATION_WARNING_END \ 181 _Pragma("clang diagnostic pop") 182 #elif defined __GNUC__ 183 #define OPENVDB_NO_DEPRECATION_WARNING_BEGIN \ 184 _Pragma("GCC diagnostic push") \ 185 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ 186 _Pragma("message(\"NOTE: ignoring deprecation warning\")") 187 #define OPENVDB_NO_DEPRECATION_WARNING_END \ 188 _Pragma("GCC diagnostic pop") 190 #define OPENVDB_NO_DEPRECATION_WARNING_BEGIN 191 #define OPENVDB_NO_DEPRECATION_WARNING_END 205 #if defined __INTEL_COMPILER 206 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN 207 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_END 208 #elif defined __GNUC__ 210 #if OPENVDB_CHECK_GCC(4, 9) 211 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN \ 212 _Pragma("GCC diagnostic push") \ 213 _Pragma("GCC diagnostic ignored \"-Wconversion\"") \ 214 _Pragma("GCC diagnostic ignored \"-Wfloat-conversion\"") 216 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN \ 217 _Pragma("GCC diagnostic push") \ 218 _Pragma("GCC diagnostic ignored \"-Wconversion\"") 220 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_END \ 221 _Pragma("GCC diagnostic pop") 223 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN 224 #define OPENVDB_NO_TYPE_CONVERSION_WARNING_END 229 #ifndef _USE_MATH_DEFINES 233 #define _USE_MATH_DEFINES 235 #include <boost/math/special_functions/round.hpp> 237 using boost::math::round;
243 static inline double copysign(
double x,
double y) {
return _copysign(x, y); }
248 #include <boost/cstdint.hpp> 250 using boost::int16_t;
251 using boost::int32_t;
252 using boost::int64_t;
253 using boost::uint8_t;
254 using boost::uint16_t;
255 using boost::uint32_t;
256 using boost::uint64_t;
259 #ifdef OPENVDB_EXPORT 260 #undef OPENVDB_EXPORT 262 #ifdef OPENVDB_IMPORT 263 #undef OPENVDB_IMPORT 266 #define OPENVDB_EXPORT __attribute__((visibility("default"))) 267 #define OPENVDB_IMPORT __attribute__((visibility("default"))) 271 #define OPENVDB_EXPORT __declspec(dllexport) 272 #define OPENVDB_IMPORT __declspec(dllimport) 274 #define OPENVDB_EXPORT 275 #define OPENVDB_IMPORT 285 #ifdef OPENVDB_PRIVATE 286 #define OPENVDB_API OPENVDB_EXPORT 288 #define OPENVDB_API OPENVDB_IMPORT 290 #ifdef OPENVDB_HOUDINI_API 291 #undef OPENVDB_HOUDINI_API 293 #ifdef OPENVDB_HOUDINI_PRIVATE 294 #define OPENVDB_HOUDINI_API OPENVDB_EXPORT 296 #define OPENVDB_HOUDINI_API OPENVDB_IMPORT 299 #endif // OPENVDB_PLATFORM_HAS_BEEN_INCLUDED