| /petsc/src/mat/impls/sell/seq/seqcuda/ |
| H A D | sellcuda.cu | 13 PetscInt *sliidx; /* slice index array, device pointer */ member 28 if ((*cudastruct)->sliidx) PetscCallCUDA(cudaFree((*cudastruct)->sliidx)); in MatSeqSELLCUDA_Destroy() 45 …PetscCallCUDA(cudaMemcpy(cudastruct->val, a->val, a->sliidx[a->totalslices] * sizeof(MatScalar), c… in MatSeqSELLCUDACopyToGPU() 46 PetscCall(PetscLogCpuToGpu(a->sliidx[a->totalslices] * (sizeof(MatScalar)))); in MatSeqSELLCUDACopyToGPU() 50 if (cudastruct->sliidx) PetscCallCUDA(cudaFree(cudastruct->sliidx)); in MatSeqSELLCUDACopyToGPU() 53 cudastruct->totalentries = a->sliidx[a->totalslices]; in MatSeqSELLCUDACopyToGPU() 59 …PetscCallCUDA(cudaMemcpy(cudastruct->colidx, a->colidx, a->sliidx[a->totalslices] * sizeof(*a->col… in MatSeqSELLCUDACopyToGPU() 60 …PetscCallCUDA(cudaMemcpy(cudastruct->val, a->val, a->sliidx[a->totalslices] * sizeof(*a->val), cud… in MatSeqSELLCUDACopyToGPU() 62 …PetscCallCUDA(cudaMalloc((void **)&cudastruct->sliidx, (a->totalslices + 1) * sizeof(*cudastruct->… in MatSeqSELLCUDACopyToGPU() 63 …PetscCallCUDA(cudaMemcpy(cudastruct->sliidx, a->sliidx, (a->totalslices + 1) * sizeof(*a->sliidx),… in MatSeqSELLCUDACopyToGPU() [all …]
|
| /petsc/src/mat/impls/sell/seq/seqhip/ |
| H A D | sellhip.hip.cxx | 16 PetscInt *sliidx; /* slice index array, device pointer */ member 31 if ((*hipstruct)->sliidx) PetscCallHIP(hipFree((*hipstruct)->sliidx)); in MatSeqSELLHIP_Destroy() 48 …PetscCallHIP(hipMemcpy(hipstruct->val, a->val, a->sliidx[a->totalslices] * sizeof(MatScalar), hipM… in MatSeqSELLHIPCopyToGPU() 49 PetscCall(PetscLogCpuToGpu(a->sliidx[a->totalslices] * (sizeof(MatScalar)))); in MatSeqSELLHIPCopyToGPU() 53 if (hipstruct->sliidx) PetscCallHIP(hipFree(hipstruct->sliidx)); in MatSeqSELLHIPCopyToGPU() 56 hipstruct->totalentries = a->sliidx[a->totalslices]; in MatSeqSELLHIPCopyToGPU() 62 …PetscCallHIP(hipMemcpy(hipstruct->colidx, a->colidx, a->sliidx[a->totalslices] * sizeof(*a->colidx… in MatSeqSELLHIPCopyToGPU() 63 …PetscCallHIP(hipMemcpy(hipstruct->val, a->val, a->sliidx[a->totalslices] * sizeof(*a->val), hipMem… in MatSeqSELLHIPCopyToGPU() 65 …PetscCallHIP(hipMalloc((void **)&hipstruct->sliidx, (a->totalslices + 1) * sizeof(*hipstruct->slii… in MatSeqSELLHIPCopyToGPU() 66 …PetscCallHIP(hipMemcpy(hipstruct->sliidx, a->sliidx, (a->totalslices + 1) * sizeof(*a->sliidx), hi… in MatSeqSELLHIPCopyToGPU() [all …]
|
| /petsc/src/mat/impls/sell/seq/ |
| H A D | sell.h | 45 PetscInt *sliidx; /* slice index */ \ 148 …= 0.0 && a->ignorezeroentries) && a->rlen[row] >= (a->sliidx[row / a->sliceheight + 1] - a->sliidx… 150 if (a->maxallocmat < a->sliidx[a->totalslices] + a->sliceheight) { \ 158 PetscCall(PetscArraycpy(new_val, a->val, a->sliidx[row / a->sliceheight + 1])); \ 159 PetscCall(PetscArraycpy(new_colidx, a->colidx, a->sliidx[row / a->sliceheight + 1])); \ 160 …sliidx[row / a->sliceheight + 1] + a->sliceheight, PetscSafePointerPlusOffset(a->val, a->sliidx[ro… 161 …sliidx[row / a->sliceheight + 1] + a->sliceheight, PetscSafePointerPlusOffset(a->colidx, a->sliidx… 163 cp = new_colidx + a->sliidx[row / a->sliceheight] + (row % a->sliceheight); \ 164 vp = new_val + a->sliidx[row / a->sliceheight] + (row % a->sliceheight); \ 174 …val + a->sliidx[row / a->sliceheight + 1] + a->sliceheight, a->val + a->sliidx[row / a->sliceheigh… [all …]
|
| H A D | sell.c | 132 …if (!b->sliidx) { /* sliidx gives the starting index of each slice, the last element is the total … in MatSeqSELLSetPreallocation_SeqSELL() 133 PetscCall(PetscMalloc1(totalslices + 1, &b->sliidx)); in MatSeqSELLSetPreallocation_SeqSELL() 143 for (i = 0; i <= totalslices; i++) b->sliidx[i] = b->sliceheight * i * maxallocrow; in MatSeqSELLSetPreallocation_SeqSELL() 149 b->sliidx[0] = 0; in MatSeqSELLSetPreallocation_SeqSELL() 151 b->sliidx[i] = 0; in MatSeqSELLSetPreallocation_SeqSELL() 152 …for (j = 0; j < b->sliceheight; j++) b->sliidx[i] = PetscMax(b->sliidx[i], rlen[b->sliceheight * (… in MatSeqSELLSetPreallocation_SeqSELL() 155 rlenmax = PetscMax(b->sliidx[i], rlenmax); in MatSeqSELLSetPreallocation_SeqSELL() 156 b->sliidx[i] = ((b->sliidx[i] - 1) / mul + 1) * mul; in MatSeqSELLSetPreallocation_SeqSELL() 159 maxallocrow = PetscMax(b->sliidx[i], maxallocrow); in MatSeqSELLSetPreallocation_SeqSELL() 160 PetscCall(PetscIntSumError(b->sliidx[i - 1], b->sliceheight * b->sliidx[i], &b->sliidx[i])); in MatSeqSELLSetPreallocation_SeqSELL() [all …]
|
| H A D | fdsell.c | 30 for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = ((row + 1) & 0x07)) { in MatGetColumnIJ_SeqSELL_Color() 31 isnonzero = (PetscBool)((j - a->sliidx[i]) / 8 < a->rlen[8 * i + row]); in MatGetColumnIJ_SeqSELL_Color() 41 for (j = a->sliidx[i], row = 0; j < a->sliidx[i + 1]; j++, row = ((row + 1) & 0x07)) { in MatGetColumnIJ_SeqSELL_Color() 42 isnonzero = (PetscBool)((j - a->sliidx[i]) / 8 < a->rlen[8 * i + row]); in MatGetColumnIJ_SeqSELL_Color()
|
| /petsc/src/mat/impls/sell/mpi/ |
| H A D | mmsell.c | 58 …for (j = Bsell->sliidx[i], row = 0; j < Bsell->sliidx[i + 1]; j++, row = (row + 1) % Bsell->sliceh… in MatDisAssemble_MPISELL() 59 …isnonzero = (PetscBool)((j - Bsell->sliidx[i]) / Bsell->sliceheight < Bsell->rlen[Bsell->sliceheig… in MatDisAssemble_MPISELL() 97 for (j = B->sliidx[i]; j < B->sliidx[i + 1]; j++) { in MatSetUpMultiply_MPISELL() 98 …isnonzero = (PetscBool)((j - B->sliidx[i]) / B->sliceheight < B->rlen[i * B->sliceheight + j % B->… in MatSetUpMultiply_MPISELL() 126 for (j = B->sliidx[i]; j < B->sliidx[i + 1]; j++) { in MatSetUpMultiply_MPISELL() 127 …isnonzero = (PetscBool)((j - B->sliidx[i]) / B->sliceheight < B->rlen[i * B->sliceheight + j % B->… in MatSetUpMultiply_MPISELL() 144 for (j = B->sliidx[i]; j < B->sliidx[i + 1]; j++) { in MatSetUpMultiply_MPISELL() 145 …isnonzero = (PetscBool)((j - B->sliidx[i]) / B->sliceheight < B->rlen[i * B->sliceheight + j % B->… in MatSetUpMultiply_MPISELL() 165 for (j = B->sliidx[i]; j < B->sliidx[i + 1]; j++) { in MatSetUpMultiply_MPISELL() 166 …isnonzero = (PetscBool)((j - B->sliidx[i]) / B->sliceheight < B->rlen[i * B->sliceheight + j % B->… in MatSetUpMultiply_MPISELL()
|
| H A D | mpisell.c | 92 …MatSeqXSELLReallocateSELL(A, am, 1, nrow1, a->sliidx, a->sliceheight, row / sliceheight, row, col,… 136 …MatSeqXSELLReallocateSELL(B, bm, 1, nrow2, b->sliidx, b->sliceheight, row / sliceheight, row, col,… 174 shift1 = a->sliidx[row / sliceheight] + (row % sliceheight); /* starting index of the row */ in MatSetValues_MPISELL() 181 shift2 = b->sliidx[row / sliceheight] + (row % sliceheight); /* starting index of the row */ in MatSetValues_MPISELL() 216 … shift2 = b->sliidx[row / sliceheight] + (row % sliceheight); /* starting index of the row */ in MatSetValues_MPISELL() 623 for (j = Aloc->sliidx[i]; j < Aloc->sliidx[i + 1]; j++) { in MatView_MPISELL_ASCIIorDraworSocket() 624 …isnonzero = (PetscBool)((j - Aloc->sliidx[i]) / Aloc->sliceheight < Aloc->rlen[i * Aloc->sliceheig… in MatView_MPISELL_ASCIIorDraworSocket() 640 for (j = Aloc->sliidx[i]; j < Aloc->sliidx[i + 1]; j++) { in MatView_MPISELL_ASCIIorDraworSocket() 641 …isnonzero = (PetscBool)((j - Aloc->sliidx[i]) / Aloc->sliceheight < Aloc->rlen[i * Aloc->sliceheig… in MatView_MPISELL_ASCIIorDraworSocket()
|
| /petsc/src/mat/impls/aij/mpi/mumps/ |
| H A D | mumps.c | 828 nz = a->sliidx[a->totalslices]; in MatConvertToTriples_seqsell_seqaij() 832 …for (j = a->sliidx[i], r = 0; j < a->sliidx[i + 1]; j++, r = ((r + 1) & 0x07)) PetscCall(PetscMUMP… in MatConvertToTriples_seqsell_seqaij()
|