| /petsc/src/sys/utils/ |
| H A D | segbuffer.c | 19 size_t unitbytes; member 30 …alloc = PetscMax(s->used + count, PetscMin(1000000 / ((PetscCount)seg->unitbytes) + 1, s->alloc + … in PetscSegBufferAlloc_Private() 31 …PetscCall(PetscMalloc(offsetof(struct _PetscSegBufferLink, u) + alloc * seg->unitbytes, &newlink)); in PetscSegBufferAlloc_Private() 58 PetscErrorCode PetscSegBufferCreate(size_t unitbytes, PetscCount expected, PetscSegBuffer *seg) in PetscSegBufferCreate() argument 64 PetscCall(PetscMalloc(offsetof(struct _PetscSegBufferLink, u) + expected * unitbytes, &head)); in PetscSegBufferCreate() 68 (*seg)->unitbytes = unitbytes; in PetscSegBufferCreate() 98 *(char **)buf = &s->u.array[s->used * seg->unitbytes]; in PetscSegBufferGet() 146 size_t unitbytes; in PetscSegBufferExtractTo() local 151 unitbytes = seg->unitbytes; in PetscSegBufferExtractTo() 153 ptr = PetscSafePointerPlusOffset((char *)contig, s->tailused * unitbytes); in PetscSegBufferExtractTo() [all …]
|
| H A D | mpits.c | 76 MPI_Aint lb, unitbytes; in PetscCommBuildTwoSided_Ibarrier() local 84 PetscCallMPI(MPI_Type_get_extent(dtype, &lb, &unitbytes)); in PetscCommBuildTwoSided_Ibarrier() 88 …for (i = 0; i < nto; i++) PetscCallMPI(MPI_Issend((void *)(tdata + count * unitbytes * i), count, … in PetscCommBuildTwoSided_Ibarrier() 90 PetscCall(PetscSegBufferCreate(unitbytes, 4 * count, &segdata)); in PetscCommBuildTwoSided_Ibarrier() 136 MPI_Aint lb, unitbytes; in PetscCommBuildTwoSided_Allreduce() local 158 PetscCallMPI(MPI_Type_get_extent(dtype, &lb, &unitbytes)); in PetscCommBuildTwoSided_Allreduce() 160 PetscCall(PetscMalloc(nrecvs * count * unitbytes, &fdata)); in PetscCommBuildTwoSided_Allreduce() 164 …for (i = 0; i < nrecvs; i++) PetscCallMPI(MPIU_Irecv((void *)(fdata + count * unitbytes * i), coun… in PetscCommBuildTwoSided_Allreduce() 165 …for (i = 0; i < nto; i++) PetscCallMPI(MPIU_Isend((void *)(tdata + count * unitbytes * i), count, … in PetscCommBuildTwoSided_Allreduce() 182 MPI_Aint lb, unitbytes; in PetscCommBuildTwoSided_RedScatter() local [all …]
|
| /petsc/src/vec/is/sf/impls/basic/nvshmem/ |
| H A D | sfnvshmem.cu | 327 …nt *srcranks, const char *src, PetscInt *srcdisp, char *dst, PetscInt *dstdisp, PetscInt unitbytes) in GetDataFromRemotelyAccessible() argument 333 PetscInt nelems = (dstdisp[bid + 1] - dstdisp[bid]) * unitbytes; in GetDataFromRemotelyAccessible() 334 …nvshmem_getmem_nbi(dst + (dstdisp[bid] - dstdisp[0]) * unitbytes, src + srcdisp[bid] * unitbytes, … in GetDataFromRemotelyAccessible() 415 … link->remoteCommStream>>>(nsrcranks, srcranks_d, src, srcdisp_d, dst, dstdisp_d, link->unitbytes); in PetscSFLinkGetDataBegin_NVSHMEM() 424 size_t nelems = (dstdisp_h[i + 1] - dstdisp_h[i]) * link->unitbytes; in PetscSFLinkGetDataBegin_NVSHMEM() 425 …n_stream(dst + (dstdisp_h[i] - dstdisp_h[0]) * link->unitbytes, src + srcdisp_h[i] * link->unitbyt… in PetscSFLinkGetDataBegin_NVSHMEM() 488 … *dst, PetscInt *dstdisp, const char *src, PetscInt *srcdisp, uint64_t *srcsig, PetscInt unitbytes) in WaitAndPutDataToRemotelyAccessible() argument 494 PetscInt nelems = (srcdisp[bid + 1] - srcdisp[bid]) * unitbytes; in WaitAndPutDataToRemotelyAccessible() 497 …nvshmem_putmem_nbi(dst + dstdisp[bid] * unitbytes, src + (srcdisp[bid] - srcdisp[0]) * unitbytes, … in WaitAndPutDataToRemotelyAccessible() 565 …emoteCommStream>>>(ndstranks, dstranks_d, dst, dstdisp_d, src, srcdisp_d, srcsig, link->unitbytes); in PetscSFLinkPutDataBegin_NVSHMEM() [all …]
|
| /petsc/src/vec/is/sf/impls/basic/ |
| H A D | sfmpi.c | 23 …t size = (bas->ioffset[i + bas->ndiranks + 1] - bas->ioffset[i + bas->ndiranks]) * link->unitbytes; in PetscSFLinkFinishCommunication_Default() 29 … size_t size = (sf->roffset[i + sf->ndranks + 1] - sf->roffset[i + sf->ndranks]) * link->unitbytes; in PetscSFLinkFinishCommunication_Default() 190 link->rootbuf[i][rootmtype] = (char *)rootdata + bas->rootstart[i] * link->unitbytes; in PetscSFLinkCreate_MPI() 192 …ype]) PetscCall(PetscSFMalloc(sf, rootmtype, bas->rootbuflen[i] * link->unitbytes, (void **)&link-… in PetscSFLinkCreate_MPI() 199 link->leafbuf[i][leafmtype] = (char *)leafdata + sf->leafstart[i] * link->unitbytes; in PetscSFLinkCreate_MPI() 201 …type]) PetscCall(PetscSFMalloc(sf, leafmtype, sf->leafbuflen[i] * link->unitbytes, (void **)&link-… in PetscSFLinkCreate_MPI() 210 …PE_HOST]) PetscCall(PetscMalloc(bas->rootbuflen[PETSCSF_REMOTE] * link->unitbytes, &link->rootbuf_… in PetscSFLinkCreate_MPI() 214 …YPE_HOST]) PetscCall(PetscMalloc(sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes, &link->leafbuf_… in PetscSFLinkCreate_MPI()
|
| H A D | sfbasic.c | 23 disp = (rootoffset[i] - rootoffset[ndrootranks]) * link->unitbytes; in PetscSFLinkInitMPIRequests_Persistent_Basic() 29 disp = (rootoffset[i] - rootoffset[ndrootranks]) * link->unitbytes; in PetscSFLinkInitMPIRequests_Persistent_Basic() 41 disp = (leafoffset[i] - leafoffset[ndleafranks]) * link->unitbytes; in PetscSFLinkInitMPIRequests_Persistent_Basic() 47 disp = (leafoffset[i] - leafoffset[ndleafranks]) * link->unitbytes; in PetscSFLinkInitMPIRequests_Persistent_Basic() 114 disp = (rootoffset[i] - rootoffset[ndrootranks]) * link->unitbytes; in PetscSFLinkStartCommunication_MPIX_Stream() 120 disp = (rootoffset[i] - rootoffset[ndrootranks]) * link->unitbytes; in PetscSFLinkStartCommunication_MPIX_Stream() 132 disp = (leafoffset[i] - leafoffset[ndleafranks]) * link->unitbytes; in PetscSFLinkStartCommunication_MPIX_Stream() 139 disp = (leafoffset[i] - leafoffset[ndleafranks]) * link->unitbytes; in PetscSFLinkStartCommunication_MPIX_Stream() 304 PetscScalar unitbytes; in PetscSFView_Basic_PatternAndSizes() local 320 unitbytes = (PetscScalar)sizeof(PetscScalar); in PetscSFView_Basic_PatternAndSizes() [all …]
|
| H A D | sfpack.c | 538 link->unitbytes = 2 * sizeof(int); in PetscSFLinkSetUp_Host() 545 link->unitbytes = 2 * sizeof(PetscInt); in PetscSFLinkSetUp_Host() 559 link->unitbytes = nPetscReal * sizeof(PetscReal); in PetscSFLinkSetUp_Host() 575 link->unitbytes = nPetscInt * sizeof(PetscInt); in PetscSFLinkSetUp_Host() 592 link->unitbytes = nInt * sizeof(int); in PetscSFLinkSetUp_Host() 609 link->unitbytes = nSignedChar * sizeof(SignedChar); in PetscSFLinkSetUp_Host() 625 link->unitbytes = nUnsignedChar * sizeof(UnsignedChar); in PetscSFLinkSetUp_Host() 642 link->unitbytes = nPetscComplex * sizeof(PetscComplex); in PetscSFLinkSetUp_Host() 662 link->unitbytes = nbyte; in PetscSFLinkSetUp_Host() 675 link->unitbytes = nbyte; in PetscSFLinkSetUp_Host() [all …]
|
| H A D | sfpack.h | 175 size_t unitbytes; /* Number of bytes in a unit */ member 309 size_t count = bas->rootbuflen[PETSCSF_REMOTE] * link->unitbytes; in PetscSFLinkCopyRootBufferInCaseNotUseGpuAwareMPI() 327 size_t count = sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes; in PetscSFLinkCopyLeafBufferInCaseNotUseGpuAwareMPI()
|
| /petsc/src/vec/is/sf/impls/basic/allgather/ |
| H A D | sfallgather.c | 66 …ype, (const char *)leafdata + (size_t)rstart * link->unitbytes, (size_t)sf->nroots * link->unitbyt… in PetscSFReduceBegin_Allgather() 75 …FMalloc(sf, link->leafmtype_mpi, sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes, (void **)&link-… in PetscSFReduceBegin_Allgather() 107 …k->leafbuf[PETSCSF_REMOTE][PETSC_MEMTYPE_HOST], sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes)); in PetscSFBcastToZero_Allgather()
|
| /petsc/src/vec/is/sf/impls/basic/allgatherv/ |
| H A D | sfallgatherv.c | 120 … link->leafmtype_mpi, leafbuf, link->rootmtype_mpi, rootbuf, (size_t)sendcount * link->unitbytes)); in PetscSFBcastBegin_Allgatherv() 144 …ype, (const char *)leafdata + (size_t)rstart * link->unitbytes, (size_t)sf->nroots * link->unitbyt… in PetscSFReduceBegin_Allgatherv() 184 …FMalloc(sf, link->leafmtype_mpi, sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes, (void **)&link-… in PetscSFReduceBegin_Allgatherv() 238 …EMTYPE_HOST, link->leafbuf[PETSC_MEMTYPE_HOST], sf->leafbuflen[PETSCSF_REMOTE] * link->unitbytes)); in PetscSFBcastToZero_Allgatherv() 293 …((*link->Memcpy)(link, leafmtype, leafupdate, leafmtype, leafdata, sf->nleaves * link->unitbytes)); in PetscSFFetchAndOpBegin_Allgatherv()
|
| /petsc/src/dm/dt/interface/ |
| H A D | dtweakform.c | 7 static PetscErrorCode PetscChunkBufferCreate(size_t unitbytes, PetscCount expected, PetscChunkBuffe… in PetscChunkBufferCreate() argument 11 PetscCall(PetscCalloc1(expected * unitbytes, &(*buffer)->array)); in PetscChunkBufferCreate() 13 (*buffer)->unitbytes = unitbytes; in PetscChunkBufferCreate() 14 (*buffer)->alloc = expected * unitbytes; in PetscChunkBufferCreate() 22 PetscCall(PetscCalloc1(buffer->size * buffer->unitbytes, &(*bufferNew)->array)); in PetscChunkBufferDuplicate() 23 PetscCall(PetscMemcpy((*bufferNew)->array, buffer->array, buffer->size * buffer->unitbytes)); in PetscChunkBufferDuplicate() 25 (*bufferNew)->unitbytes = buffer->unitbytes; in PetscChunkBufferDuplicate() 26 (*bufferNew)->alloc = buffer->size * buffer->unitbytes; in PetscChunkBufferDuplicate() 41 if ((buffer->size + size) * buffer->unitbytes > buffer->alloc) { in PetscChunkBufferCreateChunk() 44 if (!buffer->alloc) buffer->alloc = (buffer->size + size) * buffer->unitbytes; in PetscChunkBufferCreateChunk() [all …]
|
| /petsc/include/petsc/private/ |
| H A D | petscdsimpl.h | 38 size_t unitbytes; /* Number of bytes per entry */ member
|
| /petsc/src/vec/is/sf/impls/basic/cupm/ |
| H A D | sfcupm_impl.hpp | 283 …CallCUPM(cupmMemcpyAsync(buf, (char *)data + start * link->unitbytes, count * link->unitbytes, cup… in Pack() 299 …tscCallCUPM(cupmMemcpyAsync((char *)data + start * link->unitbytes, buf, count * link->unitbytes, … in UnpackAndOp() 368 …tart * link->bs, (const Type *)src + srcStart * link->bs, count * link->unitbytes, cupmMemcpyDevic… in ScatterAndInsert()
|
| /petsc/src/vec/is/sf/impls/basic/kokkos/ |
| H A D | sfkok.kokkos.cxx | 368 size_t sz = count * link->unitbytes; in ScatterAndInsert()
|