Skip to content
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

Add missing specializations in execution policies #2141

Merged
merged 3 commits into from May 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions hpx/parallel/execution_policy.hpp
Expand Up @@ -1410,6 +1410,11 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
: std::true_type
{};

template <typename Executor, typename Parameters>
struct is_parallel_execution_policy<parallel_execution_policy_shim<Executor, Parameters>>
: std::true_type
{};

template <>
struct is_parallel_execution_policy<parallel_vector_execution_policy>
: std::true_type
Expand All @@ -1418,6 +1423,11 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
template <>
struct is_parallel_execution_policy<parallel_task_execution_policy>
: std::true_type
{};

template <typename Executor, typename Parameters>
struct is_parallel_execution_policy<parallel_task_execution_policy_shim<Executor, Parameters>>
: std::true_type
{};
/// \endcond
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parallel_task_... policies are 'parallel' as well. Could you add those while you're at it as well, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now 'parallel' are parallel, parallel_shim, parallel_task, parallel_task_shim and parallel_vector.
Which other am I missing in is_parallel_execution_policy? Or did you mean something else by 'add'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I meant, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already there, I think the diff was misleading ;-)

}
Expand Down Expand Up @@ -1508,10 +1518,22 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
: std::true_type
{};

template <typename Executor, typename Parameters>
struct is_async_execution_policy<
sequential_execution_policy_shim<Executor, Parameters> >
: std::true_type
{};
Copy link
Member

@hkaiser hkaiser May 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably wanted to add the sequential_task_execution_policy_shim<> instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake, fixed!


template <>
struct is_async_execution_policy<parallel_task_execution_policy>
: std::true_type
{};

template <typename Executor, typename Parameters>
struct is_async_execution_policy<
parallel_execution_policy_shim<Executor, Parameters> >
: std::true_type
{};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, should read parallel_task_execution_policy_shim<> instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake, fixed!

/// \endcond
}

Expand Down