OpenVDB 11.0.0

Loading...
Searching...
No Matches
Macros
Platform.h File Reference

Go to the source code of this file.

## Macros
#define | PRAGMA(x) _Pragma(#x)
#define | OPENVDB_CHECK_GCC(MAJOR, MINOR) 0
| Macro for determining if GCC version is >= than X.Y.
#define | OPENVDB_HAS_CXX11 1
| OpenVDB now requires C++17.
#define | OPENVDB_UBSAN_SUPPRESS(X)
| SIMD Intrinsic Headers.
#define | OPENVDB_LIKELY(x) (x)
#define | OPENVDB_UNLIKELY(x) (x)
#define | OPENVDB_FORCE_INLINE inline
#define | OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN
#define | OPENVDB_NO_UNREACHABLE_CODE_WARNING_END
#define | OPENVDB_DEPRECATED [[deprecated]]
#define | OPENVDB_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]]
#define | OPENVDB_NO_DEPRECATION_WARNING_BEGIN
| Bracket code with OPENVDB_NO_DEPRECATION_WARNING_BEGIN/_END, to inhibit warnings about deprecated code.
#define | OPENVDB_NO_DEPRECATION_WARNING_END
#define | OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
| Bracket code with OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN/_END, to inhibit warnings about type conversion.
#define | OPENVDB_NO_TYPE_CONVERSION_WARNING_END
#define | OPENVDB_TEMPLATE_IMPORT
| Helper macros for defining library symbol visibility.
#define | OPENVDB_TEMPLATE_EXPORT
#define | OPENVDB_API OPENVDB_IMPORT
#define | OPENVDB_HOUDINI_API OPENVDB_IMPORT
#define | OPENVDB_AX_API
#define | OPENVDB_START_THREADSAFE_STATIC_REFERENCE
#define | OPENVDB_FINISH_THREADSAFE_STATIC_REFERENCE
#define | OPENVDB_START_THREADSAFE_STATIC_WRITE
#define | OPENVDB_FINISH_THREADSAFE_STATIC_WRITE
#define | OPENVDB_START_THREADSAFE_STATIC_ADDRESS
#define | OPENVDB_FINISH_THREADSAFE_STATIC_ADDRESS
#define | OPENVDB_START_NON_THREADSAFE_STATIC_REFERENCE
#define | OPENVDB_FINISH_NON_THREADSAFE_STATIC_REFERENCE
#define | OPENVDB_START_NON_THREADSAFE_STATIC_WRITE
#define | OPENVDB_FINISH_NON_THREADSAFE_STATIC_WRITE
#define | OPENVDB_START_NON_THREADSAFE_STATIC_ADDRESS
#define | OPENVDB_FINISH_NON_THREADSAFE_STATIC_ADDRESS
#define | OPENVDB_THREADSAFE_STATIC_REFERENCE(CODE) CODE
#define | OPENVDB_THREADSAFE_STATIC_WRITE(CODE) CODE
#define | OPENVDB_THREADSAFE_STATIC_ADDRESS(CODE) CODE
Utilities
#define | OPENVDB_PREPROC_STRINGIFY(x)
| Return x as a string literal. If x is a macro, return its value as a string literal.
#define | OPENVDB_PREPROC_CONCAT(x, y)
| Form a new token by concatenating two existing tokens. If either token is a macro, concatenate its value.

## Macro Definition Documentation

## ◆ OPENVDB_API

#define OPENVDB_API OPENVDB_IMPORT

All classes and public free standing functions must be explicitly marked as <lib>_API to be exported. The <lib>_PRIVATE macros are defined when building that particular library.

## ◆ OPENVDB_AX_API

#define OPENVDB_AX_API

## ◆ OPENVDB_CHECK_GCC

#define OPENVDB_CHECK_GCC | ( |  | MAJOR,
|  |  | MINOR
| ) |  | 0

Macro for determining if GCC version is >= than X.Y.

## ◆ OPENVDB_DEPRECATED

#define OPENVDB_DEPRECATED [[deprecated]]

