Lines Matching refs:cusparsestruct

74   Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr;  in MatCUSPARSESetFormat_SeqAIJCUSPARSE()  local
79 cusparsestruct->format = format; in MatCUSPARSESetFormat_SeqAIJCUSPARSE()
82 cusparsestruct->format = format; in MatCUSPARSESetFormat_SeqAIJCUSPARSE()
116 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatCUSPARSESetUseCPUSolve_SeqAIJCUSPARSE() local
119 cusparsestruct->use_cpu_solve = use_cpu; in MatCUSPARSESetUseCPUSolve_SeqAIJCUSPARSE()
167 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatSetFromOptions_SeqAIJCUSPARSE() local
172 …SpMV", "MatCUSPARSESetFormat", MatCUSPARSEStorageFormats, (PetscEnum)cusparsestruct->format, (Pets… in MatSetFromOptions_SeqAIJCUSPARSE()
175 …olve", "MatCUSPARSESetFormat", MatCUSPARSEStorageFormats, (PetscEnum)cusparsestruct->format, (Pets… in MatSetFromOptions_SeqAIJCUSPARSE()
177 … "Use CPU (I)LU solve", "MatCUSPARSESetUseCPUSolve", cusparsestruct->use_cpu_solve, &cusparsestruc… in MatSetFromOptions_SeqAIJCUSPARSE()
178 if (flg) PetscCall(MatCUSPARSESetUseCPUSolve(A, cusparsestruct->use_cpu_solve)); in MatSetFromOptions_SeqAIJCUSPARSE()
180 …SpMVAlg_t", MatCUSPARSESpMVAlgorithms, (PetscEnum)cusparsestruct->spmvAlg, (PetscEnum *)&cusparses… in MatSetFromOptions_SeqAIJCUSPARSE()
187 …SpMMAlg_t", MatCUSPARSESpMMAlgorithms, (PetscEnum)cusparsestruct->spmmAlg, (PetscEnum *)&cusparses… in MatSetFromOptions_SeqAIJCUSPARSE()
191 …lg_t", MatCUSPARSECsr2CscAlgorithms, (PetscEnum)cusparsestruct->csr2cscAlg, (PetscEnum *)&cusparse… in MatSetFromOptions_SeqAIJCUSPARSE()
1218 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatSeqAIJCUSPARSEFormExplicitTranspose() local
1226 matstruct = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->mat; in MatSeqAIJCUSPARSEFormExplicitTranspose()
1228 matstructT = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->matTranspose; in MatSeqAIJCUSPARSEFormExplicitTranspose()
1233 …if (cusparsestruct->format != MAT_CUSPARSE_CSR) PetscCall(MatSeqAIJCUSPARSEInvalidateTranspose(A, … in MatSeqAIJCUSPARSEFormExplicitTranspose()
1234 if (!cusparsestruct->matTranspose) { /* create cusparse matrix */ in MatSeqAIJCUSPARSEFormExplicitTranspose()
1249 if (cusparsestruct->format == MAT_CUSPARSE_CSR) { in MatSeqAIJCUSPARSEFormExplicitTranspose()
1259 …if (!cusparsestruct->rowoffsets_gpu) cusparsestruct->rowoffsets_gpu = new THRUSTINTARRAY32(A->rmap… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1260 cusparsestruct->rowoffsets_gpu->assign(a->i, a->i + A->rmap->n + 1); in MatSeqAIJCUSPARSEFormExplicitTranspose()
1285 …} else if (cusparsestruct->format == MAT_CUSPARSE_ELL || cusparsestruct->format == MAT_CUSPARSE_HY… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1299 …stat = cusparse_hyb2csr(cusparsestruct->handle, matstruct->descr, (cusparseHybMat_t)matstruct->mat… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1310 …stat = cusparse_csr2csc(cusparsestruct->handle, temp->num_rows, temp->num_cols, temp->num_entries,… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1317 …cusparseHybPartition_t partition = cusparsestruct->format == MAT_CUSPARSE_ELL ? CUSPARSE_HYB_PARTI… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1318 …stat = cusparse_csr2hyb(cusparsestruct->handle, A->rmap->n, A->cmap->n… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1340 …if (cusparsestruct->format == MAT_CUSPARSE_CSR) { /* transpose mat struct may be already present, … in MatSeqAIJCUSPARSEFormExplicitTranspose()
1351 …if (!cusparsestruct->rowoffsets_gpu) { /* this may be absent when we did not construct the transpo… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1352 cusparsestruct->rowoffsets_gpu = new THRUSTINTARRAY32(A->rmap->n + 1); in MatSeqAIJCUSPARSEFormExplicitTranspose()
1353 cusparsestruct->rowoffsets_gpu->assign(a->i, a->i + A->rmap->n + 1); in MatSeqAIJCUSPARSEFormExplicitTranspose()
1356 if (!cusparsestruct->csr2csc_i) { in MatSeqAIJCUSPARSEFormExplicitTranspose()
1364 …r2cscEx2_bufferSize(cusparsestruct->handle, A->rmap->n, A->cmap->n, matrix->num_entries, matrix->v… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1365 …ta().get(), cusparse_scalartype, CUSPARSE_ACTION_NUMERIC, indexBase, cusparsestruct->csr2cscAlg, &… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1378 …tat = cusparse_csr2csc(cusparsestruct->handle, A->rmap->n, A->cmap->n, matrix->num_entries, csr2cs… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1380 …ta().get(), cusparse_scalartype, CUSPARSE_ACTION_NUMERIC, indexBase, cusparsestruct->csr2cscAlg, c… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1390 cusparsestruct->csr2csc_i = new THRUSTINTARRAY(matrix->num_entries); in MatSeqAIJCUSPARSEFormExplicitTranspose()
1391 …rm(thrust::device, matrixT->values->begin(), matrixT->values->end(), cusparsestruct->csr2csc_i->be… in MatSeqAIJCUSPARSEFormExplicitTranspose()
1397 …ix->values->begin(), cusparsestruct->csr2csc_i->begin()), thrust::make_permutation_iterator(matrix… in MatSeqAIJCUSPARSEFormExplicitTranspose()
2153 Mat_SeqAIJCUSPARSE *cusparsestruct = static_cast<Mat_SeqAIJCUSPARSE *>(A->spptr); in MatLUFactorNumeric_SeqAIJCUSPARSE() local
2160 if (!cusparsestruct->use_cpu_solve) { in MatLUFactorNumeric_SeqAIJCUSPARSE()
2185 if (!cusparsestruct->use_cpu_solve) PetscCall(MatSeqAIJCUSPARSEILUAnalysisAndCopyToGPU(B)); in MatLUFactorNumeric_SeqAIJCUSPARSE()
2425 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatSeqAIJCUSPARSECopyToGPU() local
2426 Mat_SeqAIJCUSPARSEMultStruct *matstruct = cusparsestruct->mat; in MatSeqAIJCUSPARSECopyToGPU()
2435 …if (A->nonzerostate == cusparsestruct->nonzerostate && cusparsestruct->format == MAT_CUSPARSE_CSR)… in MatSeqAIJCUSPARSECopyToGPU()
2437 matrix = (CsrMatrix *)cusparsestruct->mat->mat; in MatSeqAIJCUSPARSECopyToGPU()
2449 PetscCall(MatSeqAIJCUSPARSEMultStruct_Destroy(&cusparsestruct->mat, cusparsestruct->format)); in MatSeqAIJCUSPARSECopyToGPU()
2451 delete cusparsestruct->workVector; in MatSeqAIJCUSPARSECopyToGPU()
2452 delete cusparsestruct->rowoffsets_gpu; in MatSeqAIJCUSPARSECopyToGPU()
2453 cusparsestruct->workVector = NULL; in MatSeqAIJCUSPARSECopyToGPU()
2454 cusparsestruct->rowoffsets_gpu = NULL; in MatSeqAIJCUSPARSECopyToGPU()
2473 cusparsestruct->nrows = m; in MatSeqAIJCUSPARSECopyToGPU()
2485 … PetscCallCUSPARSE(cusparseSetPointerMode(cusparsestruct->handle, CUSPARSE_POINTER_MODE_DEVICE)); in MatSeqAIJCUSPARSECopyToGPU()
2488 if (cusparsestruct->format == MAT_CUSPARSE_CSR) { in MatSeqAIJCUSPARSECopyToGPU()
2511 …} else if (cusparsestruct->format == MAT_CUSPARSE_ELL || cusparsestruct->format == MAT_CUSPARSE_HY… in MatSeqAIJCUSPARSECopyToGPU()
2530 …cusparseHybPartition_t partition = cusparsestruct->format == MAT_CUSPARSE_ELL ? CUSPARSE_HYB_PARTI… in MatSeqAIJCUSPARSECopyToGPU()
2531 …stat = cusparse_csr2hyb(cusparsestruct->handle, mat->num_rows, mat->nu… in MatSeqAIJCUSPARSECopyToGPU()
2547 PetscCallCXX(cusparsestruct->workVector = new THRUSTARRAY(m)); in MatSeqAIJCUSPARSECopyToGPU()
2552 cusparsestruct->workVector = NULL; in MatSeqAIJCUSPARSECopyToGPU()
2559 cusparsestruct->mat = matstruct; in MatSeqAIJCUSPARSECopyToGPU()
2565 cusparsestruct->nonzerostate = A->nonzerostate; in MatSeqAIJCUSPARSECopyToGPU()
3558 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatMultAddKernel_SeqAIJCUSPARSE() local
3577 matstruct = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->mat; in MatMultAddKernel_SeqAIJCUSPARSE()
3582 matstruct = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->mat; in MatMultAddKernel_SeqAIJCUSPARSE()
3584 if (!cusparsestruct->matTranspose) PetscCall(MatSeqAIJCUSPARSEFormExplicitTranspose(A)); in MatMultAddKernel_SeqAIJCUSPARSE()
3585 matstruct = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->matTranspose; in MatMultAddKernel_SeqAIJCUSPARSE()
3603 dptr = compressed ? cusparsestruct->workVector->data().get() : zarray; in MatMultAddKernel_SeqAIJCUSPARSE()
3609 if (cusparsestruct->format == MAT_CUSPARSE_CSR) { in MatMultAddKernel_SeqAIJCUSPARSE()
3620 xptr = compressed ? cusparsestruct->workVector->data().get() : xarray; in MatMultAddKernel_SeqAIJCUSPARSE()
3630 …thrust::make_zip_iterator(thrust::make_tuple(cusparsestruct->workVector->begin(), thrust::make_per… in MatMultAddKernel_SeqAIJCUSPARSE()
3631 …thrust::make_zip_iterator(thrust::make_tuple(cusparsestruct->workVector->begin(), thrust::make_per… in MatMultAddKernel_SeqAIJCUSPARSE()
3634 if (cusparsestruct->format == MAT_CUSPARSE_CSR) { in MatMultAddKernel_SeqAIJCUSPARSE()
3643 if (cusparsestruct->format == MAT_CUSPARSE_CSR) { in MatMultAddKernel_SeqAIJCUSPARSE()
3663cusparsestruct->handle, opA, matstruct->alpha_one, matDescr, matstruct->cuSpMV[opA].vecXDescr, bet… in MatMultAddKernel_SeqAIJCUSPARSE()
3667cusparsestruct->handle, opA, matstruct->alpha_one, matDescr, matstruct->cuSpMV[opA].vecXDescr, bet… in MatMultAddKernel_SeqAIJCUSPARSE()
3676cusparsestruct->handle, opA, matstruct->alpha_one, matDescr, matstruct->cuSpMV[opA].vecXDescr, bet… in MatMultAddKernel_SeqAIJCUSPARSE()
3679 …PetscCallCUSPARSE(cusparse_csr_spmv(cusparsestruct->handle, opA, mat->num_rows, mat->num_cols, mat… in MatMultAddKernel_SeqAIJCUSPARSE()
3682 if (cusparsestruct->nrows) { in MatMultAddKernel_SeqAIJCUSPARSE()
3687 …PetscCallCUSPARSE(cusparse_hyb_spmv(cusparsestruct->handle, opA, matstruct->alpha_one, matstruct->… in MatMultAddKernel_SeqAIJCUSPARSE()
3708 … PetscDefaultCudaStream>>>(n, matstruct->cprowIndices->data().get(), cusparsestruct->workVector->d… in MatMultAddKernel_SeqAIJCUSPARSE()
3757 Mat_SeqAIJCUSPARSE *cusparsestruct = (Mat_SeqAIJCUSPARSE *)A->spptr; in MatGetDiagonal_SeqAIJCUSPARSE() local
3758 …Mat_SeqAIJCUSPARSEMultStruct *matstruct = (Mat_SeqAIJCUSPARSEMultStruct *)cusparsestruct->mat; in MatGetDiagonal_SeqAIJCUSPARSE()
3766 …PetscCheck(cusparsestruct->format == MAT_CUSPARSE_CSR, PETSC_COMM_SELF, PETSC_ERR_SUP, "Only CSR f… in MatGetDiagonal_SeqAIJCUSPARSE()