Merged
Merged
Conversation
| @@ -307,7 +307,7 @@ af_err af_sparse_convert_to(af_array *out, const af_array in, | |||
|
|
|||
| // Right now dest_storage can only be AF_STORAGE_DENSE | |||
|
|
||
| ovPtr[0] = 0; | ||
| for(int x = 0; x < (int)ovalues.elements(); x++) { | ||
| int row = std::get<0>(pairKeyVal[x]); |
| @@ -339,18 +339,52 @@ Array<T> sparseConvertStorageToDense(const SparseArray<T> &in_) | |||
| //////////////////////////////////////////////////////////////////////////////// | |||
| // Common to MKL and Not MKL | |||
| Array<int> irowIdx = in_.getRowIdx(); | ||
| Array<int> icolIdx = in_.getColIdx(); | ||
|
|
||
| kernel::csr_coo<T>()(ovalues, orowIdx, ocolIdx, ivalues, irowIdx, icolIdx); |
| int *, int *); | ||
| }; | ||
|
|
||
| //cusparseStatus_t cusparseZgthr(cusparseHandle_t handle, |
| int *P = memAlloc<int>(nNZ); | ||
| CUSPARSE_CHECK(cusparseCreateIdentityPermutation(getHandle(), nNZ, P)); | ||
|
|
||
| CUSPARSE_CHECK(cusparseXcoosortByColumn( |
| converted.getRowIdx().get(), converted.getColIdx().get(), | ||
| P, (void*)pBuffer)); | ||
|
|
||
| CUSPARSE_CHECK(gthr_func<T>()( |
| char *pBuffer = memAlloc<char>(pBufferSizeInBytes); | ||
|
|
||
| int *P = memAlloc<int>(nNZ); | ||
| CUSPARSE_CHECK(cusparseCreateIdentityPermutation(getHandle(), nNZ, P)); |
| int *P = memAlloc<int>(nNZ); | ||
| CUSPARSE_CHECK(cusparseCreateIdentityPermutation(getHandle(), nNZ, P)); | ||
|
|
||
| CUSPARSE_CHECK(cusparseXcoosortByRow( |
| cooT.getRowIdx().get(), cooT.getColIdx().get(), | ||
| P, (void*)pBuffer)); | ||
|
|
||
| CUSPARSE_CHECK(gthr_func<T>()( |