Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gaida-exe authored Jun 8, 2023
2 parents 61cd887 + 9a57c7e commit 20fdfdd
Show file tree
Hide file tree
Showing 52 changed files with 5,515 additions and 5,089 deletions.
9 changes: 9 additions & 0 deletions cmake/config/OpenVDBCXX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ if(OPENVDB_CXX_STRICT)
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wall>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wextra>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wconversion>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wnon-virtual-dtor>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wover-aligned>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wimplicit-fallthrough>")
add_compile_options("$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,9.3.0>>:-Wimplicit-fallthrough>")
# Only check global constructors for libraries (we should really check for
# executables too but gtest relies on these types of constructors for its
# framework).
add_compile_options("$<$<AND:$<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>,$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>>:-Wglobal-constructors>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-Wno-sign-conversion>")
# GNU
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Werror>")
Expand All @@ -189,6 +197,7 @@ if(OPENVDB_CXX_STRICT)
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wconversion>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wdisabled-optimization>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Woverloaded-virtual>")
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wnon-virtual-dtor>")
else()
# NO OPENVDB_CXX_STRICT, suppress some warnings
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
Expand Down
6 changes: 3 additions & 3 deletions nanovdb/nanovdb/unittest/TestNanoVDB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ TEST_F(TestNanoVDB, InternalNodeValueMask)
EXPECT_EQ(end-start, 28);// padding is 28 bytes

// use padding for an offset and check that it doesn't interfere with other data
size_t &offset = *reinterpret_cast<size_t*>(&(data->mStdDevi)+1);
uint64_t &offset = *reinterpret_cast<uint64_t*>(&(data->mStdDevi)+1);
data->mStdDevi = true;
data->mTable[0].child = 123434214;
offset = 45634923663;
Expand Down Expand Up @@ -1751,7 +1751,7 @@ TEST_F(TestNanoVDB, InternalNodeValueMask)
EXPECT_EQ(end-start, 28);// padding is 28 bytes

// use padding for an offset and check that it doesn't interfere with other data
size_t &offset = *reinterpret_cast<size_t*>(&(data->mStdDevi)+1);
uint64_t &offset = *reinterpret_cast<uint64_t*>(&(data->mStdDevi)+1);
data->mStdDevi = true;
data->mTable[0].child = 123434214;
offset = 45634923663;
Expand Down Expand Up @@ -2283,7 +2283,7 @@ TEST_F(TestNanoVDB, BasicGrid)
EXPECT_EQ(sizeof(TreeT), nanovdb::AlignUp<NANOVDB_DATA_ALIGNMENT>(4*8 + 3*4 + 3*4 + 8));
EXPECT_EQ(sizeof(TreeT), size_t(4*8 + 3*4 + 3*4 + 8));// should already be 32 byte aligned

size_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
uint64_t bytes[6] = {GridT::memUsage(), TreeT::memUsage(), RootT::memUsage(1), NodeT2::memUsage(), NodeT1::memUsage(), LeafT::DataType::memUsage()};
for (int i = 1; i < 6; ++i)
bytes[i] += bytes[i - 1]; // Byte offsets to: tree, root, internal nodes, leafs, total
std::unique_ptr<uint8_t[]> pool(new uint8_t[bytes[5] + NANOVDB_DATA_ALIGNMENT]);
Expand Down
12 changes: 11 additions & 1 deletion openvdb/openvdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ set(OPENVDB_LIBRARY_SOURCE_FILES
points/StreamCompression.cc
points/points.cc
util/Formats.cc
util/Util.cc
)

set(OPENVDB_LIBRARY_INCLUDE_FILES
Expand Down Expand Up @@ -468,9 +467,20 @@ set(OPENVDB_LIBRARY_POINTS_INCLUDE_FILES
)

set(OPENVDB_LIBRARY_POINTS_IMPL_INCLUDE_FILES
points/impl/PointAttributeImpl.h
points/impl/PointConversionImpl.h
points/impl/PointCountImpl.h
points/impl/PointDeleteImpl.h
points/impl/PointGroupImpl.h
points/impl/PointMaskImpl.h
points/impl/PointMoveImpl.h
points/impl/PointRasterizeFrustumImpl.h
points/impl/PointRasterizeSDFImpl.h
points/impl/PointRasterizeTrilinearImpl.h
points/impl/PointReplicateImpl.h
points/impl/PointSampleImpl.h
points/impl/PointScatterImpl.h
points/impl/PointStatisticsImpl.h
)

set(OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES
Expand Down
Loading

0 comments on commit 20fdfdd

Please sign in to comment.