:orphan: # PetscDeviceGetAttribute Query a particular attribute of a `PetscDevice` ## Synopsis ``` #include PetscErrorCode PetscDeviceGetAttribute(PetscDevice device, PetscDeviceAttribute attr, void *value) ``` Not Collective ## Input Parameters - ***device -*** The `PetscDevice` - ***attr -*** The attribute ## Output Parameter - ***value -*** The value of the attribute ## Notes Since different attributes are often different types `value` is a `void *` to accommodate them all. The underlying type of the attribute is therefore included in the name of the `PetscDeviceAttribute` responsible for querying it. For example, `PETSC_DEVICE_ATTR_SIZE_T_SHARED_MEM_PER_BLOCK` is of type `size_t`. ## See Also `PetscDeviceAtrtibute`, `PetscDeviceConfigure()`, `PetscDevice` ## Level intermediate ## Location src/sys/objects/device/interface/device.cxx --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/device.cxx) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)