{"action":"created","comment":{"url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/comments/138039994","pull_request_review_id":61783939,"id":138039994,"diff_hunk":"@@ -22,91 +25,85 @@ namespace gpu {\n template <typename T>\n class stack {\n     using value_type = T;\n-    using allocator = memory::managed_allocator<value_type>;\n-\n-    // The number of items of type value_type that can be stored in the stack\n-    unsigned capacity_;\n-\n-    // The number of items that have been stored\n-    unsigned size_;\n+    template <typename U>\n+    using allocator = memory::managed_allocator<U>;\n \n-    // Memory containing the value buffer\n-    // Stored in managed memory to facilitate host-side access of values\n-    // pushed from kernels on the device.\n-    value_type* data_;\n+    using base_type = stack_base<value_type>;\n+    base_type* base_;","path":"src/backends/gpu/stack.hpp","position":29,"original_position":29,"commit_id":"8a3c78340a0222f1b18d200c7900334e9fc50c6f","original_commit_id":"8a3c78340a0222f1b18d200c7900334e9fc50c6f","user":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"body":"Good idea.","created_at":"2017-09-11T11:07:33Z","updated_at":"2017-09-11T11:07:33Z","html_url":"https://github.com/eth-cscs/nestmc-proto/pull/345#discussion_r138039994","pull_request_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/comments/138039994"},"html":{"href":"https://github.com/eth-cscs/nestmc-proto/pull/345#discussion_r138039994"},"pull_request":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345"}},"in_reply_to_id":138024217},"pull_request":{"url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345","id":139589882,"html_url":"https://github.com/eth-cscs/nestmc-proto/pull/345","diff_url":"https://github.com/eth-cscs/nestmc-proto/pull/345.diff","patch_url":"https://github.com/eth-cscs/nestmc-proto/pull/345.patch","issue_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/345","number":345,"state":"open","locked":false,"title":"Stand alone CUDA compilation for threshold_watcher in gpu backend","user":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"body":"Refactor the threshold_watcher and stack data structures in the gpu backend so that they are amenable to separable compilation. To wit:\r\n- The `gpu::stack<T>` type had both `__host__` and `__device__` member functions, to allow dual use:\r\n    - make `gpu::stack<T>` have a host-only interface that wraps a POD type `gpu::stack_base<T>`\r\n    - implement a `push_back(stack_base, value)` method in `backends/gpu/kernels/stack.hpp` that is visible only to device code.\r\n- The `test_thresholds` kernel was moved from a header file to a .cu file that is , and\r\n    - template parameters were removed and the types provided by `backends/fvm_types.hpp` used\r\n    - a simple c function interface, callable from host side code, is defined in `backends/gpu/threshold_common.hpp`\r\n    - the c function is implemented in the cuda code, and is available at link time.\r\nIn this manner header files that define simple types and prototypes are used by both host\r\nand CUDA translation units. Hopefully this will allow the use of compilers that don't support\r\nmore recent C++ standards for the low-level cuda, with C++14/17 support in the front end.\r\n\r\nAlso, some small fixes:\r\n- simplify the `gpu::impl::padded_size` function (both to read and in terms of efficiency)\r\n- use `typeid` as the default for pretty-printing types in the memory back end.\r\n- update `test_gpu_stack` unit test to support new gpu stack interface.\r\n- fix bug in `test_spikes` unit test, which was not running the GPU back end in the cuda unit tests.","created_at":"2017-09-06T15:13:49Z","updated_at":"2017-09-11T11:07:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b2a9dd8378a9c87aea89bc4ccb714c88dc95a40","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345/commits","review_comments_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345/comments","review_comment_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/345/comments","statuses_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/statuses/8a3c78340a0222f1b18d200c7900334e9fc50c6f","head":{"label":"bcumming:feature/sep-gpu-thresh","ref":"feature/sep-gpu-thresh","sha":"8a3c78340a0222f1b18d200c7900334e9fc50c6f","user":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"repo":{"id":73794288,"name":"nestmc-proto","full_name":"bcumming/nestmc-proto","owner":{"login":"bcumming","id":384605,"avatar_url":"https://avatars0.githubusercontent.com/u/384605?v=4","gravatar_id":"","url":"https://api.github.com/users/bcumming","html_url":"https://github.com/bcumming","followers_url":"https://api.github.com/users/bcumming/followers","following_url":"https://api.github.com/users/bcumming/following{/other_user}","gists_url":"https://api.github.com/users/bcumming/gists{/gist_id}","starred_url":"https://api.github.com/users/bcumming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcumming/subscriptions","organizations_url":"https://api.github.com/users/bcumming/orgs","repos_url":"https://api.github.com/users/bcumming/repos","events_url":"https://api.github.com/users/bcumming/events{/privacy}","received_events_url":"https://api.github.com/users/bcumming/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcumming/nestmc-proto","description":"Prototype for the NestMC multi-compartment neural network simulator","fork":true,"url":"https://api.github.com/repos/bcumming/nestmc-proto","forks_url":"https://api.github.com/repos/bcumming/nestmc-proto/forks","keys_url":"https://api.github.com/repos/bcumming/nestmc-proto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcumming/nestmc-proto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcumming/nestmc-proto/teams","hooks_url":"https://api.github.com/repos/bcumming/nestmc-proto/hooks","issue_events_url":"https://api.github.com/repos/bcumming/nestmc-proto/issues/events{/number}","events_url":"https://api.github.com/repos/bcumming/nestmc-proto/events","assignees_url":"https://api.github.com/repos/bcumming/nestmc-proto/assignees{/user}","branches_url":"https://api.github.com/repos/bcumming/nestmc-proto/branches{/branch}","tags_url":"https://api.github.com/repos/bcumming/nestmc-proto/tags","blobs_url":"https://api.github.com/repos/bcumming/nestmc-proto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcumming/nestmc-proto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcumming/nestmc-proto/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcumming/nestmc-proto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcumming/nestmc-proto/statuses/{sha}","languages_url":"https://api.github.com/repos/bcumming/nestmc-proto/languages","stargazers_url":"https://api.github.com/repos/bcumming/nestmc-proto/stargazers","contributors_url":"https://api.github.com/repos/bcumming/nestmc-proto/contributors","subscribers_url":"https://api.github.com/repos/bcumming/nestmc-proto/subscribers","subscription_url":"https://api.github.com/repos/bcumming/nestmc-proto/subscription","commits_url":"https://api.github.com/repos/bcumming/nestmc-proto/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcumming/nestmc-proto/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcumming/nestmc-proto/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcumming/nestmc-proto/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcumming/nestmc-proto/contents/{+path}","compare_url":"https://api.github.com/repos/bcumming/nestmc-proto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcumming/nestmc-proto/merges","archive_url":"https://api.github.com/repos/bcumming/nestmc-proto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcumming/nestmc-proto/downloads","issues_url":"https://api.github.com/repos/bcumming/nestmc-proto/issues{/number}","pulls_url":"https://api.github.com/repos/bcumming/nestmc-proto/pulls{/number}","milestones_url":"https://api.github.com/repos/bcumming/nestmc-proto/milestones{/number}","notifications_url":"https://api.github.com/repos/bcumming/nestmc-proto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcumming/nestmc-proto/labels{/name}","releases_url":"https://api.github.com/repos/bcumming/nestmc-proto/releases{/id}","deployments_url":"https://api.github.com/repos/bcumming/nestmc-proto/deployments","created_at":"2016-11-15T08:47:50Z","updated_at":"2016-11-15T08:47:52Z","pushed_at":"2017-09-11T08:29:18Z","git_url":"git://github.com/bcumming/nestmc-proto.git","ssh_url":"git@github.com:bcumming/nestmc-proto.git","clone_url":"https://github.com/bcumming/nestmc-proto.git","svn_url":"https://github.com/bcumming/nestmc-proto","homepage":"https://eth-cscs.github.io/nestmc/","size":4198,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"eth-cscs:master","ref":"master","sha":"137c5b5fd54659c7f704ef6d8714a9f25d806179","user":{"login":"eth-cscs","id":5744410,"avatar_url":"https://avatars0.githubusercontent.com/u/5744410?v=4","gravatar_id":"","url":"https://api.github.com/users/eth-cscs","html_url":"https://github.com/eth-cscs","followers_url":"https://api.github.com/users/eth-cscs/followers","following_url":"https://api.github.com/users/eth-cscs/following{/other_user}","gists_url":"https://api.github.com/users/eth-cscs/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-cscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-cscs/subscriptions","organizations_url":"https://api.github.com/users/eth-cscs/orgs","repos_url":"https://api.github.com/users/eth-cscs/repos","events_url":"https://api.github.com/users/eth-cscs/events{/privacy}","received_events_url":"https://api.github.com/users/eth-cscs/received_events","type":"Organization","site_admin":false},"repo":{"id":69863074,"name":"nestmc-proto","full_name":"eth-cscs/nestmc-proto","owner":{"login":"eth-cscs","id":5744410,"avatar_url":"https://avatars0.githubusercontent.com/u/5744410?v=4","gravatar_id":"","url":"https://api.github.com/users/eth-cscs","html_url":"https://github.com/eth-cscs","followers_url":"https://api.github.com/users/eth-cscs/followers","following_url":"https://api.github.com/users/eth-cscs/following{/other_user}","gists_url":"https://api.github.com/users/eth-cscs/gists{/gist_id}","starred_url":"https://api.github.com/users/eth-cscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eth-cscs/subscriptions","organizations_url":"https://api.github.com/users/eth-cscs/orgs","repos_url":"https://api.github.com/users/eth-cscs/repos","events_url":"https://api.github.com/users/eth-cscs/events{/privacy}","received_events_url":"https://api.github.com/users/eth-cscs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eth-cscs/nestmc-proto","description":"Prototype for the NestMC multi-compartment neural network simulator","fork":false,"url":"https://api.github.com/repos/eth-cscs/nestmc-proto","forks_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/forks","keys_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/teams","hooks_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/hooks","issue_events_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/events{/number}","events_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/events","assignees_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/assignees{/user}","branches_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/branches{/branch}","tags_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/tags","blobs_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/git/refs{/sha}","trees_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/statuses/{sha}","languages_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/languages","stargazers_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/stargazers","contributors_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/contributors","subscribers_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/subscribers","subscription_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/subscription","commits_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/commits{/sha}","git_commits_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/git/commits{/sha}","comments_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/comments{/number}","issue_comment_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/comments{/number}","contents_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/contents/{+path}","compare_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/merges","archive_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/downloads","issues_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues{/number}","pulls_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls{/number}","milestones_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/milestones{/number}","notifications_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/labels{/name}","releases_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/releases{/id}","deployments_url":"https://api.github.com/repos/eth-cscs/nestmc-proto/deployments","created_at":"2016-10-03T11:03:22Z","updated_at":"2017-08-28T13:21:45Z","pushed_at":"2017-09-11T10:41:25Z","git_url":"git://github.com/eth-cscs/nestmc-proto.git","ssh_url":"git@github.com:eth-cscs/nestmc-proto.git","clone_url":"https://github.com/eth-cscs/nestmc-proto.git","svn_url":"https://github.com/eth-cscs/nestmc-proto","homepage":"https://eth-cscs.github.io/nestmc/","size":2754,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":73,"forks":11,"open_issues":73,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345"},"html":{"href":"https://github.com/eth-cscs/nestmc-proto/pull/345"},"issue":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/345"},"comments":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/issues/345/comments"},"review_comments":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345/comments"},"review_comment":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/pulls/345/commits"},"statuses":{"href":"https://api.github.com/repos/eth-cscs/nestmc-proto/statuses/8a3c78340a0222f1b18d200c7900334e9fc50c6f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bcumming"}}