Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

cuda sparse matrix transpose using “csr” format

I have been learning how to use cuda to accelerate sparse matrix operations. And I meet a problem that how to transpose a very large sparse matriix. I use "csr" format to store non-zero values of sparse matrix, but I dont know how to transpose it. Please help me, thank you.

    __global__ void transpose_csr(int csrRow[], int csrCol[])//change corresponding value's index for example a[0][1]=>a[1][0]
    {
        int i = threadIdx.x;
        int temp;
        temp = csrRow[i];
        csrRow[i] = csrCol[i];
        csrCol[i] = temp;
    }
    OddEvenSortGPU(TCSrRowdA, TCSrColndA, TCSrValA, NNzA);

//sort the value by row index

Comments