{"action":"created","comment":{"url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/comments/66450907","id":66450907,"diff_hunk":"@@ -162,24 +163,23 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)\n         ///                     execution of the parallel algorithm the\n         ///                     returned execution policy is used with.\n         ///\n-        /// \\note Requires: is_executor_parameters<Parameters>::value is true\n+        /// \\note Requires: all parameters are executor_parameters,\n+        ///                 different parameter types can't be duplicated\n         ///\n         /// \\returns The new sequential_task_execution_policy\n         ///\n-        template <typename Parameters>\n+        template <typename... Parameters, typename ParametersType =\n+            typename hpx::parallel::executor_parameters_join<Parameters...>::type>","path":"hpx/parallel/execution_policy.hpp","position":20,"original_position":20,"commit_id":"896716822c1d4c5329f0b706ea3282f9ad746156","original_commit_id":"896716822c1d4c5329f0b706ea3282f9ad746156","user":{"login":"hkaiser","id":568063,"avatar_url":"https://avatars.githubusercontent.com/u/568063?v=3","gravatar_id":"","url":"https://api.github.com/users/hkaiser","html_url":"https://github.com/hkaiser","followers_url":"https://api.github.com/users/hkaiser/followers","following_url":"https://api.github.com/users/hkaiser/following{/other_user}","gists_url":"https://api.github.com/users/hkaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/hkaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkaiser/subscriptions","organizations_url":"https://api.github.com/users/hkaiser/orgs","repos_url":"https://api.github.com/users/hkaiser/repos","events_url":"https://api.github.com/users/hkaiser/events{/privacy}","received_events_url":"https://api.github.com/users/hkaiser/received_events","type":"User","site_admin":false},"body":"What's the rationale for making the `ParametersType` a template argument? Would it be sufficient to directly use the `hpx::parallel::executor_parameters_join<Parameters...>` in the body of this function?","created_at":"2016-06-09T14:26:51Z","updated_at":"2016-06-09T14:26:51Z","html_url":"https://github.com/STEllAR-GROUP/hpx/pull/2204#discussion_r66450907","pull_request_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204","_links":{"self":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/comments/66450907"},"html":{"href":"https://github.com/STEllAR-GROUP/hpx/pull/2204#discussion_r66450907"},"pull_request":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204"}}},"pull_request":{"url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204","id":72957627,"html_url":"https://github.com/STEllAR-GROUP/hpx/pull/2204","diff_url":"https://github.com/STEllAR-GROUP/hpx/pull/2204.diff","patch_url":"https://github.com/STEllAR-GROUP/hpx/pull/2204.patch","issue_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/2204","number":2204,"state":"open","locked":false,"title":"Variadic executor parameters","user":{"login":"mcopik","id":720619,"avatar_url":"https://avatars.githubusercontent.com/u/720619?v=3","gravatar_id":"","url":"https://api.github.com/users/mcopik","html_url":"https://github.com/mcopik","followers_url":"https://api.github.com/users/mcopik/followers","following_url":"https://api.github.com/users/mcopik/following{/other_user}","gists_url":"https://api.github.com/users/mcopik/gists{/gist_id}","starred_url":"https://api.github.com/users/mcopik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcopik/subscriptions","organizations_url":"https://api.github.com/users/mcopik/orgs","repos_url":"https://api.github.com/users/mcopik/repos","events_url":"https://api.github.com/users/mcopik/events{/privacy}","received_events_url":"https://api.github.com/users/mcopik/received_events","type":"User","site_admin":false},"body":"This is my first attempt to provide a syntax for multiple executor parameters passed through a variadic template. I'm not completely happy with this solution, maybe there is a better way to implement unwrapping, I tried to find a way with the least amount of code duplication (which is already an unsolvable problem in execution policies).\r\n\r\nThe implementation creates a single parameter through variadic inheritance, which obviously prohibits duplication of parameter types; an additional static_assert in constructor provides a better error information than a compiler complaining about ambiguous choice between functions. Another possible option could be to use boost::hana (since 1.61) and implement it using compile-time algorithms on a tuple. I don't see any other way.\r\n\r\nThe biggest trick was to implement a support for parameters passed as a reference wrapper (Boost or C++11). For that purpose we need an unwrapper which API exposes only methods defined in the wrapped parameter; solution similar to executor_parameter_traits would cause another name clash between different parameters. Unfortunately, the problem is defining functions at type construction, not function overload, hence we can't use SFINAE directly. Just using a auto and decltype() with a fake template parameter is not sufficient. \r\n\r\nMy solution uses std::enable_if and creates different parameter types, where a tag is bound to specific methods; if executor parameters inherits from chunk tag, chunk size methods will be exposed etc. I couldn't use parameter traits directly, because it will always provide a default behaviour if a specific function doesn't exist -> duplication. The small benefit of this solution is clear ordering and documenting different types of parameters. \r\n\r\nI have found one solution which doesn't use separate tags: for every method a checker similar to traits is implemented - design is the same, but instead of running either the parameter function or default case, a constexpr boolean is exposed (true iff a method is present in type). But then we would have two huge code bases doing almost the same thing. Merging it requires rewriting whole traits, removing helpers and dispatching functions with an enable_if. I could implement this solution, but it seems that it would be a huge change in existing code base. ","created_at":"2016-06-07T22:12:35Z","updated_at":"2016-06-09T14:26:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"903f1f1dc94c6bbc868e632dfc5970689bf618a6","assignee":null,"milestone":{"url":"https://api.github.com/repos/STEllAR-GROUP/hpx/milestones/25","html_url":"https://github.com/STEllAR-GROUP/hpx/milestones/0.9.12","labels_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/milestones/25/labels","id":1380490,"number":25,"title":"0.9.12","description":"","creator":{"login":"hkaiser","id":568063,"avatar_url":"https://avatars.githubusercontent.com/u/568063?v=3","gravatar_id":"","url":"https://api.github.com/users/hkaiser","html_url":"https://github.com/hkaiser","followers_url":"https://api.github.com/users/hkaiser/followers","following_url":"https://api.github.com/users/hkaiser/following{/other_user}","gists_url":"https://api.github.com/users/hkaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/hkaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkaiser/subscriptions","organizations_url":"https://api.github.com/users/hkaiser/orgs","repos_url":"https://api.github.com/users/hkaiser/repos","events_url":"https://api.github.com/users/hkaiser/events{/privacy}","received_events_url":"https://api.github.com/users/hkaiser/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":334,"state":"open","created_at":"2015-10-27T22:19:24Z","updated_at":"2016-06-09T11:55:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204/commits","review_comments_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204/comments","review_comment_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/2204/comments","statuses_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/statuses/896716822c1d4c5329f0b706ea3282f9ad746156","head":{"label":"mcopik:variadic_executor_params","ref":"variadic_executor_params","sha":"896716822c1d4c5329f0b706ea3282f9ad746156","user":{"login":"mcopik","id":720619,"avatar_url":"https://avatars.githubusercontent.com/u/720619?v=3","gravatar_id":"","url":"https://api.github.com/users/mcopik","html_url":"https://github.com/mcopik","followers_url":"https://api.github.com/users/mcopik/followers","following_url":"https://api.github.com/users/mcopik/following{/other_user}","gists_url":"https://api.github.com/users/mcopik/gists{/gist_id}","starred_url":"https://api.github.com/users/mcopik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcopik/subscriptions","organizations_url":"https://api.github.com/users/mcopik/orgs","repos_url":"https://api.github.com/users/mcopik/repos","events_url":"https://api.github.com/users/mcopik/events{/privacy}","received_events_url":"https://api.github.com/users/mcopik/received_events","type":"User","site_admin":false},"repo":{"id":32345472,"name":"hpx","full_name":"mcopik/hpx","owner":{"login":"mcopik","id":720619,"avatar_url":"https://avatars.githubusercontent.com/u/720619?v=3","gravatar_id":"","url":"https://api.github.com/users/mcopik","html_url":"https://github.com/mcopik","followers_url":"https://api.github.com/users/mcopik/followers","following_url":"https://api.github.com/users/mcopik/following{/other_user}","gists_url":"https://api.github.com/users/mcopik/gists{/gist_id}","starred_url":"https://api.github.com/users/mcopik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcopik/subscriptions","organizations_url":"https://api.github.com/users/mcopik/orgs","repos_url":"https://api.github.com/users/mcopik/repos","events_url":"https://api.github.com/users/mcopik/events{/privacy}","received_events_url":"https://api.github.com/users/mcopik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcopik/hpx","description":"A general purpose C++ runtime system for parallel and distributed applications of any scale","fork":true,"url":"https://api.github.com/repos/mcopik/hpx","forks_url":"https://api.github.com/repos/mcopik/hpx/forks","keys_url":"https://api.github.com/repos/mcopik/hpx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcopik/hpx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcopik/hpx/teams","hooks_url":"https://api.github.com/repos/mcopik/hpx/hooks","issue_events_url":"https://api.github.com/repos/mcopik/hpx/issues/events{/number}","events_url":"https://api.github.com/repos/mcopik/hpx/events","assignees_url":"https://api.github.com/repos/mcopik/hpx/assignees{/user}","branches_url":"https://api.github.com/repos/mcopik/hpx/branches{/branch}","tags_url":"https://api.github.com/repos/mcopik/hpx/tags","blobs_url":"https://api.github.com/repos/mcopik/hpx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcopik/hpx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcopik/hpx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcopik/hpx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcopik/hpx/statuses/{sha}","languages_url":"https://api.github.com/repos/mcopik/hpx/languages","stargazers_url":"https://api.github.com/repos/mcopik/hpx/stargazers","contributors_url":"https://api.github.com/repos/mcopik/hpx/contributors","subscribers_url":"https://api.github.com/repos/mcopik/hpx/subscribers","subscription_url":"https://api.github.com/repos/mcopik/hpx/subscription","commits_url":"https://api.github.com/repos/mcopik/hpx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcopik/hpx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcopik/hpx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcopik/hpx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcopik/hpx/contents/{+path}","compare_url":"https://api.github.com/repos/mcopik/hpx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcopik/hpx/merges","archive_url":"https://api.github.com/repos/mcopik/hpx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcopik/hpx/downloads","issues_url":"https://api.github.com/repos/mcopik/hpx/issues{/number}","pulls_url":"https://api.github.com/repos/mcopik/hpx/pulls{/number}","milestones_url":"https://api.github.com/repos/mcopik/hpx/milestones{/number}","notifications_url":"https://api.github.com/repos/mcopik/hpx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcopik/hpx/labels{/name}","releases_url":"https://api.github.com/repos/mcopik/hpx/releases{/id}","deployments_url":"https://api.github.com/repos/mcopik/hpx/deployments","created_at":"2015-03-16T18:43:46Z","updated_at":"2016-04-13T20:00:30Z","pushed_at":"2016-06-08T22:30:27Z","git_url":"git://github.com/mcopik/hpx.git","ssh_url":"git@github.com:mcopik/hpx.git","clone_url":"https://github.com/mcopik/hpx.git","svn_url":"https://github.com/mcopik/hpx","homepage":"http://stellar-group.org/libraries/hpx","size":388574,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"STEllAR-GROUP:master","ref":"master","sha":"f25a8b1fc2e76524c8a4604753463202024ed22e","user":{"login":"STEllAR-GROUP","id":1780988,"avatar_url":"https://avatars.githubusercontent.com/u/1780988?v=3","gravatar_id":"","url":"https://api.github.com/users/STEllAR-GROUP","html_url":"https://github.com/STEllAR-GROUP","followers_url":"https://api.github.com/users/STEllAR-GROUP/followers","following_url":"https://api.github.com/users/STEllAR-GROUP/following{/other_user}","gists_url":"https://api.github.com/users/STEllAR-GROUP/gists{/gist_id}","starred_url":"https://api.github.com/users/STEllAR-GROUP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STEllAR-GROUP/subscriptions","organizations_url":"https://api.github.com/users/STEllAR-GROUP/orgs","repos_url":"https://api.github.com/users/STEllAR-GROUP/repos","events_url":"https://api.github.com/users/STEllAR-GROUP/events{/privacy}","received_events_url":"https://api.github.com/users/STEllAR-GROUP/received_events","type":"Organization","site_admin":false},"repo":{"id":4455628,"name":"hpx","full_name":"STEllAR-GROUP/hpx","owner":{"login":"STEllAR-GROUP","id":1780988,"avatar_url":"https://avatars.githubusercontent.com/u/1780988?v=3","gravatar_id":"","url":"https://api.github.com/users/STEllAR-GROUP","html_url":"https://github.com/STEllAR-GROUP","followers_url":"https://api.github.com/users/STEllAR-GROUP/followers","following_url":"https://api.github.com/users/STEllAR-GROUP/following{/other_user}","gists_url":"https://api.github.com/users/STEllAR-GROUP/gists{/gist_id}","starred_url":"https://api.github.com/users/STEllAR-GROUP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STEllAR-GROUP/subscriptions","organizations_url":"https://api.github.com/users/STEllAR-GROUP/orgs","repos_url":"https://api.github.com/users/STEllAR-GROUP/repos","events_url":"https://api.github.com/users/STEllAR-GROUP/events{/privacy}","received_events_url":"https://api.github.com/users/STEllAR-GROUP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/STEllAR-GROUP/hpx","description":"A general purpose C++ runtime system for parallel and distributed applications of any scale","fork":false,"url":"https://api.github.com/repos/STEllAR-GROUP/hpx","forks_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/forks","keys_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/teams","hooks_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/hooks","issue_events_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/events{/number}","events_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/events","assignees_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/assignees{/user}","branches_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/branches{/branch}","tags_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/tags","blobs_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/git/refs{/sha}","trees_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/statuses/{sha}","languages_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/languages","stargazers_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/stargazers","contributors_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/contributors","subscribers_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/subscribers","subscription_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/subscription","commits_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/commits{/sha}","git_commits_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/git/commits{/sha}","comments_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/comments{/number}","issue_comment_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/comments{/number}","contents_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/contents/{+path}","compare_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/merges","archive_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/downloads","issues_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues{/number}","pulls_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls{/number}","milestones_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/milestones{/number}","notifications_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/labels{/name}","releases_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/releases{/id}","deployments_url":"https://api.github.com/repos/STEllAR-GROUP/hpx/deployments","created_at":"2012-05-26T15:02:39Z","updated_at":"2016-06-06T06:49:47Z","pushed_at":"2016-06-09T14:02:01Z","git_url":"git://github.com/STEllAR-GROUP/hpx.git","ssh_url":"git@github.com:STEllAR-GROUP/hpx.git","clone_url":"https://github.com/STEllAR-GROUP/hpx.git","svn_url":"https://github.com/STEllAR-GROUP/hpx","homepage":"http://stellar-group.org/libraries/hpx","size":508180,"stargazers_count":458,"watchers_count":458,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":125,"mirror_url":null,"open_issues_count":110,"forks":125,"open_issues":110,"watchers":458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204"},"html":{"href":"https://github.com/STEllAR-GROUP/hpx/pull/2204"},"issue":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/2204"},"comments":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/issues/2204/comments"},"review_comments":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204/comments"},"review_comment":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/pulls/2204/commits"},"statuses":{"href":"https://api.github.com/repos/STEllAR-GROUP/hpx/statuses/896716822c1d4c5329f0b706ea3282f9ad746156"}}}}
{"actor":{"display_login":"hkaiser"}}