:orphan: # PetscDeviceContextMarkIntentFromID Indicate a `PetscDeviceContext`s access intent to the auto-dependency system ## Synopsis ``` #include PetscErrorCode PetscDeviceContextMarkIntentFromID(PetscDeviceContext dctx, PetscObjectId id, PetscMemoryAccessMode mode, const char name[]) ``` Not Collective ## Input Parameters - ***dctx -*** The `PetscDeviceContext` - ***id -*** The `PetscObjectId` to mark - ***mode -*** The desired access intent - ***name -*** The object name (for debug purposes, ignored in optimized builds) ## Notes This routine formally informs the dependency system that `dctx` will access the object represented by `id` with `mode` and adds `dctx` to `id`'s list of dependencies (termed "leaves"). If the existing set of leaves have an incompatible `PetscMemoryAccessMode` to `mode`, `dctx` will be serialized against them. ## See Also `PetscDeviceContextWaitForContext()`, `PetscDeviceContextSynchronize()`, `PetscObjectGetId()`, `PetscMemoryAccessMode` ## Level intermediate ## Location src/sys/objects/device/interface/mark_dcontext.cxx --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/mark_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)