Skip to content

Commit e079c70

Browse files
committed
Moved util/Simd.h to simd/Simd.h and fixed license
Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com>
1 parent d928399 commit e079c70

5 files changed

Lines changed: 13 additions & 14 deletions

File tree

openvdb/openvdb/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ set(OPENVDB_LIBRARY_THREAD_INCLUDE_FILES
601601
thread/Threading.h
602602
)
603603

604+
set(OPENVDB_LIBRARY_SIMD_INCLUDE_FILES
605+
simd/Simd.h
606+
)
607+
604608
list(APPEND OPENVDB_LIBRARY_MATH_INCLUDE_FILES
605609
${CMAKE_SOURCE_DIR}/ext/imath/openvdb/math/Half.h)
606610
list(APPEND OPENVDB_LIBRARY_SOURCE_FILES
@@ -811,6 +815,7 @@ install(FILES ${OPENVDB_LIBRARY_TOOLS_IMPL_INCLUDE_FILES} DESTINATION ${OPENVDB_
811815
install(FILES ${OPENVDB_LIBRARY_TREE_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/openvdb/tree)
812816
install(FILES ${OPENVDB_LIBRARY_UTIL_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/openvdb/util)
813817
install(FILES ${OPENVDB_LIBRARY_THREAD_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/openvdb/thread)
818+
install(FILES ${OPENVDB_LIBRARY_SIMD_INCLUDE_FILES} DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR}/openvdb/simd)
814819

815820
if(USE_VCL)
816821
install(DIRECTORY ${CMAKE_SOURCE_DIR}/ext/vcl/openvdb DESTINATION ${OPENVDB_INSTALL_INCLUDEDIR})

openvdb/openvdb/points/PointRasterizeSDF.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#include <openvdb/thread/Threading.h>
8080
#include <openvdb/util/NullInterrupter.h>
8181
#include <openvdb/util/Assert.h>
82-
#include <openvdb/util/Simd.h>
82+
#include <openvdb/simd/Simd.h>
8383

8484
#include <unordered_map>
8585

openvdb/openvdb/points/impl/PointRasterizeSDFImpl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ struct SignedDistanceFieldTransfer :
187187
#if OPENVDB_DISABLE_BATCHED_TRANSFERS
188188
return 1;
189189
#else
190-
using namespace openvdb::util;
191190
using NativeT = typename simd::SimdNativeT<RealT>::Type;
192191
return simd::SimdTraits<NativeT>::size;
193192
#endif
@@ -443,7 +442,6 @@ struct SphericalTransfer :
443442
const std::array<int64_t, BaseT::template GetBatchSize<Real>()>& points,
444443
const CoordBBox& bounds)
445444
{
446-
using namespace openvdb::util;
447445
using SimdT = typename simd::SimdT<RealT, Size>::Type;
448446
using SimdIT = typename simd::SimdT<int64_t, Size>::Type;
449447

@@ -542,8 +540,6 @@ struct SphericalTransfer :
542540
const IdT& ids,
543541
const CoordBBox& intersection)
544542
{
545-
using namespace openvdb::util;
546-
547543
OPENVDB_ASSERT(simd::horizontal_and(simd::is_finite(r)));
548544
OPENVDB_ASSERT(simd::horizontal_and(simd::is_finite(Px)));
549545
OPENVDB_ASSERT(simd::horizontal_and(simd::is_finite(Py)));
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright Contributors to the OpenVDB Project
2-
// SPDX-License-Identifier: MPL-2.0
2+
// SPDX-License-Identifier: Apache-2.0
33
///
44
/// @author Nick Avramoussis
55
///
@@ -9,14 +9,14 @@
99
/// proof the underlying SIMD wrapper in use, and to provide extended
1010
/// functionality (such as traits and matching tuple/scalar API for writing
1111
/// generic tools), manual SIMD usage should be restricted to the
12-
/// openvdb::util::simd namespace.
12+
/// openvdb::simd namespace.
1313
///
1414
/// @note OpenVDB currently supports SIMD usage of intel x86 intrinsics via
1515
/// Agner Fog's VCL wrapper library.
1616
///
1717

18-
#ifndef OPENVDB_UTIL_SIMD_HAS_BEEN_INCLUDED
19-
#define OPENVDB_UTIL_SIMD_HAS_BEEN_INCLUDED
18+
#ifndef OPENVDB_SIMD_SIMD_HAS_BEEN_INCLUDED
19+
#define OPENVDB_SIMD_SIMD_HAS_BEEN_INCLUDED
2020

2121
#include <openvdb/version.h>
2222
#include <openvdb/math/Tuple.h>
@@ -55,7 +55,6 @@
5555
namespace openvdb {
5656
OPENVDB_USE_VERSION_NAMESPACE
5757
namespace OPENVDB_VERSION_NAME {
58-
namespace util {
5958
namespace simd {
6059

6160
#ifdef OPENVDB_USE_VCL
@@ -355,7 +354,7 @@ template <typename T> struct SimdTraits; // fwd declare
355354
///
356355
/// template <typename T>
357356
/// T Lerp(const T a, const T b, const T t) {
358-
/// using namespace openvdb::util::simd;
357+
/// using namespace openvdb::simd;
359358
/// return add(mul(sub(T(1), t), a), mul(t, b));
360359
/// }
361360

@@ -614,8 +613,7 @@ inline int horizontal_count(const bool a) { return a ? 1 : 0; }
614613
#undef OPENVDB_ENABLE_IF_VCL
615614

616615
} // namespace simd
617-
} // namespace util
618616
} // namespace OPENVDB_VERSION_NAME
619617
} // namespace openvdb
620618

621-
#endif // OPENVDB_UTIL_SIMD_HAS_BEEN_INCLUDED
619+
#endif // OPENVDB_SIMD_SIMD_HAS_BEEN_INCLUDED

openvdb/openvdb/version.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
/* Denotes whether VDB was built with VCL support */
152152
#ifndef OPENVDB_USE_VCL
153153
#cmakedefine OPENVDB_USE_VCL
154-
// The namespace to use for VCL. See openvdb/util/Simd.h
154+
// The namespace to use for VCL. See openvdb/simd/Simd.h
155155
#define OPENVDB_VCL_NAMESPACE openvdb_ext_vcl
156156
#endif
157157

0 commit comments

Comments
 (0)