petsc-3.14.6 2021-03-30
Report Typos and Errors

PetscLogFlops

Log how many flops are performed in a calculation

Synopsis

PETSC_STATIC_INLINE PetscErrorCode PetscLogFlops(PetscLogDouble n)

Input Paramters

flops - the number of flops

Notes

To limit the chance of integer overflow when multiplying by a constant, represent the constant as a double, not an integer. Use PetscLogFlops(4.0*n) not PetscLogFlops(4*n)

See Also

PetscLogView(), PetscLogGpuFlops()

Level

intermediate

Location

src/sys/logging/../../../include/petsclog.h

Examples

src/sys/logging/tutorials/ex1f.F90.html
src/sys/tutorials/ex3.c.html
src/sys/tutorials/ex3f.F.html
src/ksp/ksp/tutorials/ex9.c.html
src/snes/tutorials/ex5.c.html
src/snes/tutorials/ex9.c.html
src/snes/tutorials/ex14.c.html
src/snes/tutorials/ex15.c.html
src/snes/tutorials/ex18.c.html
src/snes/tutorials/ex19.c.html
src/snes/tutorials/ex22.c.html

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