MatCreateAIJViennaCL#
Creates a sparse matrix in MATAIJ
(compressed row) format (the default parallel PETSc format). This matrix will ultimately be pushed down to GPUs and use the ViennaCL library for calculations.
Synopsis#
Collective
Input Parameters#
comm - MPI communicator, set to
PETSC_COMM_SELF
m - number of rows, or
PETSC_DECIDE
ifM
is providedn - number of columns, or
PETSC_DECIDE
ifN
is providedM - number of global rows in the matrix, or
PETSC_DETERMINE
ifm
is providedN - number of global columns in the matrix, or
PETSC_DETERMINE
ifn
is providedd_nz - number of nonzeros per row in DIAGONAL portion of local submatrix (same value is used for all local rows)
d_nnz - array containing the number of nonzeros in the various rows of the DIAGONAL portion of the local submatrix (possibly different for each row) or
NULL
, ifd_nz
is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.em
. For matrices you plan to factor you must leave room for the diagonal entry and put in the entry even if it is zero.o_nz - number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix (same value is used for all local rows).
o_nnz - array containing the number of nonzeros in the various rows of the OFF-DIAGONAL portion of the local submatrix (possibly different for each row) or
NULL
, ifo_nz
is used to specify the nonzero structure. The size of this array is equal to the number of local rows, i.em
.
Output Parameter#
A - the matrix
Notes#
It is recommended that one use the MatCreate()
, MatSetType()
and/or MatSetFromOptions()
,
MatXXXXSetPreallocation() paradigm instead of this routine directly.
[MatXXXXSetPreallocation() is, for example, MatSeqAIJSetPreallocation()
]
The AIJ format, also called compressed row storage), is fully compatible with standard Fortran storage. That is, the stored row and column indices can begin at either one (as in Fortran) or zero.
See Also#
Mat
, MatCreate()
, MatCreateAIJ()
, MatCreateAIJCUSPARSE()
, MatSetValues()
, MatSeqAIJSetColumnIndices()
, MatCreateSeqAIJWithArrays()
,
MATMPIAIJVIENNACL
, MATAIJVIENNACL
Level#
intermediate
Location#
src/mat/impls/aij/mpi/mpiviennacl/mpiaijviennacl.cxx
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages