Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable undefined behavior checks in transformValues() #1954

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions openvdb/openvdb/tools/ValueTransformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@ inline void foreach(const IterT& iter, const XformOp& op,
/// consider using @c tbb::parallel_for() or @c tbb::parallel_reduce() in conjunction
/// with a tree::IteratorRange that wraps a grid or tree iterator.
template<typename InIterT, typename OutGridT, typename XformOp>
inline void transformValues(const InIterT& inIter, OutGridT& outGrid,
inline OPENVDB_UBSAN_SUPPRESS("undefined")
void transformValues(const InIterT& inIter, OutGridT& outGrid,
XformOp& op, bool threaded = true, bool shareOp = true,
MergePolicy merge = MERGE_ACTIVE_STATES);

template<typename InIterT, typename OutGridT, typename XformOp>
inline void transformValues(const InIterT& inIter, OutGridT& outGrid,
inline OPENVDB_UBSAN_SUPPRESS("undefined")
void transformValues(const InIterT& inIter, OutGridT& outGrid,
const XformOp& op, bool threaded = true, bool shareOp = true,
MergePolicy merge = MERGE_ACTIVE_STATES);

Expand Down Expand Up @@ -585,8 +587,8 @@ class CopyableOpTransformer


template<typename InIterT, typename OutGridT, typename XformOp>
inline void
transformValues(const InIterT& inIter, OutGridT& outGrid, XformOp& op,
inline OPENVDB_UBSAN_SUPPRESS("undefined")
void transformValues(const InIterT& inIter, OutGridT& outGrid, XformOp& op,
bool threaded, bool shared, MergePolicy merge)
{
using Adapter = TreeAdapter<OutGridT>;
Expand All @@ -603,8 +605,8 @@ transformValues(const InIterT& inIter, OutGridT& outGrid, XformOp& op,
}

template<typename InIterT, typename OutGridT, typename XformOp>
inline void
transformValues(const InIterT& inIter, OutGridT& outGrid, const XformOp& op,
inline OPENVDB_UBSAN_SUPPRESS("undefined")
void transformValues(const InIterT& inIter, OutGridT& outGrid, const XformOp& op,
bool threaded, bool /*share*/, MergePolicy merge)
{
using Adapter = TreeAdapter<OutGridT>;
Expand Down
1 change: 0 additions & 1 deletion openvdb/openvdb/unittest/TestTools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,6 @@ struct FloatToVec

}


TEST_F(TestTools, testTransformValues)
{
using openvdb::CoordBBox;
Expand Down
Loading