{"action":"opened","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/333","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/333/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/333/events","html_url":"https://github.com/arrayfire/arrayfire/issues/333","id":54334673,"number":333,"title":"af::array constructor usage","user":{"login":"Kerkil","id":2823773,"avatar_url":"https://avatars.githubusercontent.com/u/2823773?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerkil","html_url":"https://github.com/Kerkil","followers_url":"https://api.github.com/users/Kerkil/followers","following_url":"https://api.github.com/users/Kerkil/following{/other_user}","gists_url":"https://api.github.com/users/Kerkil/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerkil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerkil/subscriptions","organizations_url":"https://api.github.com/users/Kerkil/orgs","repos_url":"https://api.github.com/users/Kerkil/repos","events_url":"https://api.github.com/users/Kerkil/events{/privacy}","received_events_url":"https://api.github.com/users/Kerkil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-14T15:27:56Z","updated_at":"2015-01-14T15:27:56Z","closed_at":null,"body":"I am trying to construct an ArrayFire array object using\r\n```\r\ntemplate<typename T>\r\n      array(dim_type d0, dim_type d1, const T *pointer, af_source_t src=afHost, dim_type ngfor=0);\r\n```\r\nfrom a memory handle (`_cl_mem *` type - raw pointer to an OpenCL buffer) returned by another object (`viennacl::matrix<float>`) in ViennaCL library (using `B.handle().opencl_handle().get()' http://viennacl.sourceforge.net/doc/classviennacl_1_1ocl_1_1handle.html#a5074caaee700015fc2d3b03540b01673).  \r\n\r\nWhat is the proper way to call the `af::array` constructor in this case? I am confused about the template argument: is the type name float in this case? Also, do I need to cast the raw pointer to conform to the typename?"}}