{"action":"created","comment":{"url":"https://api.github.com/repos/scality/quadiron/pulls/comments/219491392","pull_request_review_id":157676107,"id":219491392,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTQ5MTM5Mg==","diff_hunk":"@@ -58,6 +59,78 @@ class BuffersTest : public ::testing::Test {\n \n         return vec;\n     }\n+\n+    std::unique_ptr<vec::Vector<T>>\n+    gen_rand_vector(gf::RingModN<T>& gf, size_t n, T max_val)\n+    {\n+        std::vector<T> mem;\n+        mem.reserve(max_val);\n+\n+        for (size_t i = 0; i < max_val; i++) {\n+            mem.push_back(i);\n+        }\n+        std::random_shuffle(mem.begin(), mem.end());\n+\n+        auto vec = std::unique_ptr<vec::Vector<T>>(new vec::Vector<T>(gf, n));\n+        for (size_t i = 0; i < n; i++) {\n+            vec->set(i, mem[i]);\n+        }\n+        return vec;\n+    }\n+\n+    bool check_eq(T* buf1, T* buf2, size_t len)\n+    {\n+        for (size_t i = 0; i < len; ++i) {\n+            if (buf1[i] != buf2[i]) {\n+                return false;\n+            }\n+        }\n+        return true;\n+    }\n+\n+    bool check_all_zeros(T* buf, size_t len)\n+    {\n+        for (size_t i = 0; i < len; ++i) {\n+            if (buf[i] != 0) {\n+                return false;\n+            }\n+        }\n+        return true;\n+    }\n+\n+    bool check_shuffled_bufs(\n+        vec::Buffers<T>& input,","path":"test/buffers_utest.cpp","position":52,"original_position":52,"commit_id":"85433c3881b4759c97051a6b7d5e8c3fa77b873d","original_commit_id":"85433c3881b4759c97051a6b7d5e8c3fa77b873d","user":{"login":"slaperche-scality","id":34654278,"node_id":"MDQ6VXNlcjM0NjU0Mjc4","avatar_url":"https://avatars0.githubusercontent.com/u/34654278?v=4","gravatar_id":"","url":"https://api.github.com/users/slaperche-scality","html_url":"https://github.com/slaperche-scality","followers_url":"https://api.github.com/users/slaperche-scality/followers","following_url":"https://api.github.com/users/slaperche-scality/following{/other_user}","gists_url":"https://api.github.com/users/slaperche-scality/gists{/gist_id}","starred_url":"https://api.github.com/users/slaperche-scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaperche-scality/subscriptions","organizations_url":"https://api.github.com/users/slaperche-scality/orgs","repos_url":"https://api.github.com/users/slaperche-scality/repos","events_url":"https://api.github.com/users/slaperche-scality/events{/privacy}","received_events_url":"https://api.github.com/users/slaperche-scality/received_events","type":"User","site_admin":false},"body":"`input` and `output` should be const","created_at":"2018-09-21T13:11:32Z","updated_at":"2018-09-21T13:13:34Z","html_url":"https://github.com/scality/quadiron/pull/236#discussion_r219491392","pull_request_url":"https://api.github.com/repos/scality/quadiron/pulls/236","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/scality/quadiron/pulls/comments/219491392"},"html":{"href":"https://github.com/scality/quadiron/pull/236#discussion_r219491392"},"pull_request":{"href":"https://api.github.com/repos/scality/quadiron/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/scality/quadiron/pulls/236","id":212315321,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMzE1MzIx","html_url":"https://github.com/scality/quadiron/pull/236","diff_url":"https://github.com/scality/quadiron/pull/236.diff","patch_url":"https://github.com/scality/quadiron/pull/236.patch","issue_url":"https://api.github.com/repos/scality/quadiron/issues/236","number":236,"state":"open","locked":false,"title":"Decoding enhancement","user":{"login":"lamphamsy","id":14222406,"node_id":"MDQ6VXNlcjE0MjIyNDA2","avatar_url":"https://avatars0.githubusercontent.com/u/14222406?v=4","gravatar_id":"","url":"https://api.github.com/users/lamphamsy","html_url":"https://github.com/lamphamsy","followers_url":"https://api.github.com/users/lamphamsy/followers","following_url":"https://api.github.com/users/lamphamsy/following{/other_user}","gists_url":"https://api.github.com/users/lamphamsy/gists{/gist_id}","starred_url":"https://api.github.com/users/lamphamsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamphamsy/subscriptions","organizations_url":"https://api.github.com/users/lamphamsy/orgs","repos_url":"https://api.github.com/users/lamphamsy/repos","events_url":"https://api.github.com/users/lamphamsy/events{/privacy}","received_events_url":"https://api.github.com/users/lamphamsy/received_events","type":"User","site_admin":false},"body":"### Enhance inverse FFT2n\r\n\r\niFFT does two not-so-good things on input:\r\n- shuffle output's elements according to an reversed bit order.\r\n- modify input vector/buffer\r\n\r\nThese actions will be avoided by swapping elements on output. Note, input is in reversed-bit order. Hence butterfly operations can be performed directly on this order. But the output must be re-order\r\nin the natural order by using swap operations.\r\nTo preserve output's order, we shuffle the output twice, before and after the butterfly operation. \r\nA swap operation is to swap only two buffers' pointer, hence it's not costly.\r\n\r\n### Reduce auxilier buffers in context\r\n\r\nFor decoding using Buffers, context allocates buffers of total length `(k + max(n, 2k))` instead of `(2n + 3k` previously.\r\n\r\n### Simplify decoding\r\n\r\nA step doing zero-out a Buffers is avoided.","created_at":"2018-08-31T08:50:18Z","updated_at":"2018-09-21T13:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f71211123745e78d6b050c7498fa65fc67e0e88","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scality/quadiron/pulls/236/commits","review_comments_url":"https://api.github.com/repos/scality/quadiron/pulls/236/comments","review_comment_url":"https://api.github.com/repos/scality/quadiron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scality/quadiron/issues/236/comments","statuses_url":"https://api.github.com/repos/scality/quadiron/statuses/85433c3881b4759c97051a6b7d5e8c3fa77b873d","head":{"label":"scality:eh/decoding","ref":"eh/decoding","sha":"85433c3881b4759c97051a6b7d5e8c3fa77b873d","user":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"repo":{"id":91633566,"node_id":"MDEwOlJlcG9zaXRvcnk5MTYzMzU2Ng==","name":"quadiron","full_name":"scality/quadiron","private":false,"owner":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scality/quadiron","description":"NTT Based Erasure Coding Library","fork":false,"url":"https://api.github.com/repos/scality/quadiron","forks_url":"https://api.github.com/repos/scality/quadiron/forks","keys_url":"https://api.github.com/repos/scality/quadiron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scality/quadiron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scality/quadiron/teams","hooks_url":"https://api.github.com/repos/scality/quadiron/hooks","issue_events_url":"https://api.github.com/repos/scality/quadiron/issues/events{/number}","events_url":"https://api.github.com/repos/scality/quadiron/events","assignees_url":"https://api.github.com/repos/scality/quadiron/assignees{/user}","branches_url":"https://api.github.com/repos/scality/quadiron/branches{/branch}","tags_url":"https://api.github.com/repos/scality/quadiron/tags","blobs_url":"https://api.github.com/repos/scality/quadiron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scality/quadiron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scality/quadiron/git/refs{/sha}","trees_url":"https://api.github.com/repos/scality/quadiron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scality/quadiron/statuses/{sha}","languages_url":"https://api.github.com/repos/scality/quadiron/languages","stargazers_url":"https://api.github.com/repos/scality/quadiron/stargazers","contributors_url":"https://api.github.com/repos/scality/quadiron/contributors","subscribers_url":"https://api.github.com/repos/scality/quadiron/subscribers","subscription_url":"https://api.github.com/repos/scality/quadiron/subscription","commits_url":"https://api.github.com/repos/scality/quadiron/commits{/sha}","git_commits_url":"https://api.github.com/repos/scality/quadiron/git/commits{/sha}","comments_url":"https://api.github.com/repos/scality/quadiron/comments{/number}","issue_comment_url":"https://api.github.com/repos/scality/quadiron/issues/comments{/number}","contents_url":"https://api.github.com/repos/scality/quadiron/contents/{+path}","compare_url":"https://api.github.com/repos/scality/quadiron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scality/quadiron/merges","archive_url":"https://api.github.com/repos/scality/quadiron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scality/quadiron/downloads","issues_url":"https://api.github.com/repos/scality/quadiron/issues{/number}","pulls_url":"https://api.github.com/repos/scality/quadiron/pulls{/number}","milestones_url":"https://api.github.com/repos/scality/quadiron/milestones{/number}","notifications_url":"https://api.github.com/repos/scality/quadiron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scality/quadiron/labels{/name}","releases_url":"https://api.github.com/repos/scality/quadiron/releases{/id}","deployments_url":"https://api.github.com/repos/scality/quadiron/deployments","created_at":"2017-05-18T00:59:21Z","updated_at":"2018-09-20T05:42:44Z","pushed_at":"2018-09-21T10:26:31Z","git_url":"git://github.com/scality/quadiron.git","ssh_url":"git@github.com:scality/quadiron.git","clone_url":"https://github.com/scality/quadiron.git","svn_url":"https://github.com/scality/quadiron","homepage":"","size":1325,"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":2,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":19,"watchers":8,"default_branch":"master"}},"base":{"label":"scality:master","ref":"master","sha":"3320bd0cb64936236858053870b8b5a4c1db7355","user":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"repo":{"id":91633566,"node_id":"MDEwOlJlcG9zaXRvcnk5MTYzMzU2Ng==","name":"quadiron","full_name":"scality/quadiron","private":false,"owner":{"login":"scality","id":383812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4MzgxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/383812?v=4","gravatar_id":"","url":"https://api.github.com/users/scality","html_url":"https://github.com/scality","followers_url":"https://api.github.com/users/scality/followers","following_url":"https://api.github.com/users/scality/following{/other_user}","gists_url":"https://api.github.com/users/scality/gists{/gist_id}","starred_url":"https://api.github.com/users/scality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scality/subscriptions","organizations_url":"https://api.github.com/users/scality/orgs","repos_url":"https://api.github.com/users/scality/repos","events_url":"https://api.github.com/users/scality/events{/privacy}","received_events_url":"https://api.github.com/users/scality/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scality/quadiron","description":"NTT Based Erasure Coding Library","fork":false,"url":"https://api.github.com/repos/scality/quadiron","forks_url":"https://api.github.com/repos/scality/quadiron/forks","keys_url":"https://api.github.com/repos/scality/quadiron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scality/quadiron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scality/quadiron/teams","hooks_url":"https://api.github.com/repos/scality/quadiron/hooks","issue_events_url":"https://api.github.com/repos/scality/quadiron/issues/events{/number}","events_url":"https://api.github.com/repos/scality/quadiron/events","assignees_url":"https://api.github.com/repos/scality/quadiron/assignees{/user}","branches_url":"https://api.github.com/repos/scality/quadiron/branches{/branch}","tags_url":"https://api.github.com/repos/scality/quadiron/tags","blobs_url":"https://api.github.com/repos/scality/quadiron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scality/quadiron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scality/quadiron/git/refs{/sha}","trees_url":"https://api.github.com/repos/scality/quadiron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scality/quadiron/statuses/{sha}","languages_url":"https://api.github.com/repos/scality/quadiron/languages","stargazers_url":"https://api.github.com/repos/scality/quadiron/stargazers","contributors_url":"https://api.github.com/repos/scality/quadiron/contributors","subscribers_url":"https://api.github.com/repos/scality/quadiron/subscribers","subscription_url":"https://api.github.com/repos/scality/quadiron/subscription","commits_url":"https://api.github.com/repos/scality/quadiron/commits{/sha}","git_commits_url":"https://api.github.com/repos/scality/quadiron/git/commits{/sha}","comments_url":"https://api.github.com/repos/scality/quadiron/comments{/number}","issue_comment_url":"https://api.github.com/repos/scality/quadiron/issues/comments{/number}","contents_url":"https://api.github.com/repos/scality/quadiron/contents/{+path}","compare_url":"https://api.github.com/repos/scality/quadiron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scality/quadiron/merges","archive_url":"https://api.github.com/repos/scality/quadiron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scality/quadiron/downloads","issues_url":"https://api.github.com/repos/scality/quadiron/issues{/number}","pulls_url":"https://api.github.com/repos/scality/quadiron/pulls{/number}","milestones_url":"https://api.github.com/repos/scality/quadiron/milestones{/number}","notifications_url":"https://api.github.com/repos/scality/quadiron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scality/quadiron/labels{/name}","releases_url":"https://api.github.com/repos/scality/quadiron/releases{/id}","deployments_url":"https://api.github.com/repos/scality/quadiron/deployments","created_at":"2017-05-18T00:59:21Z","updated_at":"2018-09-20T05:42:44Z","pushed_at":"2018-09-21T10:26:31Z","git_url":"git://github.com/scality/quadiron.git","ssh_url":"git@github.com:scality/quadiron.git","clone_url":"https://github.com/scality/quadiron.git","svn_url":"https://github.com/scality/quadiron","homepage":"","size":1325,"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":2,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":19,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scality/quadiron/pulls/236"},"html":{"href":"https://github.com/scality/quadiron/pull/236"},"issue":{"href":"https://api.github.com/repos/scality/quadiron/issues/236"},"comments":{"href":"https://api.github.com/repos/scality/quadiron/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/scality/quadiron/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/scality/quadiron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scality/quadiron/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/scality/quadiron/statuses/85433c3881b4759c97051a6b7d5e8c3fa77b873d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"slaperche-scality"}}