{"action":"created","comment":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments/65863555","id":65863555,"diff_hunk":"@@ -0,0 +1,71 @@\n+#include <shogun/lib/SGVector.h>\n+#include <shogun/lib/GPUVector.h>\n+#include <shogun/mathematics/linalg/linalg.h>\n+#include <vector>\n+#include <algorithm>\n+#include <hayai/hayai.hpp>\n+\n+using namespace shogun;\n+\n+/**\n+ * Instructions :\n+ * 1. Install benchmarking toolkit \"hayai\" (https://github.com/nickbruun/hayai)\n+ * 2. Compile against libhayai_main, e.g.\n+ * \t\tg++ -O3 -std=c++11 matrix_product_benchmark.cpp -I/usr/include/eigen3 \\\n+ *\t\t-lshogun -lhayai_main -lOpenCL -o benchmark\n+ * 3. ./benchmark\n+ */\n+\n+/** Generate data only once */\n+struct Data\n+{\n+\tData()\n+\t{\n+\t\tA = init(1);\n+\t\tB = init(2);\n+\t\tAv = init(A);\n+\t\tBv = init(B);\n+\t}\n+\n+\tSGVector<int32_t> init(int32_t begin)\n+\t{\n+\t\tindex_t n = num_rows;\n+\t\tstd::vector<int32_t> mem(n);\n+\t\tstd::iota(mem.data(), mem.data() + n, begin);","path":"benchmarks/linalg_benchmark.cpp","position":34,"original_position":34,"commit_id":"567aa243f6ceed31199ad46cf7a5d3bcb92ee893","original_commit_id":"567aa243f6ceed31199ad46cf7a5d3bcb92ee893","user":{"login":"lambday","id":3088401,"avatar_url":"https://avatars.githubusercontent.com/u/3088401?v=3","gravatar_id":"","url":"https://api.github.com/users/lambday","html_url":"https://github.com/lambday","followers_url":"https://api.github.com/users/lambday/followers","following_url":"https://api.github.com/users/lambday/following{/other_user}","gists_url":"https://api.github.com/users/lambday/gists{/gist_id}","starred_url":"https://api.github.com/users/lambday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambday/subscriptions","organizations_url":"https://api.github.com/users/lambday/orgs","repos_url":"https://api.github.com/users/lambday/repos","events_url":"https://api.github.com/users/lambday/events{/privacy}","received_events_url":"https://api.github.com/users/lambday/received_events","type":"User","site_admin":false},"body":"Why create `std::vector` first?","created_at":"2016-06-06T09:47:14Z","updated_at":"2016-06-06T09:47:14Z","html_url":"https://github.com/shogun-toolbox/shogun/pull/3247#discussion_r65863555","pull_request_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247","_links":{"self":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments/65863555"},"html":{"href":"https://github.com/shogun-toolbox/shogun/pull/3247#discussion_r65863555"},"pull_request":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247"}}},"pull_request":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247","id":72658220,"html_url":"https://github.com/shogun-toolbox/shogun/pull/3247","diff_url":"https://github.com/shogun-toolbox/shogun/pull/3247.diff","patch_url":"https://github.com/shogun-toolbox/shogun/pull/3247.patch","issue_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3247","number":3247,"state":"open","locked":false,"title":"Linalg benchmark","user":{"login":"OXPHOS","id":8815664,"avatar_url":"https://avatars.githubusercontent.com/u/8815664?v=3","gravatar_id":"","url":"https://api.github.com/users/OXPHOS","html_url":"https://github.com/OXPHOS","followers_url":"https://api.github.com/users/OXPHOS/followers","following_url":"https://api.github.com/users/OXPHOS/following{/other_user}","gists_url":"https://api.github.com/users/OXPHOS/gists{/gist_id}","starred_url":"https://api.github.com/users/OXPHOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OXPHOS/subscriptions","organizations_url":"https://api.github.com/users/OXPHOS/orgs","repos_url":"https://api.github.com/users/OXPHOS/repos","events_url":"https://api.github.com/users/OXPHOS/events{/privacy}","received_events_url":"https://api.github.com/users/OXPHOS/received_events","type":"User","site_admin":false},"body":"- compare CPU.dot and GPU.dot of current linalg and refactored linalg\r\n- ref #3230 \r\n- cannot use global variable: `sg_linalg` (segmentation fault 11)","created_at":"2016-06-06T05:38:46Z","updated_at":"2016-06-06T09:47:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9b8aa729bdd978043974cdcd5dd67b97c446c1a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247/commits","review_comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247/comments","review_comment_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3247/comments","statuses_url":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/567aa243f6ceed31199ad46cf7a5d3bcb92ee893","head":{"label":"OXPHOS:linalg_benchmark","ref":"linalg_benchmark","sha":"567aa243f6ceed31199ad46cf7a5d3bcb92ee893","user":{"login":"OXPHOS","id":8815664,"avatar_url":"https://avatars.githubusercontent.com/u/8815664?v=3","gravatar_id":"","url":"https://api.github.com/users/OXPHOS","html_url":"https://github.com/OXPHOS","followers_url":"https://api.github.com/users/OXPHOS/followers","following_url":"https://api.github.com/users/OXPHOS/following{/other_user}","gists_url":"https://api.github.com/users/OXPHOS/gists{/gist_id}","starred_url":"https://api.github.com/users/OXPHOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OXPHOS/subscriptions","organizations_url":"https://api.github.com/users/OXPHOS/orgs","repos_url":"https://api.github.com/users/OXPHOS/repos","events_url":"https://api.github.com/users/OXPHOS/events{/privacy}","received_events_url":"https://api.github.com/users/OXPHOS/received_events","type":"User","site_admin":false},"repo":{"id":54068145,"name":"shogun","full_name":"OXPHOS/shogun","owner":{"login":"OXPHOS","id":8815664,"avatar_url":"https://avatars.githubusercontent.com/u/8815664?v=3","gravatar_id":"","url":"https://api.github.com/users/OXPHOS","html_url":"https://github.com/OXPHOS","followers_url":"https://api.github.com/users/OXPHOS/followers","following_url":"https://api.github.com/users/OXPHOS/following{/other_user}","gists_url":"https://api.github.com/users/OXPHOS/gists{/gist_id}","starred_url":"https://api.github.com/users/OXPHOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OXPHOS/subscriptions","organizations_url":"https://api.github.com/users/OXPHOS/orgs","repos_url":"https://api.github.com/users/OXPHOS/repos","events_url":"https://api.github.com/users/OXPHOS/events{/privacy}","received_events_url":"https://api.github.com/users/OXPHOS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OXPHOS/shogun","description":"The Shogun Machine Learning Toolbox (Source Code)","fork":true,"url":"https://api.github.com/repos/OXPHOS/shogun","forks_url":"https://api.github.com/repos/OXPHOS/shogun/forks","keys_url":"https://api.github.com/repos/OXPHOS/shogun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OXPHOS/shogun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OXPHOS/shogun/teams","hooks_url":"https://api.github.com/repos/OXPHOS/shogun/hooks","issue_events_url":"https://api.github.com/repos/OXPHOS/shogun/issues/events{/number}","events_url":"https://api.github.com/repos/OXPHOS/shogun/events","assignees_url":"https://api.github.com/repos/OXPHOS/shogun/assignees{/user}","branches_url":"https://api.github.com/repos/OXPHOS/shogun/branches{/branch}","tags_url":"https://api.github.com/repos/OXPHOS/shogun/tags","blobs_url":"https://api.github.com/repos/OXPHOS/shogun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OXPHOS/shogun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OXPHOS/shogun/git/refs{/sha}","trees_url":"https://api.github.com/repos/OXPHOS/shogun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OXPHOS/shogun/statuses/{sha}","languages_url":"https://api.github.com/repos/OXPHOS/shogun/languages","stargazers_url":"https://api.github.com/repos/OXPHOS/shogun/stargazers","contributors_url":"https://api.github.com/repos/OXPHOS/shogun/contributors","subscribers_url":"https://api.github.com/repos/OXPHOS/shogun/subscribers","subscription_url":"https://api.github.com/repos/OXPHOS/shogun/subscription","commits_url":"https://api.github.com/repos/OXPHOS/shogun/commits{/sha}","git_commits_url":"https://api.github.com/repos/OXPHOS/shogun/git/commits{/sha}","comments_url":"https://api.github.com/repos/OXPHOS/shogun/comments{/number}","issue_comment_url":"https://api.github.com/repos/OXPHOS/shogun/issues/comments{/number}","contents_url":"https://api.github.com/repos/OXPHOS/shogun/contents/{+path}","compare_url":"https://api.github.com/repos/OXPHOS/shogun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OXPHOS/shogun/merges","archive_url":"https://api.github.com/repos/OXPHOS/shogun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OXPHOS/shogun/downloads","issues_url":"https://api.github.com/repos/OXPHOS/shogun/issues{/number}","pulls_url":"https://api.github.com/repos/OXPHOS/shogun/pulls{/number}","milestones_url":"https://api.github.com/repos/OXPHOS/shogun/milestones{/number}","notifications_url":"https://api.github.com/repos/OXPHOS/shogun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OXPHOS/shogun/labels{/name}","releases_url":"https://api.github.com/repos/OXPHOS/shogun/releases{/id}","deployments_url":"https://api.github.com/repos/OXPHOS/shogun/deployments","created_at":"2016-03-16T21:34:50Z","updated_at":"2016-03-16T21:34:58Z","pushed_at":"2016-06-06T05:41:19Z","git_url":"git://github.com/OXPHOS/shogun.git","ssh_url":"git@github.com:OXPHOS/shogun.git","clone_url":"https://github.com/OXPHOS/shogun.git","svn_url":"https://github.com/OXPHOS/shogun","homepage":"http://www.shogun-toolbox.org","size":60046,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"shogun-toolbox:feature/linalg_refactor","ref":"feature/linalg_refactor","sha":"161431c62a7ad5a9bb8b1e2502aa2cc3bbfed0c6","user":{"login":"shogun-toolbox","id":690673,"avatar_url":"https://avatars.githubusercontent.com/u/690673?v=3","gravatar_id":"","url":"https://api.github.com/users/shogun-toolbox","html_url":"https://github.com/shogun-toolbox","followers_url":"https://api.github.com/users/shogun-toolbox/followers","following_url":"https://api.github.com/users/shogun-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/shogun-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/shogun-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogun-toolbox/subscriptions","organizations_url":"https://api.github.com/users/shogun-toolbox/orgs","repos_url":"https://api.github.com/users/shogun-toolbox/repos","events_url":"https://api.github.com/users/shogun-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/shogun-toolbox/received_events","type":"Organization","site_admin":false},"repo":{"id":1555094,"name":"shogun","full_name":"shogun-toolbox/shogun","owner":{"login":"shogun-toolbox","id":690673,"avatar_url":"https://avatars.githubusercontent.com/u/690673?v=3","gravatar_id":"","url":"https://api.github.com/users/shogun-toolbox","html_url":"https://github.com/shogun-toolbox","followers_url":"https://api.github.com/users/shogun-toolbox/followers","following_url":"https://api.github.com/users/shogun-toolbox/following{/other_user}","gists_url":"https://api.github.com/users/shogun-toolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/shogun-toolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogun-toolbox/subscriptions","organizations_url":"https://api.github.com/users/shogun-toolbox/orgs","repos_url":"https://api.github.com/users/shogun-toolbox/repos","events_url":"https://api.github.com/users/shogun-toolbox/events{/privacy}","received_events_url":"https://api.github.com/users/shogun-toolbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shogun-toolbox/shogun","description":"The Shogun Machine Learning Toolbox (Source Code)","fork":false,"url":"https://api.github.com/repos/shogun-toolbox/shogun","forks_url":"https://api.github.com/repos/shogun-toolbox/shogun/forks","keys_url":"https://api.github.com/repos/shogun-toolbox/shogun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shogun-toolbox/shogun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shogun-toolbox/shogun/teams","hooks_url":"https://api.github.com/repos/shogun-toolbox/shogun/hooks","issue_events_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/events{/number}","events_url":"https://api.github.com/repos/shogun-toolbox/shogun/events","assignees_url":"https://api.github.com/repos/shogun-toolbox/shogun/assignees{/user}","branches_url":"https://api.github.com/repos/shogun-toolbox/shogun/branches{/branch}","tags_url":"https://api.github.com/repos/shogun-toolbox/shogun/tags","blobs_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/refs{/sha}","trees_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/{sha}","languages_url":"https://api.github.com/repos/shogun-toolbox/shogun/languages","stargazers_url":"https://api.github.com/repos/shogun-toolbox/shogun/stargazers","contributors_url":"https://api.github.com/repos/shogun-toolbox/shogun/contributors","subscribers_url":"https://api.github.com/repos/shogun-toolbox/shogun/subscribers","subscription_url":"https://api.github.com/repos/shogun-toolbox/shogun/subscription","commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/commits{/sha}","git_commits_url":"https://api.github.com/repos/shogun-toolbox/shogun/git/commits{/sha}","comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/comments{/number}","issue_comment_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/comments{/number}","contents_url":"https://api.github.com/repos/shogun-toolbox/shogun/contents/{+path}","compare_url":"https://api.github.com/repos/shogun-toolbox/shogun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shogun-toolbox/shogun/merges","archive_url":"https://api.github.com/repos/shogun-toolbox/shogun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shogun-toolbox/shogun/downloads","issues_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues{/number}","pulls_url":"https://api.github.com/repos/shogun-toolbox/shogun/pulls{/number}","milestones_url":"https://api.github.com/repos/shogun-toolbox/shogun/milestones{/number}","notifications_url":"https://api.github.com/repos/shogun-toolbox/shogun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shogun-toolbox/shogun/labels{/name}","releases_url":"https://api.github.com/repos/shogun-toolbox/shogun/releases{/id}","deployments_url":"https://api.github.com/repos/shogun-toolbox/shogun/deployments","created_at":"2011-04-01T10:44:32Z","updated_at":"2016-06-06T05:30:30Z","pushed_at":"2016-06-06T07:35:15Z","git_url":"git://github.com/shogun-toolbox/shogun.git","ssh_url":"git@github.com:shogun-toolbox/shogun.git","clone_url":"https://github.com/shogun-toolbox/shogun.git","svn_url":"https://github.com/shogun-toolbox/shogun","homepage":"http://www.shogun-toolbox.org","size":192701,"stargazers_count":1076,"watchers_count":1076,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":583,"mirror_url":null,"open_issues_count":435,"forks":583,"open_issues":435,"watchers":1076,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247"},"html":{"href":"https://github.com/shogun-toolbox/shogun/pull/3247"},"issue":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3247"},"comments":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/issues/3247/comments"},"review_comments":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247/comments"},"review_comment":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/pulls/3247/commits"},"statuses":{"href":"https://api.github.com/repos/shogun-toolbox/shogun/statuses/567aa243f6ceed31199ad46cf7a5d3bcb92ee893"}}}}
{"actor":{"display_login":"lambday"}}