:orphan: # PetscLogFlops Adds floating point operations to the global counter. ## Synopsis ``` #include PetscErrorCode PetscLogFlops(PetscLogDouble f) ``` Not Collective ## Input Parameter - ***f -*** flop counter ## Usage ```none PetscLogEvent USER_EVENT; PetscLogEventRegister("User event",0,&USER_EVENT); PetscLogEventBegin(USER_EVENT,0,0,0,0); [code segment to monitor] PetscLogFlops(user_flops) PetscLogEventEnd(USER_EVENT,0,0,0,0); ``` ## Note A global counter logs all PETSc flop counts. The user can use PetscLogFlops() to increment this counter to include flops for the application code. ## See Also [](ch_profiling), `PetscLogGPUFlops()`, `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscGetFlops()` ## Level intermediate ## Location src/sys/logging/plog.c ## Examples src/ksp/ksp/tutorials/ex9.c
src/snes/tutorials/ex14.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex18.c
src/snes/tutorials/ex19.c
src/snes/tutorials/ex22.c
src/snes/tutorials/ex33.c
src/snes/tutorials/ex46.c
src/snes/tutorials/ex5.c
src/snes/tutorials/ex55.c
src/snes/tutorials/ex55k.kokkos.cxx
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/plog.c) [Index of all Profiling routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)