VecCreateMPIHIPWithArrays#

Creates a parallel, array-style vector using HIP, where the user provides the complete array space to store the vector values.

Synopsis#

#include <petscvec.h> 
PetscErrorCode VecCreateMPIHIPWithArrays(MPI_Comm comm, PetscInt bs, PetscInt n, PetscInt N, const PetscScalar cpuarray[], const PetscScalar gpuarray[], Vec *v)

Collective, Possibly Synchronous

Input Parameters#

  • comm - the MPI communicator to use

  • bs - block size, same meaning as VecSetBlockSize()

  • n - local vector length, cannot be PETSC_DECIDE

  • N - global vector length (or PETSC_DECIDE to have calculated)

  • cpuarray - CPU memory where the vector elements are to be stored (or NULL)

  • gpuarray - GPU memory where the vector elements are to be stored (or NULL)

Output Parameter#

  • v - the vector

Notes#

See VecCreateSeqHIPWithArrays() for further discussion, this routine shares identical semantics.

See Also#

VecCreateMPIHIP(), VecCreateSeqHIPWithArrays(), VecCreateMPIWithArray(), VecCreateSeqWithArray(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost(), VecCreateMPI(), VecCreateGhostWithArray(), VecPlaceArray()

Level#

intermediate

Location#

src/vec/vec/impls/mpi/cupm/hip/vecmpicupm.hip.cpp


Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages