{"action":"created","issue":{"url":"https://api.github.com/repos/BIDData/BIDMat/issues/27","labels_url":"https://api.github.com/repos/BIDData/BIDMat/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/BIDData/BIDMat/issues/27/comments","events_url":"https://api.github.com/repos/BIDData/BIDMat/issues/27/events","html_url":"https://github.com/BIDData/BIDMat/issues/27","id":72707312,"number":27,"title":"GSMat contains no transpose method","user":{"login":"DanielTakeshi","id":5532096,"avatar_url":"https://avatars.githubusercontent.com/u/5532096?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielTakeshi","html_url":"https://github.com/DanielTakeshi","followers_url":"https://api.github.com/users/DanielTakeshi/followers","following_url":"https://api.github.com/users/DanielTakeshi/following{/other_user}","gists_url":"https://api.github.com/users/DanielTakeshi/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielTakeshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielTakeshi/subscriptions","organizations_url":"https://api.github.com/users/DanielTakeshi/orgs","repos_url":"https://api.github.com/users/DanielTakeshi/repos","events_url":"https://api.github.com/users/DanielTakeshi/events{/privacy}","received_events_url":"https://api.github.com/users/DanielTakeshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-02T22:19:46Z","updated_at":"2015-09-27T16:42:30Z","closed_at":null,"body":"The GSMat class contains no transpose method. Something like this might work:\r\n\r\n```\r\noverride def t = {\r\n  val out = GSMat.newOrCheckGSMat(ncols, nrows, nnz0, null, GUID, \"t\".##)\r\n  CUMATD.transpose(this.data, nrows, out.data, ncols, nrows, ncols)\r\n  cudaDeviceSynchronize()\r\n  out\r\n}\r\n```\r\n\r\n(Note the extra nnz0 term to include when checking the cache for GSMats).\r\n\r\nHowever, I did a few tests and got some weird behavior when multiplying GSMats with other matrices (e.g., ```GSMat(a) * GMat(mkdiag(ones(3,1)))```), so I just wanted to check in and see if GSMats were really supposed to have transposes. It seems like they should because SMats have transposes."},"comment":{"url":"https://api.github.com/repos/BIDData/BIDMat/issues/comments/143575884","html_url":"https://github.com/BIDData/BIDMat/issues/27#issuecomment-143575884","issue_url":"https://api.github.com/repos/BIDData/BIDMat/issues/27","id":143575884,"user":{"login":"jcanny","id":1195924,"avatar_url":"https://avatars.githubusercontent.com/u/1195924?v=3","gravatar_id":"","url":"https://api.github.com/users/jcanny","html_url":"https://github.com/jcanny","followers_url":"https://api.github.com/users/jcanny/followers","following_url":"https://api.github.com/users/jcanny/following{/other_user}","gists_url":"https://api.github.com/users/jcanny/gists{/gist_id}","starred_url":"https://api.github.com/users/jcanny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcanny/subscriptions","organizations_url":"https://api.github.com/users/jcanny/orgs","repos_url":"https://api.github.com/users/jcanny/repos","events_url":"https://api.github.com/users/jcanny/events{/privacy}","received_events_url":"https://api.github.com/users/jcanny/received_events","type":"User","site_admin":false},"created_at":"2015-09-27T16:42:30Z","updated_at":"2015-09-27T16:42:30Z","body":"Transposing sparse matrices into a valid representation (CSC +COO in BIDMat) is very expensive because it requires a resort of indices. On the other hand, transpose of dense matrices is fast. Its often possible to get the result you want without sparse transpose. e.g. for a sparse S and dense M,\r\n\r\nM * S^T = M *^ S (*^ is directly implemented)\r\nS^T * M = (M^T * S)^T (two dense transposes)\r\n\r\nWe should probably implement this some time, but we need to find a way to discourage people from using it. "}}