Deprecation macros. Define OPENVDB_NO_DEPRECATION_WARNINGS to disable all deprecation warnings in OpenVDB.

## ◆ OPENVDB_DEPRECATED_MESSAGE

#define OPENVDB_DEPRECATED_MESSAGE | ( |  | msg | ) | [[deprecated(msg)]]

## ◆ OPENVDB_FINISH_NON_THREADSAFE_STATIC_ADDRESS

#define OPENVDB_FINISH_NON_THREADSAFE_STATIC_ADDRESS

## ◆ OPENVDB_FINISH_NON_THREADSAFE_STATIC_REFERENCE

#define OPENVDB_FINISH_NON_THREADSAFE_STATIC_REFERENCE

## ◆ OPENVDB_FINISH_NON_THREADSAFE_STATIC_WRITE

#define OPENVDB_FINISH_NON_THREADSAFE_STATIC_WRITE

## ◆ OPENVDB_FINISH_THREADSAFE_STATIC_ADDRESS

#define OPENVDB_FINISH_THREADSAFE_STATIC_ADDRESS

## ◆ OPENVDB_FINISH_THREADSAFE_STATIC_REFERENCE

#define OPENVDB_FINISH_THREADSAFE_STATIC_REFERENCE

## ◆ OPENVDB_FINISH_THREADSAFE_STATIC_WRITE

#define OPENVDB_FINISH_THREADSAFE_STATIC_WRITE

## ◆ OPENVDB_FORCE_INLINE

#define OPENVDB_FORCE_INLINE inline

Force inline function macros. These macros do not necessary guarantee that the decorated function will be inlined, but provide the strongest vendor annotations to that end.

## ◆ OPENVDB_HAS_CXX11

#define OPENVDB_HAS_CXX11 1

OpenVDB now requires C++17.

## ◆ OPENVDB_HOUDINI_API

#define OPENVDB_HOUDINI_API OPENVDB_IMPORT

## ◆ OPENVDB_LIKELY

#define OPENVDB_LIKELY | ( |  | x | ) | (x)

Macros to alias to compiler builtins which hint at critical edge selection during conditional statements.

## ◆ OPENVDB_NO_DEPRECATION_WARNING_BEGIN

#define OPENVDB_NO_DEPRECATION_WARNING_BEGIN

Bracket code with OPENVDB_NO_DEPRECATION_WARNING_BEGIN/_END, to inhibit warnings about deprecated code.

Note
  Only intended to be used internally whilst parent code is being deprecated

Example:

OPENVDB_DEPRECATED void myDeprecatedFunction() {}
{
OPENVDB_NO_DEPRECATION_WARNING_BEGIN
myDeprecatedFunction();
OPENVDB_NO_DEPRECATION_WARNING_END
}
OPENVDB_NO_DEPRECATION_WARNING_END
#define OPENVDB_NO_DEPRECATION_WARNING_END
Definition Platform.h:195
OPENVDB_NO_DEPRECATION_WARNING_BEGIN
#define OPENVDB_NO_DEPRECATION_WARNING_BEGIN
Bracket code with OPENVDB_NO_DEPRECATION_WARNING_BEGIN/_END, to inhibit warnings about deprecated cod...
Definition Platform.h:194
OPENVDB_DEPRECATED
#define OPENVDB_DEPRECATED
Definition Platform.h:147

## ◆ OPENVDB_NO_DEPRECATION_WARNING_END

#define OPENVDB_NO_DEPRECATION_WARNING_END

## ◆ OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN

#define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN

Bracket code with OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN/_END, to inhibit warnings about type conversion.

Note
  Use this sparingly. Use static casts and explicit type conversion if at all possible.

Example:

float value = 0.1f;
OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
int valueAsInt = value;
OPENVDB_NO_TYPE_CONVERSION_WARNING_END
OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
#define OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
Bracket code with OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN/_END, to inhibit warnings about type conve...
Definition Platform.h:227
OPENVDB_NO_TYPE_CONVERSION_WARNING_END
#define OPENVDB_NO_TYPE_CONVERSION_WARNING_END
Definition Platform.h:228

