Skip to main content
Ctrl+K
PETSc v3.26.1-374-g72ef5c2b94e7 documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PetscDevice

PetscDevice#

Object to manage an accelerator “device” (usually a GPU)

Synopsis#

#include <petscdevicetypes.h> 
typedef struct _n_PetscDevice *PetscDevice;

Note#

This object is used to house configuration and state of a device, but does not offer any ability to interact with or drive device computation. This functionality is facilitated instead by the PetscDeviceContext object.

See Also#

PetscDeviceType, PetscDeviceInitType, PetscDeviceCreate(), PetscDeviceConfigure(), PetscDeviceDestroy(), PetscDeviceContext, PetscDeviceContextSetDevice(), PetscDeviceContextGetDevice(), PetscDeviceGetAttribute()

Level#

beginner

Location#

include/petscdevicetypes.h

Examples#

src/sys/objects/device/tests/ex1.c
src/sys/objects/device/tests/ex12.c
src/sys/objects/device/tests/ex3.c
src/sys/objects/device/tests/ex5.c
src/sys/objects/device/tests/ex8.c
src/sys/objects/device/tests/ex9.c
src/mat/tests/ex254.c
src/mat/tests/ex324.c
src/vec/is/sf/tests/ex26.c
src/vec/vec/tests/ex65.c


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

On this page
  • Synopsis
  • Note
  • See Also
  • Level
  • Location
  • Examples
Edit on GitLab
Show Source

© Copyright 1991-2026, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2026-11-10T03:41:28-0600 (v3.26.1-374-g72ef5c2b94e7).