:orphan:
# PetscDeviceInitType
Initialization strategy for `PetscDevice` 
## Synopsis
```
#include <petscdevicetypes.h> 
typedef enum {
  PETSC_DEVICE_INIT_NONE,
  PETSC_DEVICE_INIT_LAZY,
  PETSC_DEVICE_INIT_EAGER
} PetscDeviceInitType;
```

## Values

- ***`PETSC_DEVICE_INIT_NONE`  -*** PetscDevice is never initialized
- ***`PETSC_DEVICE_INIT_LAZY`  -*** PetscDevice is initialized on demand
- ***`PETSC_DEVICE_INIT_EAGER` -*** PetscDevice is initialized as soon as possible





## Notes
`PETSC_DEVICE_INIT_NONE` implies that any initialization of `PetscDevice` is disallowed and
doing so results in an error. Useful to ensure that no accelerator is used in a program.


## See Also
 `PetscDevice`, `PetscDeviceType`, `PetscDeviceInitialize()`,
`PetscDeviceInitialized()`, `PetscDeviceCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscdevicetypes.h.html#PetscDeviceInitType">include/petscdevicetypes.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdevicetypes.h)


[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)  