## ◆ OPENVDB_NO_TYPE_CONVERSION_WARNING_END

#define OPENVDB_NO_TYPE_CONVERSION_WARNING_END

## ◆ OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN

#define OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN

Bracket code with OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN/_END, as in the following example, to inhibit ICC remarks about unreachable code:

template<typename NodeType>
void processNode(NodeType& node)
{
OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN
if (NodeType::LEVEL == 0) return; // ignore leaf nodes
int i = 0;
...
OPENVDB_NO_UNREACHABLE_CODE_WARNING_END
}
OPENVDB_NO_UNREACHABLE_CODE_WARNING_END
#define OPENVDB_NO_UNREACHABLE_CODE_WARNING_END
Definition Platform.h:141
OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN
#define OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN
Definition Platform.h:140

In the above, `NodeType::LEVEL == 0` is a compile-time constant expression, so for some template instantiations, the line below it is unreachable.

## ◆ OPENVDB_NO_UNREACHABLE_CODE_WARNING_END

#define OPENVDB_NO_UNREACHABLE_CODE_WARNING_END

## ◆ OPENVDB_PREPROC_CONCAT

#define OPENVDB_PREPROC_CONCAT | ( |  | x,
|  |  | y
| ) |  |

Form a new token by concatenating two existing tokens. If either token is a macro, concatenate its value.

## ◆ OPENVDB_PREPROC_STRINGIFY

#define OPENVDB_PREPROC_STRINGIFY | ( |  | x | ) |

Return x as a string literal. If x is a macro, return its value as a string literal.

## ◆ OPENVDB_START_NON_THREADSAFE_STATIC_ADDRESS

#define OPENVDB_START_NON_THREADSAFE_STATIC_ADDRESS

## ◆ OPENVDB_START_NON_THREADSAFE_STATIC_REFERENCE

#define OPENVDB_START_NON_THREADSAFE_STATIC_REFERENCE

## ◆ OPENVDB_START_NON_THREADSAFE_STATIC_WRITE

#define OPENVDB_START_NON_THREADSAFE_STATIC_WRITE

## ◆ OPENVDB_START_THREADSAFE_STATIC_ADDRESS

#define OPENVDB_START_THREADSAFE_STATIC_ADDRESS

## ◆ OPENVDB_START_THREADSAFE_STATIC_REFERENCE

#define OPENVDB_START_THREADSAFE_STATIC_REFERENCE

## ◆ OPENVDB_START_THREADSAFE_STATIC_WRITE

#define OPENVDB_START_THREADSAFE_STATIC_WRITE

## ◆ OPENVDB_TEMPLATE_EXPORT

#define OPENVDB_TEMPLATE_EXPORT

## ◆ OPENVDB_TEMPLATE_IMPORT

#define OPENVDB_TEMPLATE_IMPORT

Helper macros for defining library symbol visibility.

Helper macros for explicit template instantiation

## ◆ OPENVDB_THREADSAFE_STATIC_ADDRESS

#define OPENVDB_THREADSAFE_STATIC_ADDRESS | ( |  | CODE | ) | CODE

## ◆ OPENVDB_THREADSAFE_STATIC_REFERENCE

#define OPENVDB_THREADSAFE_STATIC_REFERENCE | ( |  | CODE | ) | CODE

## ◆ OPENVDB_THREADSAFE_STATIC_WRITE

#define OPENVDB_THREADSAFE_STATIC_WRITE | ( |  | CODE | ) | CODE

## ◆ OPENVDB_UBSAN_SUPPRESS

#define OPENVDB_UBSAN_SUPPRESS | ( |  | X | ) |

SIMD Intrinsic Headers.

Windows defines Macros to suppress undefined behaviour sanitizer warnings. Should be used sparingly, primarily to suppress issues in upstream dependencies.

## ◆ OPENVDB_UNLIKELY

#define OPENVDB_UNLIKELY | ( |  | x | ) | (x)

## ◆ PRAGMA

#define PRAGMA | ( |  | x | ) | _Pragma(#x)