thrust::get_per_device_resource

Defined in thrust/per_device_resource.h

template<typename MR, typename DerivedPolicy>
MR *thrust::get_per_device_resource(const thrust::detail::execution_policy_base<DerivedPolicy> &system)

Returns a global instance of MR for the current device of the provided system.

Template Parameters

MR – type of a memory resource to get an instance from. Must be DefaultConstructible.

Parameters

system – execution policy for which the resource is requested.

Returns

a pointer to a global instance of MR for the current device.