PetscIntSumError#
Computes the sum of two positive PetscInt
and generates an error with overflow.
Synopsis#
static inline PetscErrorCode PetscIntSumError(PetscInt a, PetscInt b, PetscInt *result)
Not Collective
Input Parameters#
a - the
PetscInt
valueb - the second value
Output Parameter#
c - the result as a
PetscInt
value, or NULL if you do not want the result, you just want to check if it overflows
Use PetscInt64Mult()
to compute the product of two 32 bit PetscInt and store in a PetscInt64
Use PetscIntMultTruncate()
to compute the product of two PetscInt
and truncate it to fit in a PetscInt
Not available from Fortran
See Also#
PetscBLASInt
, PetscMPIInt
, PetscInt
, PetscBLASIntCast()
, PetscInt64Mult()
, PetscIntMultError()
Level#
advanced
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages