Session Constructor and Destructor
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/ge_api.h>
- Library file: libge_runner.so
Function Usage
Constructs or destroys an object of class Session.
Prototype
APIs taking string arguments will be deprecated in future releases. Use APIs taking non-string arguments instead.
1 2 3 | explicit Session(const std::map<std::string, std::string> &options) explicit Session(const std::map<AscendString, AscendString> &options) ~Session() |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
options |
Input |
A key-value mapping table, for the Session configuration. key indicates the options type, and value indicates the options value, both of type string. Generally, this parameter can be left empty, indicating using the same options configuration passed to GEInitialize. This parameter is available for configuring the current GeSession separately. For details about the supported configuration items, see the parameters of the session level in Command-Line Options. |
Returns
None
Restrictions
Sessions cannot be executed concurrently. In addition, a session exclusively occupies resources. As such, creating multiple sessions concurrently may fail due to insufficient resources.