{"action":"created","issue":{"url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/3","labels_url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/3/comments","events_url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/3/events","html_url":"https://github.com/unbornchikken/NOOOCL/issues/3","id":66399747,"number":3,"title":"Discussion about OpenCL possibilities","user":{"login":"unbornchikken","id":5675531,"avatar_url":"https://avatars.githubusercontent.com/u/5675531?v=3","gravatar_id":"","url":"https://api.github.com/users/unbornchikken","html_url":"https://github.com/unbornchikken","followers_url":"https://api.github.com/users/unbornchikken/followers","following_url":"https://api.github.com/users/unbornchikken/following{/other_user}","gists_url":"https://api.github.com/users/unbornchikken/gists{/gist_id}","starred_url":"https://api.github.com/users/unbornchikken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unbornchikken/subscriptions","organizations_url":"https://api.github.com/users/unbornchikken/orgs","repos_url":"https://api.github.com/users/unbornchikken/repos","events_url":"https://api.github.com/users/unbornchikken/events{/privacy}","received_events_url":"https://api.github.com/users/unbornchikken/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/unbornchikken/NOOOCL/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-05T04:16:51Z","updated_at":"2015-04-05T07:14:37Z","closed_at":null,"body":"Hi @metabench,\r\n\r\nWe've talked about the **fast** OpenCL average calculation. This is not so easy, it's even cannot be achieved on the current devices. Doable but not fast.\r\n\r\nFirst you a need a reduction on each core:  http://developer.amd.com/resources/documentation-articles/articles-whitepapers/opencl-optimization-case-study-simple-reductions/ calculating the sum. Then comes the slow part, you have to do global atomics to sum up the result from the cores. Counting the host - device data copy and the kernel launching overhead on top of this, I don't think that this can beat a well optimized CPU based average calculation code."},"comment":{"url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/comments/89729826","html_url":"https://github.com/unbornchikken/NOOOCL/issues/3#issuecomment-89729826","issue_url":"https://api.github.com/repos/unbornchikken/NOOOCL/issues/3","id":89729826,"user":{"login":"unbornchikken","id":5675531,"avatar_url":"https://avatars.githubusercontent.com/u/5675531?v=3","gravatar_id":"","url":"https://api.github.com/users/unbornchikken","html_url":"https://github.com/unbornchikken","followers_url":"https://api.github.com/users/unbornchikken/followers","following_url":"https://api.github.com/users/unbornchikken/following{/other_user}","gists_url":"https://api.github.com/users/unbornchikken/gists{/gist_id}","starred_url":"https://api.github.com/users/unbornchikken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unbornchikken/subscriptions","organizations_url":"https://api.github.com/users/unbornchikken/orgs","repos_url":"https://api.github.com/users/unbornchikken/repos","events_url":"https://api.github.com/users/unbornchikken/events{/privacy}","received_events_url":"https://api.github.com/users/unbornchikken/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T07:14:37Z","updated_at":"2015-04-05T07:14:37Z","body":"There is a really simple case in the ffi module on that NOOOCL relies: https://github.com/node-ffi/node-ffi/blob/master/src/callback_info.cc#L167\r\n\r\nWhen a callback arises in a thread, it gets enqueued. Then main node thread gets awakened by libuv, doing a native callback that process work items in the queue."}}