PETSc version 3.16.5
Fix/Edit manual page

# PetscDeviceContextDestroy

Frees a PetscDeviceContext

### Synopsis

    #include "petscdevice.h"
    PetscErrorCode PetscDeviceContextDestroy(PetscDeviceContext *dctx)

Not Collective, Asynchronous

### Input Parameters

| dctx | - The PetscDeviceContext

### Notes

No implicit synchronization occurs due to this routine, all resources are released completely asynchronously w.r.t. the host. If one needs to guarantee access to the data produced on this contexts stream one should perform the appropriate synchronization before calling this routine.

### Developer Notes

The context is never actually "destroyed", only returned to an ever growing pool of contexts. There are currently no safeguards on the size of the pool, this should perhaps be implemented.

### See Also

PetscDeviceContextCreate(), PetscDeviceContextSetDevice(), PetscDeviceContextSetUp(), PetscDeviceContextSynchronize()

### Level

beginner

### 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