petsc4py.PETSc.Device#
- class petsc4py.PETSc.Device#
Bases:
object
The device object.
Represents a handle to an accelerator (which may be the host).
See also
Enumerations
The type of device.
Methods Summary
Configure and setup a device object.
create
([dtype, device_id])Create a device object.
destroy
()Destroy a device object.
Return the device id.
Return the type of the device.
setDefaultType
(device_type)Set the device type to be used as the default in subsequent calls to
create
.view
([viewer])View a device object.
Attributes Summary
The device id.
The device type.
Methods Documentation
- configure()#
Configure and setup a device object.
Not collective.
See also
Source code at petsc4py/PETSc/Device.pyx:128
- Return type:
- classmethod create(dtype=None, device_id=DECIDE)#
Create a device object.
Not collective.
- Parameters:
- Return type:
See also
- destroy()#
Destroy a device object.
Not collective.
See also
Source code at petsc4py/PETSc/Device.pyx:116
- Return type:
- getDeviceId()#
Return the device id.
Not collective.
See also
Source code at petsc4py/PETSc/Device.pyx:176
- Return type:
- getDeviceType()#
Return the type of the device.
Not collective.
See also
Source code at petsc4py/PETSc/Device.pyx:161
- Return type:
- static setDefaultType(device_type)#
Set the device type to be used as the default in subsequent calls to
create
.Not collective.
See also
- view(viewer=None)#
View a device object.
Collective.
See also
Attributes Documentation
- device_id#
The device id.
- type#
The device type.