Lines Matching refs:h2opus

299   Mat_H2OPUS *h2opus = (Mat_H2OPUS *)A->data;  in MatH2OpusResizeBuffers_Private()  local
307 PetscCall(PetscSFGetGraph(h2opus->sf, NULL, &n, NULL, NULL)); in MatH2OpusResizeBuffers_Private()
309 if (h2opus->xxs < xN) { in MatH2OpusResizeBuffers_Private()
310 h2opus->xx->resize(n * xN); in MatH2OpusResizeBuffers_Private()
311 h2opus->xxs = xN; in MatH2OpusResizeBuffers_Private()
313 if (h2opus->yys < yN) { in MatH2OpusResizeBuffers_Private()
314 h2opus->yy->resize(n * yN); in MatH2OpusResizeBuffers_Private()
315 h2opus->yys = yN; in MatH2OpusResizeBuffers_Private()
320 if (h2opus->xxs_gpu < xN) { in MatH2OpusResizeBuffers_Private()
321 h2opus->xx_gpu->resize(n * xN); in MatH2OpusResizeBuffers_Private()
322 h2opus->xxs_gpu = xN; in MatH2OpusResizeBuffers_Private()
324 if (h2opus->yys_gpu < yN) { in MatH2OpusResizeBuffers_Private()
325 h2opus->yy_gpu->resize(n * yN); in MatH2OpusResizeBuffers_Private()
326 h2opus->yys_gpu = yN; in MatH2OpusResizeBuffers_Private()
335 Mat_H2OPUS *h2opus = (Mat_H2OPUS *)A->data; in MatMultNKernel_H2OPUS() local
337 h2opusHandle_t handle = h2opus->handle->handle; in MatMultNKernel_H2OPUS()
339 h2opusHandle_t handle = h2opus->handle; in MatMultNKernel_H2OPUS()
346 PetscBool usesf = (PetscBool)(h2opus->sf && !h2opus->nativemult); in MatMultNKernel_H2OPUS()
358 PetscCall(MatDenseGetH2OpusStridedSF(B, h2opus->sf, &bsf)); in MatMultNKernel_H2OPUS()
359 PetscCall(MatDenseGetH2OpusStridedSF(C, h2opus->sf, &csf)); in MatMultNKernel_H2OPUS()
362 PetscCall(PetscSFGetGraph(h2opus->sf, NULL, &n, NULL, NULL)); in MatMultNKernel_H2OPUS()
371 uxx = MatH2OpusGetThrustPointer(*h2opus->xx); in MatMultNKernel_H2OPUS()
372 uyy = MatH2OpusGetThrustPointer(*h2opus->yy); in MatMultNKernel_H2OPUS()
380 …PetscCheck(h2opus->dist_hmatrix, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing distrib… in MatMultNKernel_H2OPUS()
383 … ? H2Opus_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix, uxx, blda, 0.0, uyy, clda, … in MatMultNKernel_H2OPUS()
386 …PetscCheck(h2opus->hmatrix, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing CPU matrix"); in MatMultNKernel_H2OPUS()
387 …hgemv(transA ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix, uxx, blda, 0.0, uyy, cl… in MatMultNKernel_H2OPUS()
410 uxx = MatH2OpusGetThrustPointer(*h2opus->xx_gpu); in MatMultNKernel_H2OPUS()
411 uyy = MatH2OpusGetThrustPointer(*h2opus->yy_gpu); in MatMultNKernel_H2OPUS()
420 …PetscCheck(h2opus->dist_hmatrix_gpu, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing dis… in MatMultNKernel_H2OPUS()
423 … H2Opus_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix_gpu, uxx, blda, 0.0, uyy, clda… in MatMultNKernel_H2OPUS()
426 …PetscCheck(h2opus->hmatrix_gpu, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing GPU matr… in MatMultNKernel_H2OPUS()
427 …hgemv(transA ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix_gpu, uxx, blda, 0.0, uyy… in MatMultNKernel_H2OPUS()
518 Mat_H2OPUS *h2opus = (Mat_H2OPUS *)A->data; in MatMultKernel_H2OPUS() local
520 h2opusHandle_t handle = h2opus->handle->handle; in MatMultKernel_H2OPUS()
522 h2opusHandle_t handle = h2opus->handle; in MatMultKernel_H2OPUS()
528 PetscBool usesf = (PetscBool)(h2opus->sf && !h2opus->nativemult); in MatMultKernel_H2OPUS()
536 if (usesf) PetscCall(PetscSFGetGraph(h2opus->sf, NULL, &n, NULL, NULL)); in MatMultKernel_H2OPUS()
546 uxx = MatH2OpusGetThrustPointer(*h2opus->xx); in MatMultKernel_H2OPUS()
547 uyy = MatH2OpusGetThrustPointer(*h2opus->yy); in MatMultKernel_H2OPUS()
549 PetscCall(PetscSFBcastBegin(h2opus->sf, MPIU_SCALAR, xx, uxx, MPI_REPLACE)); in MatMultKernel_H2OPUS()
550 PetscCall(PetscSFBcastEnd(h2opus->sf, MPIU_SCALAR, xx, uxx, MPI_REPLACE)); in MatMultKernel_H2OPUS()
552 PetscCall(PetscSFBcastBegin(h2opus->sf, MPIU_SCALAR, yy, uyy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
553 PetscCall(PetscSFBcastEnd(h2opus->sf, MPIU_SCALAR, yy, uyy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
560 …PetscCheck(h2opus->dist_hmatrix, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing distrib… in MatMultKernel_H2OPUS()
563 …(/*trans ? H2Opus_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix, uxx, n, sy, uyy, n,… in MatMultKernel_H2OPUS()
566 …PetscCheck(h2opus->hmatrix, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing CPU matrix"); in MatMultKernel_H2OPUS()
567 …hgemv(trans ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix, uxx, n, sy, uyy, n, 1, h… in MatMultKernel_H2OPUS()
571 PetscCall(PetscSFReduceBegin(h2opus->sf, MPIU_SCALAR, uyy, yy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
572 PetscCall(PetscSFReduceEnd(h2opus->sf, MPIU_SCALAR, uyy, yy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
588 uxx = MatH2OpusGetThrustPointer(*h2opus->xx_gpu); in MatMultKernel_H2OPUS()
589 uyy = MatH2OpusGetThrustPointer(*h2opus->yy_gpu); in MatMultKernel_H2OPUS()
591 PetscCall(PetscSFBcastBegin(h2opus->sf, MPIU_SCALAR, xx, uxx, MPI_REPLACE)); in MatMultKernel_H2OPUS()
592 PetscCall(PetscSFBcastEnd(h2opus->sf, MPIU_SCALAR, xx, uxx, MPI_REPLACE)); in MatMultKernel_H2OPUS()
594 PetscCall(PetscSFBcastBegin(h2opus->sf, MPIU_SCALAR, yy, uyy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
595 PetscCall(PetscSFBcastEnd(h2opus->sf, MPIU_SCALAR, yy, uyy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
603 …PetscCheck(h2opus->dist_hmatrix_gpu, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing dis… in MatMultKernel_H2OPUS()
606 …*trans ? H2Opus_Trans : H2Opus_NoTrans, */ h2opus->s, *h2opus->dist_hmatrix_gpu, uxx, n, sy, uyy, … in MatMultKernel_H2OPUS()
609 …PetscCheck(h2opus->hmatrix_gpu, PetscObjectComm((PetscObject)A), PETSC_ERR_PLIB, "Missing GPU matr… in MatMultKernel_H2OPUS()
610 …hgemv(trans ? H2Opus_Trans : H2Opus_NoTrans, h2opus->s, *h2opus->hmatrix_gpu, uxx, n, sy, uyy, n, … in MatMultKernel_H2OPUS()
615 PetscCall(PetscSFReduceBegin(h2opus->sf, MPIU_SCALAR, uyy, yy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
616 PetscCall(PetscSFReduceEnd(h2opus->sf, MPIU_SCALAR, uyy, yy, MPI_REPLACE)); in MatMultKernel_H2OPUS()
1091 Mat_H2OPUS *h2opus = (Mat_H2OPUS *)A->data; in MatView_H2OPUS() local
1105 dumpHMatrix(*h2opus->hmatrix, 6, fp); in MatView_H2OPUS()
1108 …PetscCall(PetscViewerASCIIPrintf(view, " H-Matrix constructed from %s\n", h2opus->kernel ? "Kerne… in MatView_H2OPUS()
1109 …ViewerASCIIPrintf(view, " PointCloud dim %" PetscInt_FMT "\n", h2opus->ptcloud ? h2opus->ptcloud-… in MatView_H2OPUS()
1110 …ibility parameters: leaf size %" PetscInt_FMT ", eta %g\n", h2opus->leafsize, (double)h2opus->eta)… in MatView_H2OPUS()
1111 if (!h2opus->kernel) { in MatView_H2OPUS()
1112 …nt_FMT ", samples %" PetscInt_FMT ", tolerance %g\n", h2opus->max_rank, h2opus->bs, (double)h2opus in MatView_H2OPUS()
1114 …IIPrintf(view, " Off-diagonal blocks approximation order %" PetscInt_FMT "\n", h2opus->basisord)); in MatView_H2OPUS()
1116 …erASCIIPrintf(view, " Number of samples for norms %" PetscInt_FMT "\n", h2opus->norm_max_samples)… in MatView_H2OPUS()
1118 double dense_mem_cpu = h2opus->hmatrix ? h2opus->hmatrix->getDenseMemoryUsage() : 0; in MatView_H2OPUS()
1119 double low_rank_cpu = h2opus->hmatrix ? h2opus->hmatrix->getLowRankMemoryUsage() : 0; in MatView_H2OPUS()
1121 double dense_mem_gpu = h2opus->hmatrix_gpu ? h2opus->hmatrix_gpu->getDenseMemoryUsage() : 0; in MatView_H2OPUS()
1122 … double low_rank_gpu = h2opus->hmatrix_gpu ? h2opus->hmatrix_gpu->getLowRankMemoryUsage() : 0; in MatView_H2OPUS()
1137 matrix_mem[0] = h2opus->dist_hmatrix ? h2opus->dist_hmatrix->getLocalDenseMemoryUsage() : 0; in MatView_H2OPUS()
1138 … matrix_mem[1] = h2opus->dist_hmatrix ? h2opus->dist_hmatrix->getLocalLowRankMemoryUsage() : 0; in MatView_H2OPUS()
1140 …matrix_mem[2] = h2opus->dist_hmatrix_gpu ? h2opus->dist_hmatrix_gpu->getLocalDenseMemoryUsage() : … in MatView_H2OPUS()
1141 …matrix_mem[3] = h2opus->dist_hmatrix_gpu ? h2opus->dist_hmatrix_gpu->getLocalLowRankMemoryUsage() … in MatView_H2OPUS()
1161 outputEps(*h2opus->hmatrix, filename); in MatView_H2OPUS()
1168 Mat_H2OPUS *h2opus = (Mat_H2OPUS *)A->data; in MatH2OpusSetCoords_H2OPUS() local
1199 delete h2opus->ptcloud; in MatH2OpusSetCoords_H2OPUS()
1200 delete h2opus->kernel; in MatH2OpusSetCoords_H2OPUS()
1201 h2opus->ptcloud = new PetscPointCloud<PetscReal>(spacedim, N, gcoords); in MatH2OpusSetCoords_H2OPUS()
1202 if (kernel) h2opus->kernel = new PetscFunctionGenerator<PetscScalar>(kernel, spacedim, kernelctx); in MatH2OpusSetCoords_H2OPUS()
1598 Mat_H2OPUS *h2opus; in MatCreateH2OpusFromKernel() local
1610 h2opus = (Mat_H2OPUS *)A->data; in MatCreateH2OpusFromKernel()
1611 if (eta > 0.) h2opus->eta = eta; in MatCreateH2OpusFromKernel()
1612 if (leafsize > 0) h2opus->leafsize = leafsize; in MatCreateH2OpusFromKernel()
1613 if (basisord > 0) h2opus->basisord = basisord; in MatCreateH2OpusFromKernel()
1656 Mat_H2OPUS *h2opus; in MatCreateH2OpusFromMat() local
1695 h2opus = (Mat_H2OPUS *)A->data; in MatCreateH2OpusFromMat()
1696 h2opus->sampler = new PetscMatrixSampler(B); in MatCreateH2OpusFromMat()
1697 if (eta > 0.) h2opus->eta = eta; in MatCreateH2OpusFromMat()
1698 if (leafsize > 0) h2opus->leafsize = leafsize; in MatCreateH2OpusFromMat()
1699 if (maxrank > 0) h2opus->max_rank = maxrank; in MatCreateH2OpusFromMat()
1700 if (bs > 0) h2opus->bs = bs; in MatCreateH2OpusFromMat()
1701 if (rtol > 0.) h2opus->rtol = rtol; in MatCreateH2OpusFromMat()