{"action":"created","comment":{"url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/comments/173762941","pull_request_review_id":103002513,"id":173762941,"diff_hunk":"@@ -0,0 +1,92 @@\n+/*\n+ * Copyright (C) 2011-2018 Karlsruhe Institute of Technology\n+ *\n+ * This file is part of Ufo.\n+ *\n+ * This library is free software: you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation, either\n+ * version 3 of the License, or (at your option) any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+float compute_horizontal (global float *input,\n+                          int idx,\n+                          int idy,\n+                          int width) {\n+    int dx = 1;\n+    if (idx == width - 1) {\n+        dx = 0;\n+    } else if (idx == 0) {\n+        dx = 2;\n+    }\n+\n+    return 0.5f * (input[idy * width + idx + dx] - input[idy * width + idx + dx - 2]);\n+}\n+\n+float compute_vertical (global float *input,\n+                        int idx,\n+                        int idy,\n+                        int width,\n+                        int height) {\n+    int dy = 1;\n+    if (idy == height - 1) {\n+        dy = 0;\n+    } else if (idy == 0) {\n+        dy = 2;\n+    }\n+\n+    return 0.5f * (input[(idy + dy) * width + idx] - input[(idy + dy - 2) * width + idx]);\n+}\n+\n+kernel void DIRECTION_HORIZONTAL (global float *input,","path":"src/kernels/gradient.cl","position":null,"original_position":49,"commit_id":"ae6f274e759ff681eb643163bd40194f9eab14f5","original_commit_id":"7e1a1b8f6e4357b0f2ed1468af42f81d8b1a1d37","user":{"login":"matze","id":115270,"avatar_url":"https://avatars3.githubusercontent.com/u/115270?v=4","gravatar_id":"","url":"https://api.github.com/users/matze","html_url":"https://github.com/matze","followers_url":"https://api.github.com/users/matze/followers","following_url":"https://api.github.com/users/matze/following{/other_user}","gists_url":"https://api.github.com/users/matze/gists{/gist_id}","starred_url":"https://api.github.com/users/matze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matze/subscriptions","organizations_url":"https://api.github.com/users/matze/orgs","repos_url":"https://api.github.com/users/matze/repos","events_url":"https://api.github.com/users/matze/events{/privacy}","received_events_url":"https://api.github.com/users/matze/received_events","type":"User","site_admin":false},"body":"Yeah, looks ugly but I get your point.","created_at":"2018-03-12T11:19:22Z","updated_at":"2018-03-12T11:22:02Z","html_url":"https://github.com/ufo-kit/ufo-filters/pull/157#discussion_r173762941","pull_request_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/comments/173762941"},"html":{"href":"https://github.com/ufo-kit/ufo-filters/pull/157#discussion_r173762941"},"pull_request":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157"}},"in_reply_to_id":173761655},"pull_request":{"url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157","id":174336326,"html_url":"https://github.com/ufo-kit/ufo-filters/pull/157","diff_url":"https://github.com/ufo-kit/ufo-filters/pull/157.diff","patch_url":"https://github.com/ufo-kit/ufo-filters/pull/157.patch","issue_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/157","number":157,"state":"open","locked":false,"title":"Add gradient filter","user":{"login":"tfarago","id":2648829,"avatar_url":"https://avatars1.githubusercontent.com/u/2648829?v=4","gravatar_id":"","url":"https://api.github.com/users/tfarago","html_url":"https://github.com/tfarago","followers_url":"https://api.github.com/users/tfarago/followers","following_url":"https://api.github.com/users/tfarago/following{/other_user}","gists_url":"https://api.github.com/users/tfarago/gists{/gist_id}","starred_url":"https://api.github.com/users/tfarago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfarago/subscriptions","organizations_url":"https://api.github.com/users/tfarago/orgs","repos_url":"https://api.github.com/users/tfarago/repos","events_url":"https://api.github.com/users/tfarago/events{/privacy}","received_events_url":"https://api.github.com/users/tfarago/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-12T11:12:17Z","updated_at":"2018-03-12T11:22:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"237b1a436b930c93bc0c8529e3d75ff0e4a84843","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157/commits","review_comments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157/comments","review_comment_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/157/comments","statuses_url":"https://api.github.com/repos/ufo-kit/ufo-filters/statuses/ae6f274e759ff681eb643163bd40194f9eab14f5","head":{"label":"ufo-kit:add-gradient","ref":"add-gradient","sha":"ae6f274e759ff681eb643163bd40194f9eab14f5","user":{"login":"ufo-kit","id":4500176,"avatar_url":"https://avatars1.githubusercontent.com/u/4500176?v=4","gravatar_id":"","url":"https://api.github.com/users/ufo-kit","html_url":"https://github.com/ufo-kit","followers_url":"https://api.github.com/users/ufo-kit/followers","following_url":"https://api.github.com/users/ufo-kit/following{/other_user}","gists_url":"https://api.github.com/users/ufo-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/ufo-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufo-kit/subscriptions","organizations_url":"https://api.github.com/users/ufo-kit/orgs","repos_url":"https://api.github.com/users/ufo-kit/repos","events_url":"https://api.github.com/users/ufo-kit/events{/privacy}","received_events_url":"https://api.github.com/users/ufo-kit/received_events","type":"Organization","site_admin":false},"repo":{"id":13275361,"name":"ufo-filters","full_name":"ufo-kit/ufo-filters","owner":{"login":"ufo-kit","id":4500176,"avatar_url":"https://avatars1.githubusercontent.com/u/4500176?v=4","gravatar_id":"","url":"https://api.github.com/users/ufo-kit","html_url":"https://github.com/ufo-kit","followers_url":"https://api.github.com/users/ufo-kit/followers","following_url":"https://api.github.com/users/ufo-kit/following{/other_user}","gists_url":"https://api.github.com/users/ufo-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/ufo-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufo-kit/subscriptions","organizations_url":"https://api.github.com/users/ufo-kit/orgs","repos_url":"https://api.github.com/users/ufo-kit/repos","events_url":"https://api.github.com/users/ufo-kit/events{/privacy}","received_events_url":"https://api.github.com/users/ufo-kit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ufo-kit/ufo-filters","description":"Common plugin suite for the ufo-core processing framework","fork":false,"url":"https://api.github.com/repos/ufo-kit/ufo-filters","forks_url":"https://api.github.com/repos/ufo-kit/ufo-filters/forks","keys_url":"https://api.github.com/repos/ufo-kit/ufo-filters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ufo-kit/ufo-filters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ufo-kit/ufo-filters/teams","hooks_url":"https://api.github.com/repos/ufo-kit/ufo-filters/hooks","issue_events_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/events{/number}","events_url":"https://api.github.com/repos/ufo-kit/ufo-filters/events","assignees_url":"https://api.github.com/repos/ufo-kit/ufo-filters/assignees{/user}","branches_url":"https://api.github.com/repos/ufo-kit/ufo-filters/branches{/branch}","tags_url":"https://api.github.com/repos/ufo-kit/ufo-filters/tags","blobs_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/refs{/sha}","trees_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ufo-kit/ufo-filters/statuses/{sha}","languages_url":"https://api.github.com/repos/ufo-kit/ufo-filters/languages","stargazers_url":"https://api.github.com/repos/ufo-kit/ufo-filters/stargazers","contributors_url":"https://api.github.com/repos/ufo-kit/ufo-filters/contributors","subscribers_url":"https://api.github.com/repos/ufo-kit/ufo-filters/subscribers","subscription_url":"https://api.github.com/repos/ufo-kit/ufo-filters/subscription","commits_url":"https://api.github.com/repos/ufo-kit/ufo-filters/commits{/sha}","git_commits_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/commits{/sha}","comments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/comments{/number}","issue_comment_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/comments{/number}","contents_url":"https://api.github.com/repos/ufo-kit/ufo-filters/contents/{+path}","compare_url":"https://api.github.com/repos/ufo-kit/ufo-filters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ufo-kit/ufo-filters/merges","archive_url":"https://api.github.com/repos/ufo-kit/ufo-filters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ufo-kit/ufo-filters/downloads","issues_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues{/number}","pulls_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls{/number}","milestones_url":"https://api.github.com/repos/ufo-kit/ufo-filters/milestones{/number}","notifications_url":"https://api.github.com/repos/ufo-kit/ufo-filters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ufo-kit/ufo-filters/labels{/name}","releases_url":"https://api.github.com/repos/ufo-kit/ufo-filters/releases{/id}","deployments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/deployments","created_at":"2013-10-02T15:49:14Z","updated_at":"2016-10-24T09:42:27Z","pushed_at":"2018-03-12T11:20:32Z","git_url":"git://github.com/ufo-kit/ufo-filters.git","ssh_url":"git@github.com:ufo-kit/ufo-filters.git","clone_url":"https://github.com/ufo-kit/ufo-filters.git","svn_url":"https://github.com/ufo-kit/ufo-filters","homepage":null,"size":8370,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":11,"open_issues":15,"watchers":3,"default_branch":"master"}},"base":{"label":"ufo-kit:master","ref":"master","sha":"d701b2c11122883321763c7611e0d8a487b41431","user":{"login":"ufo-kit","id":4500176,"avatar_url":"https://avatars1.githubusercontent.com/u/4500176?v=4","gravatar_id":"","url":"https://api.github.com/users/ufo-kit","html_url":"https://github.com/ufo-kit","followers_url":"https://api.github.com/users/ufo-kit/followers","following_url":"https://api.github.com/users/ufo-kit/following{/other_user}","gists_url":"https://api.github.com/users/ufo-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/ufo-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufo-kit/subscriptions","organizations_url":"https://api.github.com/users/ufo-kit/orgs","repos_url":"https://api.github.com/users/ufo-kit/repos","events_url":"https://api.github.com/users/ufo-kit/events{/privacy}","received_events_url":"https://api.github.com/users/ufo-kit/received_events","type":"Organization","site_admin":false},"repo":{"id":13275361,"name":"ufo-filters","full_name":"ufo-kit/ufo-filters","owner":{"login":"ufo-kit","id":4500176,"avatar_url":"https://avatars1.githubusercontent.com/u/4500176?v=4","gravatar_id":"","url":"https://api.github.com/users/ufo-kit","html_url":"https://github.com/ufo-kit","followers_url":"https://api.github.com/users/ufo-kit/followers","following_url":"https://api.github.com/users/ufo-kit/following{/other_user}","gists_url":"https://api.github.com/users/ufo-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/ufo-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ufo-kit/subscriptions","organizations_url":"https://api.github.com/users/ufo-kit/orgs","repos_url":"https://api.github.com/users/ufo-kit/repos","events_url":"https://api.github.com/users/ufo-kit/events{/privacy}","received_events_url":"https://api.github.com/users/ufo-kit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ufo-kit/ufo-filters","description":"Common plugin suite for the ufo-core processing framework","fork":false,"url":"https://api.github.com/repos/ufo-kit/ufo-filters","forks_url":"https://api.github.com/repos/ufo-kit/ufo-filters/forks","keys_url":"https://api.github.com/repos/ufo-kit/ufo-filters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ufo-kit/ufo-filters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ufo-kit/ufo-filters/teams","hooks_url":"https://api.github.com/repos/ufo-kit/ufo-filters/hooks","issue_events_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/events{/number}","events_url":"https://api.github.com/repos/ufo-kit/ufo-filters/events","assignees_url":"https://api.github.com/repos/ufo-kit/ufo-filters/assignees{/user}","branches_url":"https://api.github.com/repos/ufo-kit/ufo-filters/branches{/branch}","tags_url":"https://api.github.com/repos/ufo-kit/ufo-filters/tags","blobs_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/refs{/sha}","trees_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ufo-kit/ufo-filters/statuses/{sha}","languages_url":"https://api.github.com/repos/ufo-kit/ufo-filters/languages","stargazers_url":"https://api.github.com/repos/ufo-kit/ufo-filters/stargazers","contributors_url":"https://api.github.com/repos/ufo-kit/ufo-filters/contributors","subscribers_url":"https://api.github.com/repos/ufo-kit/ufo-filters/subscribers","subscription_url":"https://api.github.com/repos/ufo-kit/ufo-filters/subscription","commits_url":"https://api.github.com/repos/ufo-kit/ufo-filters/commits{/sha}","git_commits_url":"https://api.github.com/repos/ufo-kit/ufo-filters/git/commits{/sha}","comments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/comments{/number}","issue_comment_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/comments{/number}","contents_url":"https://api.github.com/repos/ufo-kit/ufo-filters/contents/{+path}","compare_url":"https://api.github.com/repos/ufo-kit/ufo-filters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ufo-kit/ufo-filters/merges","archive_url":"https://api.github.com/repos/ufo-kit/ufo-filters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ufo-kit/ufo-filters/downloads","issues_url":"https://api.github.com/repos/ufo-kit/ufo-filters/issues{/number}","pulls_url":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls{/number}","milestones_url":"https://api.github.com/repos/ufo-kit/ufo-filters/milestones{/number}","notifications_url":"https://api.github.com/repos/ufo-kit/ufo-filters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ufo-kit/ufo-filters/labels{/name}","releases_url":"https://api.github.com/repos/ufo-kit/ufo-filters/releases{/id}","deployments_url":"https://api.github.com/repos/ufo-kit/ufo-filters/deployments","created_at":"2013-10-02T15:49:14Z","updated_at":"2016-10-24T09:42:27Z","pushed_at":"2018-03-12T11:20:32Z","git_url":"git://github.com/ufo-kit/ufo-filters.git","ssh_url":"git@github.com:ufo-kit/ufo-filters.git","clone_url":"https://github.com/ufo-kit/ufo-filters.git","svn_url":"https://github.com/ufo-kit/ufo-filters","homepage":null,"size":8370,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":11,"open_issues":15,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157"},"html":{"href":"https://github.com/ufo-kit/ufo-filters/pull/157"},"issue":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/157"},"comments":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/ufo-kit/ufo-filters/statuses/ae6f274e759ff681eb643163bd40194f9eab14f5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matze"}}