blace.ai
Loading...
Searching...
No Matches
util_common.h File Reference

This file contains some util functions and classes. More...

#include "library_defines.h"
#include "ml_core/types.h"
#include <filesystem>
#include <vector>

Go to the source code of this file.

Functions

EXPORT_OR_IMPORT std::filesystem::path blace::util::getPathToExe ()
 Get the path to the running executable.
 
EXPORT_OR_IMPORT std::optional< blace::ml_core::DeviceEnumblace::util::get_accelerator ()
 Gets the available accelerator. CPU, CUDA or MPS.
 

Detailed Description

This file contains some util functions and classes.

Function Documentation

◆ get_accelerator()

EXPORT_OR_IMPORT std::optional< blace::ml_core::DeviceEnum > blace::util::get_accelerator ( )

Gets the available accelerator. CPU, CUDA or MPS.

Returns
The available accelerator or nullopt if accelerator should be present but returned error.

◆ getPathToExe()

EXPORT_OR_IMPORT std::filesystem::path blace::util::getPathToExe ( )

Get the path to the running executable.

Returns
The path of the executable.