PetscDeviceContextGetCurrentContext#
Get the current active PetscDeviceContext
Synopsis#
#include <petscdevice.h>
PetscErrorCode PetscDeviceContextGetCurrentContext(PetscDeviceContext *dctx)
Not Collective
Output Parameter#
dctx - The
PetscDeviceContext
Notes#
The user generally should not destroy contexts retrieved with this routine unless they themselves have created them. There exists no protection against destroying the root context.
Developer Notes#
Unless the user has set their own, this routine creates the “root” context the first time it
is called, registering its destructor to PetscFinalize().
See Also#
PetscDeviceContextSetCurrentContext(), PetscDeviceContextFork(),
PetscDeviceContextJoin(), PetscDeviceContextCreate()
Level#
beginner
Location#
Examples#
src/sys/objects/device/tests/ex1.c
src/sys/objects/device/tests/ex12.c
src/sys/objects/device/tests/ex2.c
src/sys/objects/device/tests/ex3.c
src/sys/objects/device/tests/ex4.c
src/sys/objects/device/tests/ex6.c
src/sys/objects/device/tests/ex7.c
src/vec/is/sf/tests/ex23.c
src/vec/vec/tests/ex2k.c
src/vec/vec/tests/ex67.c
Index of all Device routines
Table of Contents for all manual pages
Index of all manual pages