Thrust Integration

group thrust_integrations

Typedefs

template<typename T>
using device_vector = thrust::device_vector<T, rmm::mr::thrust_allocator<T>>

Alias for a thrust::device_vector that uses RMM for memory allocation.

using thrust_exec_policy_t = thrust::detail::execute_with_allocator<mr::thrust_allocator<char>, thrust::cuda_cub::execute_on_stream_base>

Synchronous execution policy for allocations using thrust.

using thrust_exec_policy_nosync_t = thrust_exec_policy_t

When used with Thrust < 1.16.0, thrust_exec_policy_nosync_t is an alias for thrust_exec_policy_t

using exec_policy_nosync = exec_policy

When used with Thrust < 1.16.0, exec_policy_nosync is an alias for exec_policy.

class exec_policy : public thrust_exec_policy_t
#include <exec_policy.hpp>

Helper class usable as a Thrust CUDA execution policy that uses RMM for temporary memory allocation on the specified stream.

Public Functions

inline explicit exec_policy(cuda_stream_view stream = cuda_stream_default, device_async_resource_ref mr = mr::get_current_device_resource())

Construct a new execution policy object.

Parameters:
  • stream – The stream on which to allocate temporary memory

  • mr – The resource to use for allocating temporary memory