PETSc version 3.17.4
Fix/Edit manual page

PetscDeviceContextSetDevice

Set the underlying device for the PetscDeviceContext

Synopsis

#include "petscdevice.h" 
PetscErrorCode PetscDeviceContextSetDevice(PetscDeviceContext dctx, PetscDevice device)
Not Collective, Possibly Synchronous

Input Parameters

dctx - The PetscDeviceContext
device - The PetscDevice

Notes

This routine is effectively PetscDeviceContext's "set-type" (so every PetscDeviceContext must also have an attached PetscDevice). Unlike the usual set-type semantics, it is not stricly necessary to set a contexts device to enable usage, any created device contexts will always come equipped with the "default" device.

This routine is a no-op if dctx is already attached to device.

This routine may initialize the backend device and incur synchronization.

See Also

PetscDeviceCreate(), PetscDeviceConfigure(), PetscDeviceContextGetDevice()

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