VecSetPreallocationCOO#

set preallocation for a vector using a coordinate format of the entries with global indices

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecSetPreallocationCOO(Vec x, PetscCount ncoo, const PetscInt coo_i[])

Collective

Input Parameters#

  • x - vector being preallocated

  • ncoo - number of entries

  • coo_i - entry indices

Notes#

Entries can be repeated, see VecSetValuesCOO(). Negative indices are not allowed unless vector option VEC_IGNORE_NEGATIVE_INDICES is set, in which case they, along with the corresponding entries in VecSetValuesCOO(), are ignored. If vector option VEC_NO_OFF_PROC_ENTRIES is set, remote entries are ignored, otherwise, they will be properly added or inserted to the vector.

The array coo_i[] may be freed immediately after calling this function.

See Also#

Vectors and Parallel Data, Vec, VecSetValuesCOO(), VecSetPreallocationCOOLocal()

Level#

beginner

Location#

src/vec/vec/interface/vector.c

Implementations#

VecSetPreallocationCOO_MPIKokkos in src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx
VecSetPreallocationCOO_MPICUDA in src/vec/vec/impls/mpi/mpicuda/mpicuda.cu
VecSetPreallocationCOO_MPI in src/vec/vec/impls/mpi/pdvec.c
VecSetPreallocationCOO_Seq in src/vec/vec/impls/seq/bvec2.c
VecSetPreallocationCOO_SeqKokkos in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx
VecSetPreallocationCOO_SeqCUDA in src/vec/vec/impls/seq/seqcuda/veccuda2.cu


Edit on GitLab

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