|
Mila
Deep Neural Network Library
|
Mila main API namespace. More...
Classes | |
| struct | Version |
| Semantic Version data. More... | |
Functions | |
| Version | getAPIVersion () |
| Gets the current Mila runtime API version. | |
| bool | initialize (unsigned int randomSeed=0, std::shared_ptr< Logging::Logger > sink=nullptr) |
| Initializes the Mila framework. | |
| void | shutdown () |
| Shuts down the Mila framework and releases all resources. | |
Mila main API namespace.
|
export |
Gets the current Mila runtime API version.
The version components are injected by the build as PUBLIC compile definitions (see the Versioning block in Mila/CMakeLists.txt), sourced from Version.txt. find_package consumers recompile this module unit and pick the definitions up via the exported target's interface, so no version header is shipped.
|
export |
Initializes the Mila framework.
Must be called before using any other Mila functionality. If no sink is provided a NullSink is used, suppressing all log output – appropriate for applications linking Mila as a static library that manage their own logging. Pass an explicit sink to opt in to Mila log output.
| randomSeed | Random seed for reproducibility. 0 = non-deterministic. |
| sink | Logging sink to register. nullptr = NullSink (silent). |
| Any | exception thrown during initialization is propagated to the caller; the application is responsible for handling it. |
|
export |
Shuts down the Mila framework and releases all resources.
Flushes any pending log output through the registered sink before releasing it. After this call no further log calls should be made until initialize() is called again.
| Any | exception thrown during shutdown is propagated to the caller. |