Thrust
|
#include <thrust/execution_policy.h>
device_execution_policy
is the base class for all Thrust parallel execution policies which are derived from Thrust's default device backend system configured with the THRUST_DEVICE_SYSTEM
macro.
Custom user-defined backends which wish to inherit the functionality of Thrust's device backend system should derive a policy from this type in order to interoperate with Thrust algorithm dispatch.
The following code snippet demonstrates how to derive a standalone custom execution policy from thrust::device_execution_policy
to implement a backend which specializes for_each
while inheriting the behavior of every other algorithm from the device system: