-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify is_execution_policy test to reflect change in specification #1907
Conversation
I think that this PR is not exactly making the change suggested by the change in the specification. This PR just changes the namespace we are |
The PR is only inserting Although I agree that it probably makes sense to test both |
Oh whoops yes my mistake. My brain short circuited and made a bad assumption. Sorry about that. It is probably enough to have a small check of the execution namespace just that they are present, perhaps not a full copy of the test again for both namespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this mostly LGTM after some small test of presence of the traits directly in the execution
namespace too.
I restructured the test a bit and it now checks for the traits in both the I believe this newer version simplifies the code which results in a smaller set of changes. |
Yes I like this much better, let me take a closer look but on first inspection it looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending green CI
test/general/test_policies.pass.cpp
Outdated
template<typename Policy> | ||
void assert_is_execution_policy() | ||
{ | ||
static_assert(oneapi::dpl::is_execution_policy<Policy>::value, "wrong result for oneapi::dpl::is_execution_policy"); | ||
static_assert(oneapi::dpl::is_execution_policy_v<Policy>, "wrong result for oneapi::dpl::is_execution_policy_v"); | ||
static_assert(oneapi::dpl::execution::is_execution_policy<Policy>::value, "wrong result for oneapi::dpl::execution::is_execution_policy"); | ||
static_assert(oneapi::dpl::execution::is_execution_policy_v<Policy>, "wrong result for oneapi::dpl::execution::is_execution_policy_v"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nitpick, this could be constexpr
.
Closes #1901.
The oneDPL specification has recently changed (uxlfoundation/oneAPI-spec#567) to move
is_execution_policy
andis_execution_policy_v
from theoneapi::dpl::execution
namespace tooneapi::dpl
. This PR changes the tests to use the struct in theoneapi::dpl
namespace for testing.