# PetscLogGpuFlops
Log how many flops are performed in a calculation on the device 
## Synopsis
```
static inline PetscErrorCode PetscLogGpuFlops(PetscLogDouble n)
```

## Input Parameter

- ***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)

The values are also added to the total flop count for the MPI rank that is set with `PetscLogFlops()`; hence the number of flops
just on the CPU would be the value from set from `PetscLogFlops()` minus the value set from `PetscLogGpuFlops()`




## See Also
 `PetscLogView()`, `PetscLogFlops()`, `PetscLogGpuTimeBegin()`, `PetscLogGpuTimeEnd()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petsclog.h.html#PetscLogGpuFlops">include/petsclog.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petsclog.h)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
