PETSc version 3.16.6
Fix/Edit manual page

MatSetValuesCOO

set values at once in a matrix preallocated using MatSetPreallocationCOO()

Synopsis

#include "petscmat.h"  
PetscErrorCode MatSetValuesCOO(Mat A, const PetscScalar coo_v[], InsertMode imode)
Collective on Mat

Input Parameters

A - matrix being preallocated
coo_v - the matrix values (can be NULL)
imode - the insert mode

Notes: The values must follow the order of the indices prescribed with MatSetPreallocationCOO(). When repeated entries are specified in the COO indices the coo_v values are first properly summed. The imode flag indicates if coo_v must be added to the current values of the matrix (ADD_VALUES) or overwritten (INSERT_VALUES). Currently optimized for cuSPARSE matrices only. Passing coo_v == NULL is equivalent to passing an array of zeros.

See Also

MatSetPreallocationCOO(), InsertMode, INSERT_VALUES, ADD_VALUES

Level

beginner

Location

src/mat/utils/gcreate.c

Implementations

MatSetValuesCOO_MPIAIJCUSPARSE in src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu
MatSetValuesCOO_SeqAIJCUSPARSE in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu

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