{"action":"opened","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/562","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/562/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/562/events","html_url":"https://github.com/arrayfire/arrayfire/issues/562","id":66132611,"number":562,"title":"Identity breaks for 3D sizes","user":{"login":"umar456","id":457510,"avatar_url":"https://avatars.githubusercontent.com/u/457510?v=3","gravatar_id":"","url":"https://api.github.com/users/umar456","html_url":"https://github.com/umar456","followers_url":"https://api.github.com/users/umar456/followers","following_url":"https://api.github.com/users/umar456/following{/other_user}","gists_url":"https://api.github.com/users/umar456/gists{/gist_id}","starred_url":"https://api.github.com/users/umar456/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umar456/subscriptions","organizations_url":"https://api.github.com/users/umar456/orgs","repos_url":"https://api.github.com/users/umar456/repos","events_url":"https://api.github.com/users/umar456/events{/privacy}","received_events_url":"https://api.github.com/users/umar456/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T11:47:02Z","updated_at":"2015-04-03T11:47:02Z","closed_at":null,"body":"The Identity function breaks for 3D sizes on OpenCL and CUDA. In the case of CUDA the program segfaults. On OpenCL I am getting a full system crash.\r\n\r\n```cpp\r\n    num = 100;\r\n    out = identity(num, num, num, dty);\r\n\r\n    h_in.resize(num*num*num);\r\n    out.host(&h_in.front());\r\n\r\n    for (int h = 0; h < num; h++) {\r\n        for (int i = 0; i < num; i++) {\r\n            for (int j = 0; j < num; j++) {\r\n                if(j == i)\r\n                    ASSERT_EQ(h_in[i * num + j], T(1));\r\n                else\r\n                    ASSERT_EQ(h_in[i * num + j], T(0));\r\n            }\r\n        }\r\n    }\r\n```"}}