:orphan: # PetscDeviceContextSynchronize Block the host until all work queued on a `PetscDeviceContext` has finished ## Synopsis ``` #include PetscErrorCode PetscDeviceContextSynchronize(PetscDeviceContext dctx) ``` Not Collective ## Input Parameter - ***dctx -*** The `PetscDeviceContext` to synchronize ## Notes The host will not return from this routine until `dctx` is idle. Any and all memory operations queued on or otherwise associated with (either explicitly or implicitly via dependencies) are guaranteed to have finished and be globally visible on return. In effect, this routine serves as memory and execution barrier. ## DAG representation ```none time -> -> dctx - |= CALL =| - dctx -> ``` ## See Also `PetscDeviceContextFork()`, `PetscDeviceContextJoin()`, `PetscDeviceContextQueryIdle()` ## Level beginner ## Location src/sys/objects/device/interface/dcontext.cxx --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/dcontext.cxx) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)