# PetscDeviceGetAttribute
Query a particular attribute of a `PetscDevice` 
## Synopsis
```
#include <petscdevice.h> 
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` reponsible 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/interface/device.cxx.html#PetscDeviceGetAttribute">src/sys/objects/device/interface/device.cxx</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
