Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Actually throw bad_alloc from cuda_cub::malloc. #1046

Merged
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
2 changes: 1 addition & 1 deletion thrust/system/cuda/detail/malloc_and_free.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void *malloc(execution_policy<DerivedPolicy> &, std::size_t n)
if(status != cudaSuccess)
{
cudaGetLastError(); // Clear global CUDA error state.
thrust::system::detail::bad_alloc(thrust::cuda_category().message(status).c_str());
throw thrust::system::detail::bad_alloc(thrust::cuda_category().message(status).c_str());
}
#else
result = thrust::raw_pointer_cast(thrust::malloc(thrust::seq, n));
Expand Down