Skip to content

Commit a46f498

Browse files
authored
Merge pull request #1654 from sideeffects/sendupstream_remove_half_lut
Remove Half LUT
2 parents 7f88880 + 01ca701 commit a46f498

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

openvdb/openvdb/math/Half.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ namespace OPENVDB_VERSION_NAME {
200200
namespace math {
201201
namespace internal {
202202

203+
// Use of lookup table is explicitly suppressed and the generation of
204+
// a lookup table is suppressed. This is required because we namespace
205+
// our type, but the lookup table is extern "C" and lacks a namespace.
206+
// Thus any attempt to link two versions of OpenVDB with different
207+
// namespaces will clash due to redefinition with a new type.
208+
// The default was not to use a lookup table.
209+
#undef IMATH_HALF_USE_LOOKUP_TABLE
210+
#define IMATH_HALF_NO_LOOKUP_TABLE
211+
203212
//-------------------------------------------------------------------------
204213
// Limits
205214
//

pendingchanges/remove_half_lut.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixes:
2+
- The Half.h is no longer built with an internal lookup table, but
3+
explicilty selects the non-lut version and disables creation of
4+
a lut. This is required to avoid symbol conflicts with
5+
different namespaced OpenVDB builds.

0 commit comments

Comments
 (0)