# 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 --- [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](/docs/manualpages/index.md) [Index of all manual pages](/docs/manualpages/singleindex.md)