|
Mila
Deep Neural Network Library
|
Class to manage compute device initialization. More...
Public Member Functions | |
| DeviceRegistrar (const DeviceRegistrar &)=delete | |
| DeviceRegistrar & | operator= (const DeviceRegistrar &)=delete |
Static Public Member Functions | |
| static DeviceRegistrar & | instance () |
| Get the singleton instance of DeviceRegistrar. | |
Private Member Functions | |
| DeviceRegistrar ()=default | |
Static Private Member Functions | |
| static void | registerCpuDevices () |
| Register CPU device. | |
| static void | registerCudaDevices () |
| Register all available CUDA devices. | |
| static void | registerDevices () |
| Register all available compute devices. | |
Static Private Attributes | |
| static bool | is_initialized_ = false |
| Flag indicating whether devices have been initialized. | |
Class to manage compute device initialization.
This class provides a centralized mechanism for registering all available compute devices within the Mila framework. It follows a singleton pattern with lazy initialization to ensure devices are registered only once when needed.
|
delete |
|
privatedefault |
|
inlinestatic |
Get the singleton instance of DeviceRegistrar.


|
delete |
|
inlinestaticprivate |
Register CPU device.


|
inlinestaticprivate |
Register all available CUDA devices.


|
inlinestaticprivate |
Register all available compute devices.


|
inlinestaticprivate |
Flag indicating whether devices have been initialized.