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

Add Internal Function intersection_count_upper_bound #795

Merged
8 changes: 4 additions & 4 deletions cpp/include/cuspatial/detail/utility/device_atomics.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -267,20 +267,20 @@ __device__ inline float atomicMax(thrust::device_ptr<float> ptr, float val)
/**
* @brief Factory method to create atomic_ref from a thrust::device_reference
isVoid marked this conversation as resolved.
Show resolved Hide resolved
*/
template <typename T>
template <typename T, cuda::thread_scope Scope = cuda::thread_scope_device>
isVoid marked this conversation as resolved.
Show resolved Hide resolved
auto __device__ make_atomic_ref(thrust::device_reference<T> ref)
{
T& raw_ref = thrust::raw_reference_cast(ref);
return cuda::atomic_ref<T>{raw_ref};
return cuda::atomic_ref<T, Scope>{raw_ref};
}

/**
* @brief Factory method to create atomic_ref from raw reference
isVoid marked this conversation as resolved.
Show resolved Hide resolved
*/
template <typename T>
template <typename T, cuda::thread_scope Scope = cuda::thread_scope_device>
auto __device__ make_atomic_ref(T& ref)
{
return cuda::atomic_ref<T>{ref};
return cuda::atomic_ref<T, Scope>{ref};
}

} // namespace detail
Expand Down