#include "petscdevice.h" PetscErrorCode PetscDeviceContextQueryIdle(PetscDeviceContext dctx, PetscBool *idle)Not Collective, Asynchronous
dctx | - The PetscDeviceContext object |
idle | - PETSC_TRUE if PetscDeviceContext has NO work, PETSC_FALSE if it has work |
Results of PetscDeviceContextQueryIdle() are cached on return, allowing this function to be called repeatedly in an efficient manner. When debug mode is enabled this cache is verified on every call to this routine, but is blindly believed when debugging is disabled.