Skip to content

Commit a4d4c5f

Browse files
authored
Merge pull request #1550 from brechtvl/fix-nanovdb10-hip
Fix NanoVDB build errors with HIP on Linux
2 parents 144c2a6 + f068ce6 commit a4d4c5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nanovdb/nanovdb/NanoVDB.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ __hostdev__ static inline uint32_t FindLowestOn(uint64_t v)
18771877
{
18781878
NANOVDB_ASSERT(v);
18791879
#if (defined(__CUDA_ARCH__) || defined(__HIP__)) && defined(NANOVDB_USE_INTRINSICS)
1880-
return __ffsll(v);
1880+
return __ffsll(static_cast<unsigned long long int>(v));
18811881
#elif defined(_MSC_VER) && defined(NANOVDB_USE_INTRINSICS)
18821882
unsigned long index;
18831883
_BitScanForward64(&index, v);
@@ -2592,7 +2592,7 @@ class Grid : private GridData
25922592
///
25932593
/// @note This method is only defined for IndexGrid = NanoGrid<ValueIndex>
25942594
template <typename T = BuildType>
2595-
__hostdev__ typename enable_if<is_same<T, ValueIndex>::value, uint64_t>::type valueCount() const {return DataType::mData1;}
2595+
__hostdev__ typename enable_if<is_same<T, ValueIndex>::value, const uint64_t&>::type valueCount() const {return DataType::mData1;}
25962596

25972597
/// @brief Return a const reference to the tree
25982598
__hostdev__ const TreeT& tree() const { return *reinterpret_cast<const TreeT*>(this->treePtr()); }

0 commit comments

Comments
 (0)