Thrust
|
#include <thrust/execution_policy.h>
host_execution_policy
is the base class for all Thrust parallel execution policies which are derived from Thrust's default host backend system configured with the THRUST_HOST_SYSTEM
macro.
Custom user-defined backends which wish to inherit the functionality of Thrust's host 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::host_execution_policy
to implement a backend which specializes for_each
while inheriting the behavior of every other algorithm from the host system: