Replies: 1 comment 1 reply
-
Yes, distinguish between device_policy and other oneDPL policy types (the host policy in particular) would be useful. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
oneDPL provides a type trait to identify its execution policy types,
oneapi::dpl::is_execution_policy
. It is defined totrue
for both thedevice_policy
class template and the standard-aligned policy classes such asparallel_policy
.Is there a need for another trait that would distinguish between
device_policy
and other oneDPL policy types that operate on the host?Currently, there is no public API for this in oneDPL. The standard
std::is_same_v
trait seems insufficient or inconvenient for the purpose, becausedevice_policy
is a class template and not a type, while on the other side there are 4 standard-aligned policy types that would all need to be checked.Please comment if you think a special trait class/variable template for oneDPL device policies would be useful. Specific usage scenarios for it are especially welcome.
Beta Was this translation helpful? Give feedback.
All reactions