Question: Please comment code, language is in C /* This function coverts a sparse matrix stored in coo format to CSR. input parameters: these are 'consumed'
Please comment code, language is in C
/* This function coverts a sparse matrix stored in coo format to CSR. input parameters: these are 'consumed' by this function int* row_ind row index for the non-zeros in coo int* col ind column index for the non-zeros in coo double* val values for the non-zeros in coo int # of rows in the matrix int # of columns in the matrix int nnz # of non-zeros in the matrix these are 'produced' by this function unsigned int** csr_row_ptr row pointers to csr_col_ind and csr_vals in CSR unsigned int** csr_col_ind column index for the non-zeros in CSR double** csr_vals values for the non-zeros in CSR return parameters: none void convert_coo_to_csr(int* row_ind, int* col_ind, double* val, int m, int n, int nnz, unsigned int** csr_row_ptr, unsigned int** csr_col_ind, 'double** csr_vals) wah
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
