PetscDeviceContextSetDevice#

Set the underlying PetscDevice for a PetscDeviceContext

Synopsis#

Not Collective

Input Parameters#

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 strictly necessary to set a contexts device to enable usage, any created PetscDeviceContexts will always come equipped with the “default” device.

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

This routine may (but is very unlikely to) initialize the backend device and may incur synchronization.

See Also#

PetscDeviceCreate(), PetscDeviceConfigure(), PetscDeviceContextGetDevice(), PetscDeviceContextGetDeviceType()

Level#

intermediate

Location#

src/sys/objects/device/interface/dcontext.cxx


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages