Skip to content

Commit c124055

Browse files
authored
Merge pull request #1532 from Idclip/imath_half_3.1
Bumped internal copy of half to Imath 3.1.6
2 parents 60796b6 + 8d02be5 commit c124055

File tree

6 files changed

+799
-910
lines changed

6 files changed

+799
-910
lines changed

openvdb/openvdb/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ set(OPENVDB_LIBRARY_MATH_INCLUDE_FILES
417417
math/DDA.h
418418
math/FiniteDifference.h
419419
math/Half.h
420-
math/HalfLimits.h
421420
math/LegacyFrustum.h
422421
math/Maps.h
423422
math/Mat.h

openvdb/openvdb/Platform.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@
8080
#define OPENVDB_UBSAN_SUPPRESS(X)
8181
#endif
8282

83+
/// Macros to alias to compiler builtins which hint at critical edge selection
84+
/// during conditional statements.
85+
#if defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)
86+
#ifdef __cplusplus
87+
#define OPENVDB_LIKELY(x) (__builtin_expect(static_cast<bool>(x), true))
88+
#define OPENVDB_UNLIKELY(x) (__builtin_expect(static_cast<bool>(x), false))
89+
#else
90+
#define OPENVDB_LIKELY(x) (__builtin_expect((x), 1))
91+
#define OPENVDB_UNLIKELY(x) (__builtin_expect((x), 0))
92+
#endif
93+
#else
94+
#define OPENVDB_LIKELY(x) (x)
95+
#define OPENVDB_UNLIKELY(x) (x)
96+
#endif
97+
8398
/// Bracket code with OPENVDB_NO_UNREACHABLE_CODE_WARNING_BEGIN/_END,
8499
/// as in the following example, to inhibit ICC remarks about unreachable code:
85100
/// @code

0 commit comments

Comments
 (0)