Skip to content

Commit

Permalink
Merge pull request #1654 from sideeffects/sendupstream_remove_half_lut
Browse files Browse the repository at this point in the history
Remove Half LUT
  • Loading branch information
jmlait authored Sep 5, 2023
2 parents 7f88880 + 01ca701 commit a46f498
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openvdb/openvdb/math/Half.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ namespace OPENVDB_VERSION_NAME {
namespace math {
namespace internal {

// Use of lookup table is explicitly suppressed and the generation of
// a lookup table is suppressed. This is required because we namespace
// our type, but the lookup table is extern "C" and lacks a namespace.
// Thus any attempt to link two versions of OpenVDB with different
// namespaces will clash due to redefinition with a new type.
// The default was not to use a lookup table.
#undef IMATH_HALF_USE_LOOKUP_TABLE
#define IMATH_HALF_NO_LOOKUP_TABLE

//-------------------------------------------------------------------------
// Limits
//
Expand Down
5 changes: 5 additions & 0 deletions pendingchanges/remove_half_lut.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixes:
- The Half.h is no longer built with an internal lookup table, but
explicilty selects the non-lut version and disables creation of
a lut. This is required to avoid symbol conflicts with
different namespaced OpenVDB builds.

0 comments on commit a46f498

Please sign in to comment.