{"action":"created","issue":{"url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/137","labels_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/137/comments","events_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/137/events","html_url":"https://github.com/viennacl/viennacl-dev/issues/137","id":87718715,"number":137,"title":"'Map' Eigen Classes in ViennaCL?","user":{"login":"cdeterman","id":3091179,"avatar_url":"https://avatars.githubusercontent.com/u/3091179?v=3","gravatar_id":"","url":"https://api.github.com/users/cdeterman","html_url":"https://github.com/cdeterman","followers_url":"https://api.github.com/users/cdeterman/followers","following_url":"https://api.github.com/users/cdeterman/following{/other_user}","gists_url":"https://api.github.com/users/cdeterman/gists{/gist_id}","starred_url":"https://api.github.com/users/cdeterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdeterman/subscriptions","organizations_url":"https://api.github.com/users/cdeterman/orgs","repos_url":"https://api.github.com/users/cdeterman/repos","events_url":"https://api.github.com/users/cdeterman/events{/privacy}","received_events_url":"https://api.github.com/users/cdeterman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-12T12:50:03Z","updated_at":"2015-06-30T14:00:40Z","closed_at":null,"body":"Often times with Eigen it is nice to be able to use already mapped memory of an object instead of creating another copy.  Naturally I would like to be able to pass such objects to viennacl.  I create the following CUDA file where nearly everything is the same as normal Eigen Matrix objects except that I am trying to pass in a `Map<Matrix>` object.\r\n\r\nWhen I try and compile just this CUDA file with NVCC (`nvcc -arch mapEigen.cu -I/viennacl/path -I/eigen/path -c`) I get essentially the same error four times (twice for each object) stating that the Eigen::Map class doesn't have the member 'size1' or 'size2'.  This looks more like a ViennaCL error than NVCC.  Is it something that isn't implemented with ViennaCL right now or did I miss something.\r\n\r\n```cpp\r\n#include <iostream>\r\n\r\n// Eigen headers\r\n#include <Eigen/Core>\r\n#include <Eigen/Sparse>\r\n\r\n// Use CUDA with ViennaCL\r\n#define VIENNACL_WITH_CUDA 1\r\n\r\n// Use ViennaCL algorithms on Eigen objects\r\n#define VIENNACL_WITH_EIGEN 1\r\n\r\n// ViennaCL headers\r\n#include \"viennacl/matrix.hpp\"\r\n#include \"viennacl/linalg/prod.hpp\"\r\n\r\nusing Eigen::Map;\r\nusing Eigen::MatrixXf;\r\n\r\nextern \"C\"\r\nEigen::MatrixXf cu_vienna_sgemm(Map<MatrixXf> Am, Map<MatrixXf> Bm)\r\n{\r\n    int M = Am.cols();\r\n    int K = Am.rows();\r\n    int N = Bm.rows();\r\n    int P = Bm.cols();\r\n\r\n    viennacl::matrix<float> vcl_A(K,M);\r\n    viennacl::matrix<float> vcl_B(N,P);\r\n    viennacl::matrix<float> vcl_C(K,P);\r\n\r\n    MatrixXf Cm(K, P);\r\n\r\n    viennacl::copy(Am, vcl_A);\r\n    viennacl::copy(Bm, vcl_B);\r\n\r\n    vcl_C = viennacl::linalg::prod(vcl_A, vcl_B);\r\n\r\n    viennacl::copy(vcl_C, Cm);\r\n\r\n    return Cm;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/comments/117195482","html_url":"https://github.com/viennacl/viennacl-dev/issues/137#issuecomment-117195482","issue_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/137","id":117195482,"user":{"login":"karlrupp","id":3027176,"avatar_url":"https://avatars.githubusercontent.com/u/3027176?v=3","gravatar_id":"","url":"https://api.github.com/users/karlrupp","html_url":"https://github.com/karlrupp","followers_url":"https://api.github.com/users/karlrupp/followers","following_url":"https://api.github.com/users/karlrupp/following{/other_user}","gists_url":"https://api.github.com/users/karlrupp/gists{/gist_id}","starred_url":"https://api.github.com/users/karlrupp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlrupp/subscriptions","organizations_url":"https://api.github.com/users/karlrupp/orgs","repos_url":"https://api.github.com/users/karlrupp/repos","events_url":"https://api.github.com/users/karlrupp/events{/privacy}","received_events_url":"https://api.github.com/users/karlrupp/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T14:00:40Z","updated_at":"2015-06-30T14:00:40Z","body":"Thanks for the feedback. I'll add similar overloads for vectors then - should not be a big deal.\r\n\r\nYes, these are going to be part of 1.7.0. The release will take about two more weeks (too many other things coming in on short notice recently...)"}}