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

Commit

Permalink
Fix regression of temporary_allocator with non-CUDA back ends
Browse files Browse the repository at this point in the history
A recent cleanup of functions that have different code for host and device
accidentally broke temporary_allocator for non-CUDA back ends.  An #if
condition that protects a piece of code that only works with the CUDA back
end was incorrectly removed.  This fix adds that condition back in.
  • Loading branch information
dkolsen-pgi authored and alliepiper committed Apr 16, 2020
1 parent 6d40cf2 commit 915c270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thrust/detail/allocator/temporary_allocator.inl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ __host__ __device__
throw thrust::system::detail::bad_alloc("temporary_buffer::allocate: get_temporary_buffer failed");
#endif
} else {
#if THRUST_INCLUDE_DEVICE_CODE
#if THRUST_INCLUDE_DEVICE_CODE && THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA
thrust::system::cuda::detail::terminate_with_message("temporary_buffer::allocate: get_temporary_buffer failed");
#endif
}
Expand Down

0 comments on commit 915c270

Please sign in to comment.