{"action":"created","comment":{"url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/comments/154310079","pull_request_review_id":80453557,"id":154310079,"diff_hunk":"@@ -170,6 +170,78 @@ TEST(pointer_mapper, reuse_ptr) {\n   }\n }\n \n+TEST(pointer_mapper, do_not_reuse_ptr) {\n+  PointerMapper pMap;\n+  {\n+    ASSERT_EQ(pMap.count(), 0u);\n+\n+    // First we insert a large buffer\n+    void *initial = SYCLmalloc(100 * sizeof(int), pMap);\n+    ASSERT_NE(initial, nullptr);\n+    ASSERT_FALSE(PointerMapper::is_nullptr(initial));\n+    ASSERT_EQ(pMap.count(), 1u);\n+\n+    // Now we insert a small one, that could have been reused\n+    void *not_reused = SYCLmalloc(10 * sizeof(int), pMap);\n+    ASSERT_NE(not_reused, nullptr);\n+    ASSERT_FALSE(PointerMapper::is_nullptr(not_reused));\n+    ASSERT_EQ(pMap.count(), 2u);\n+\n+    // Another large buffer\n+    void *end = SYCLmalloc(100 * sizeof(int), pMap);\n+    ASSERT_NE(end, nullptr);\n+    ASSERT_FALSE(PointerMapper::is_nullptr(end));\n+    ASSERT_EQ(pMap.count(), 3u);\n+\n+    // We free the intermediate one and forbit it to be reuse","path":"tests/vptr/basic.cc","position":27,"original_position":27,"commit_id":"e104b07de558b38e7e7fd0eecca12c7b204e2350","original_commit_id":"e104b07de558b38e7e7fd0eecca12c7b204e2350","user":{"login":"Rbiessy","id":33024478,"avatar_url":"https://avatars3.githubusercontent.com/u/33024478?v=4","gravatar_id":"","url":"https://api.github.com/users/Rbiessy","html_url":"https://github.com/Rbiessy","followers_url":"https://api.github.com/users/Rbiessy/followers","following_url":"https://api.github.com/users/Rbiessy/following{/other_user}","gists_url":"https://api.github.com/users/Rbiessy/gists{/gist_id}","starred_url":"https://api.github.com/users/Rbiessy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rbiessy/subscriptions","organizations_url":"https://api.github.com/users/Rbiessy/orgs","repos_url":"https://api.github.com/users/Rbiessy/repos","events_url":"https://api.github.com/users/Rbiessy/events{/privacy}","received_events_url":"https://api.github.com/users/Rbiessy/received_events","type":"User","site_admin":false},"body":"Oops. Maybe \"reused\" also?","created_at":"2017-12-01T10:12:03Z","updated_at":"2017-12-01T10:12:03Z","html_url":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67#discussion_r154310079","pull_request_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/comments/154310079"},"html":{"href":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67#discussion_r154310079"},"pull_request":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67"}},"in_reply_to_id":154301295},"pull_request":{"url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67","id":155581338,"html_url":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67","diff_url":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67.diff","patch_url":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67.patch","issue_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/67","number":67,"state":"open","locked":false,"title":"Add method release_pointer to vptr","user":{"login":"Rbiessy","id":33024478,"avatar_url":"https://avatars3.githubusercontent.com/u/33024478?v=4","gravatar_id":"","url":"https://api.github.com/users/Rbiessy","html_url":"https://github.com/Rbiessy","followers_url":"https://api.github.com/users/Rbiessy/followers","following_url":"https://api.github.com/users/Rbiessy/following{/other_user}","gists_url":"https://api.github.com/users/Rbiessy/gists{/gist_id}","starred_url":"https://api.github.com/users/Rbiessy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rbiessy/subscriptions","organizations_url":"https://api.github.com/users/Rbiessy/orgs","repos_url":"https://api.github.com/users/Rbiessy/repos","events_url":"https://api.github.com/users/Rbiessy/events{/privacy}","received_events_url":"https://api.github.com/users/Rbiessy/received_events","type":"User","site_admin":false},"body":"The idea is to allow the user to remove pointers without reusing them.\r\nIt is particularly useful for sub-buffers because we don't want to keep their virtual pointer. With that it is possible to use Eigen with sub-buffers.\r\n\r\nI am not too sure about the method name. Maybe it would make more sense to swap it with the existing remove_pointer (i.e. release_pointer allow to re-use the pointer but remove_pointer does not)?. I'll make sure Eigen synchronises with the latest changes we make here.","created_at":"2017-11-30T11:19:53Z","updated_at":"2017-12-01T10:12:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"875532872cd6c8f05101d8ab658a790232ea027d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67/commits","review_comments_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67/comments","review_comment_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/67/comments","statuses_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/statuses/e104b07de558b38e7e7fd0eecca12c7b204e2350","head":{"label":"Rbiessy:vptr","ref":"vptr","sha":"e104b07de558b38e7e7fd0eecca12c7b204e2350","user":{"login":"Rbiessy","id":33024478,"avatar_url":"https://avatars3.githubusercontent.com/u/33024478?v=4","gravatar_id":"","url":"https://api.github.com/users/Rbiessy","html_url":"https://github.com/Rbiessy","followers_url":"https://api.github.com/users/Rbiessy/followers","following_url":"https://api.github.com/users/Rbiessy/following{/other_user}","gists_url":"https://api.github.com/users/Rbiessy/gists{/gist_id}","starred_url":"https://api.github.com/users/Rbiessy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rbiessy/subscriptions","organizations_url":"https://api.github.com/users/Rbiessy/orgs","repos_url":"https://api.github.com/users/Rbiessy/repos","events_url":"https://api.github.com/users/Rbiessy/events{/privacy}","received_events_url":"https://api.github.com/users/Rbiessy/received_events","type":"User","site_admin":false},"repo":{"id":110703757,"name":"computecpp-sdk","full_name":"Rbiessy/computecpp-sdk","owner":{"login":"Rbiessy","id":33024478,"avatar_url":"https://avatars3.githubusercontent.com/u/33024478?v=4","gravatar_id":"","url":"https://api.github.com/users/Rbiessy","html_url":"https://github.com/Rbiessy","followers_url":"https://api.github.com/users/Rbiessy/followers","following_url":"https://api.github.com/users/Rbiessy/following{/other_user}","gists_url":"https://api.github.com/users/Rbiessy/gists{/gist_id}","starred_url":"https://api.github.com/users/Rbiessy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rbiessy/subscriptions","organizations_url":"https://api.github.com/users/Rbiessy/orgs","repos_url":"https://api.github.com/users/Rbiessy/repos","events_url":"https://api.github.com/users/Rbiessy/events{/privacy}","received_events_url":"https://api.github.com/users/Rbiessy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rbiessy/computecpp-sdk","description":"Collection of samples, documentation and utilities for using ComputeCpp, Codeplay's beta SYCL implementation","fork":true,"url":"https://api.github.com/repos/Rbiessy/computecpp-sdk","forks_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/forks","keys_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/teams","hooks_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/hooks","issue_events_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/events","assignees_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/tags","blobs_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/languages","stargazers_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/stargazers","contributors_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/contributors","subscribers_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/subscribers","subscription_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/subscription","commits_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/merges","archive_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/downloads","issues_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Rbiessy/computecpp-sdk/deployments","created_at":"2017-11-14T14:53:40Z","updated_at":"2017-11-14T14:53:42Z","pushed_at":"2017-11-30T18:35:58Z","git_url":"git://github.com/Rbiessy/computecpp-sdk.git","ssh_url":"git@github.com:Rbiessy/computecpp-sdk.git","clone_url":"https://github.com/Rbiessy/computecpp-sdk.git","svn_url":"https://github.com/Rbiessy/computecpp-sdk","homepage":null,"size":12618,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codeplaysoftware:master","ref":"master","sha":"4b90e22c18f24451e901e557166a7489b179196f","user":{"login":"codeplaysoftware","id":7440916,"avatar_url":"https://avatars0.githubusercontent.com/u/7440916?v=4","gravatar_id":"","url":"https://api.github.com/users/codeplaysoftware","html_url":"https://github.com/codeplaysoftware","followers_url":"https://api.github.com/users/codeplaysoftware/followers","following_url":"https://api.github.com/users/codeplaysoftware/following{/other_user}","gists_url":"https://api.github.com/users/codeplaysoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/codeplaysoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeplaysoftware/subscriptions","organizations_url":"https://api.github.com/users/codeplaysoftware/orgs","repos_url":"https://api.github.com/users/codeplaysoftware/repos","events_url":"https://api.github.com/users/codeplaysoftware/events{/privacy}","received_events_url":"https://api.github.com/users/codeplaysoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":67422797,"name":"computecpp-sdk","full_name":"codeplaysoftware/computecpp-sdk","owner":{"login":"codeplaysoftware","id":7440916,"avatar_url":"https://avatars0.githubusercontent.com/u/7440916?v=4","gravatar_id":"","url":"https://api.github.com/users/codeplaysoftware","html_url":"https://github.com/codeplaysoftware","followers_url":"https://api.github.com/users/codeplaysoftware/followers","following_url":"https://api.github.com/users/codeplaysoftware/following{/other_user}","gists_url":"https://api.github.com/users/codeplaysoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/codeplaysoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeplaysoftware/subscriptions","organizations_url":"https://api.github.com/users/codeplaysoftware/orgs","repos_url":"https://api.github.com/users/codeplaysoftware/repos","events_url":"https://api.github.com/users/codeplaysoftware/events{/privacy}","received_events_url":"https://api.github.com/users/codeplaysoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeplaysoftware/computecpp-sdk","description":"Collection of samples, documentation and utilities for using ComputeCpp, Codeplay's beta SYCL implementation","fork":false,"url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk","forks_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/forks","keys_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/teams","hooks_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/hooks","issue_events_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/events","assignees_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/tags","blobs_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/languages","stargazers_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/stargazers","contributors_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/contributors","subscribers_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/subscribers","subscription_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/subscription","commits_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/merges","archive_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/downloads","issues_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/labels{/name}","releases_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/deployments","created_at":"2016-09-05T13:21:11Z","updated_at":"2017-12-01T00:59:02Z","pushed_at":"2017-11-30T18:35:59Z","git_url":"git://github.com/codeplaysoftware/computecpp-sdk.git","ssh_url":"git@github.com:codeplaysoftware/computecpp-sdk.git","clone_url":"https://github.com/codeplaysoftware/computecpp-sdk.git","svn_url":"https://github.com/codeplaysoftware/computecpp-sdk","homepage":null,"size":12648,"stargazers_count":79,"watchers_count":79,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":28,"open_issues":6,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67"},"html":{"href":"https://github.com/codeplaysoftware/computecpp-sdk/pull/67"},"issue":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/67"},"comments":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/codeplaysoftware/computecpp-sdk/statuses/e104b07de558b38e7e7fd0eecca12c7b204e2350"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Rbiessy"}}