PETSc version 3.16.6
PetscDeviceContextFork
Create a set of dependent child contexts from a parent context
Synopsis
#include "petscdevice.h"
PetscErrorCode PetscDeviceContextFork(PetscDeviceContext dctx, PetscInt n, PetscDeviceContext **dsub)
Not Collective, Asynchronous
Input Parameters
Output Parameter
| dsub | - The created child context(s)
|
Notes
This routine creates n edges of a DAG from a source node which are causally dependent on the source node, meaning
that work queued on child contexts will not start until the parent context finishes its work. This accounts for work
queued on the parent up until calling this function, any subsequent work enqueued on the parent has no effect on the children.
Any children created with this routine have their lifetimes bounded by the parent. That is, the parent context expects
to free all of it's children (and ONLY its children) before itself is freed.
DAG representation
time ->
-> dctx \----> dctx ------>
\---> dsub[0] --->
\--> ... ------->
\-> dsub[n-1] ->
See Also
PetscDeviceContextJoin(), PetscDeviceContextSynchronize(), PetscDeviceContextQueryIdle()
Level
intermediate
Location
src/sys/objects/device/interface/dcontext.cxx
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages