Library global state automatically instantiated on lib init.
More...
#include <library.hpp>
Library global state automatically instantiated on lib init.
◆ Library() [1/3]
spla::Library::Library |
( |
| ) |
|
◆ ~Library()
spla::Library::~Library |
( |
| ) |
|
|
default |
◆ Library() [2/3]
spla::Library::Library |
( |
const Library & |
| ) |
|
|
delete |
◆ Library() [3/3]
spla::Library::Library |
( |
Library && |
| ) |
|
|
delete |
◆ finalize()
void spla::Library::finalize |
( |
| ) |
|
Finalize library execution.
Finalize method must be called at the end after application to correctly shutdown global library state, release any enabled acceleration device and release any pending device resources.
- Warning
- Must be called after application execution
-
After this call no other library function call is allowed
◆ get()
Access global library instance.
Global library state instantiate once on first request to the library. Call this function to access library and configure it first before any computations.
- Note
- Only single global instance of the library allowed.
- Returns
- Global library instance
◆ get_accelerator()
- Warning
- Internal usage only!
- Returns
- Library computations accelerator if presented
◆ get_accelerator_info()
Status spla::Library::get_accelerator_info |
( |
std::string & |
info | ) |
|
Get acc info in a form of a string.
- Parameters
-
[out] | info | String to store info |
- Returns
- Function call status
◆ get_dispatcher()
class Dispatcher * spla::Library::get_dispatcher |
( |
| ) |
|
- Warning
- Internal usage only!
- Returns
- Library algorithms dispatcher
◆ get_logger()
class Logger * spla::Library::get_logger |
( |
| ) |
|
- Warning
- Internal usage only!
- Returns
- Library logger
◆ get_registry()
class Registry * spla::Library::get_registry |
( |
| ) |
|
- Warning
- Internal usage only!
- Returns
- Library algorithms registry
◆ get_time_profiler()
- Warning
- Internal usage only!
- Returns
- Library time profiler
◆ is_set_force_no_acceleration()
bool spla::Library::is_set_force_no_acceleration |
( |
| ) |
|
◆ set_accelerator()
Set accelerator to be used in library computations.
Sets type of the accelerator to be used in library computations. By default library attempts automatically init OpenCL accelerator if OpenCL runtime present in the system. Set None
to disable acceleration.
- Parameters
-
accelerator | Accelerate type |
- Returns
- Function call status
◆ set_default_callback()
Status spla::Library::set_default_callback |
( |
| ) |
|
Sets default library callback to log messages to console.
- Returns
- Function call status
◆ set_device()
Status spla::Library::set_device |
( |
int |
index | ) |
|
Selects device for computations for current accelerator.
- Parameters
-
index | Device index in current platform devices |
- Returns
- Function call status
◆ set_force_no_acceleration()
Status spla::Library::set_force_no_acceleration |
( |
bool |
value | ) |
|
Sets option to force cpu only usage without acceleration.
- Parameters
-
value | True to disable any acceleration |
- Returns
- Function call status
◆ set_message_callback()
Set callback function called on library message event.
- Parameters
-
callback | Function to be called |
- Returns
- Function call status
◆ set_platform()
Status spla::Library::set_platform |
( |
int |
index | ) |
|
Selects platform for computations for current accelerator.
- Parameters
-
index | Platform index to select in current PC supported list. |
- Returns
- Function call status
◆ set_queues_count()
Status spla::Library::set_queues_count |
( |
int |
count | ) |
|
Set number of GPU queues for parallel ops execution.
- Parameters
-
count | Number of queues to set |
- Returns
- Function call status
◆ time_profile_dump()
Status spla::Library::time_profile_dump |
( |
| ) |
|
Dumps to default output current time profile.
- Returns
- Function call status
◆ time_profile_reset()
Status spla::Library::time_profile_reset |
( |
| ) |
|
Reset current time profile.
- Returns
- Function call status
The documentation for this class was generated from the following files: