PetscArraycmp#
Compares two arrays in memory.
Synopsis#
#include <petscstring.h>
PetscErrorCode PetscArraycmp(const anytype *str1, const anytype *str2, size_t cnt, PetscBool *e)
Not Collective
Input Parameters#
str1 - First array
str2 - Second array
cnt - Count of the array, not in bytes, but number of entries in the arrays
Output Parameter#
e -
PETSC_TRUEif equal elsePETSC_FALSE.
Notes#
This routine is a preferred replacement to PetscMemcmp()
The arrays must be of the same type
See Also#
PetscMemcpy(), PetscMemcmp(), PetscArrayzero(), PetscMemzero(), PetscArraycpy(), PetscMemmove(), PetscStrallocpy(),
PetscArraymove()
Level#
intermediate
Location#
Examples#
src/dm/dt/dualspace/impls/lagrange/tests/ex1.c
src/mat/tests/ex225.c
src/mat/tests/ex23.c
src/mat/tests/ex276.c
src/mat/tests/ex4.c
src/mat/tests/ex48.c
src/vec/is/sf/tests/ex5.c
src/vec/is/tests/ex8.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages