{"action":"opened","issue":{"url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/214","repository_url":"https://api.github.com/repos/viennacl/viennacl-dev","labels_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/214/comments","events_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/214/events","html_url":"https://github.com/viennacl/viennacl-dev/issues/214","id":194830745,"number":214,"title":"Update only coefficients of a sparse matrix","user":{"login":"jdumas","id":578702,"avatar_url":"https://avatars.githubusercontent.com/u/578702?v=3","gravatar_id":"","url":"https://api.github.com/users/jdumas","html_url":"https://github.com/jdumas","followers_url":"https://api.github.com/users/jdumas/followers","following_url":"https://api.github.com/users/jdumas/following{/other_user}","gists_url":"https://api.github.com/users/jdumas/gists{/gist_id}","starred_url":"https://api.github.com/users/jdumas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdumas/subscriptions","organizations_url":"https://api.github.com/users/jdumas/orgs","repos_url":"https://api.github.com/users/jdumas/repos","events_url":"https://api.github.com/users/jdumas/events{/privacy}","received_events_url":"https://api.github.com/users/jdumas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-11T13:02:14Z","updated_at":"2016-12-11T13:02:14Z","closed_at":null,"body":"Hi,\r\n\r\nI have a sparse matrix in CRS format that I want to transfer from the CPU to the GPU using ViennaCL. During computation, I need to update the coeffcients of the sparse-matrix, but without changing its sparsity pattern. Is there a way to update only the buffer of elements in a sparse matrix in ViennaCL?\r\n\r\nMoreover, I was wondering if there was a low-level `copy()` function for `viennacl::compressed_matrix<T>`, that could take 3 pointers to a matrix in CRS format? The requirements from the [documentation](http://viennacl.sourceforge.net/doc/manual-types.html#manual-types-sparse-compressed-usage) seem a bit heavy as one need to provide a custom data type. For example, Eigen provides a low-level API to access the pointers of the CRS format directly:\r\n\r\n    sm1.valuePtr();      // Pointer to the values\r\n    sm1.innerIndextr();  // Pointer to the indices.\r\n    sm1.outerIndexPtr(); // Pointer to the beginning of each inner vector\r\n\r\nWould it be possible to implement the `copy()` function without duplicating the CPU matrix on the host memory (as this [seems to be](https://github.com/viennacl/viennacl-dev/blob/a50be8202f67a968c356d687bdd553576b6a7f60/viennacl/compressed_matrix.hpp#L256) done in the current implementation)?"}}
{"actor":{"display_login":"jdumas"}}