|
Scanbot SDK
|
Typedefs | |
| typedef struct scanbotsdk_accelerator_t | scanbotsdk_accelerator_t |
| scanbotsdk_accelerator_t class | |
| typedef struct scanbotsdk_tensor_rt_accelerator_t | scanbotsdk_tensor_rt_accelerator_t |
| scanbotsdk_tensor_rt_accelerator_t class | |
| typedef struct scanbotsdk_accelerator_t scanbotsdk_accelerator_t |
scanbotsdk_accelerator_t class
Accelerator to use for running machine learning models.
scanbotsdk_tensor_rt_accelerator_t class
TensorRT accelerator.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_accelerator_as_scanbotsdk_tensor_rt_accelerator | ( | scanbotsdk_accelerator_t * | object, |
| scanbotsdk_tensor_rt_accelerator_t ** | result ) |
Casts the given instance of scanbotsdk_accelerator_t to its subtype scanbotsdk_tensor_rt_accelerator_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_accelerator_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_tensor_rt_accelerator_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_accelerator_free | ( | scanbotsdk_accelerator_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_accelerator_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_accelerator_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_accelerator_is_scanbotsdk_tensor_rt_accelerator | ( | scanbotsdk_accelerator_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_accelerator_t is an instance of its subtype scanbotsdk_tensor_rt_accelerator_t.
| object | Pointer to the instance of scanbotsdk_accelerator_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_tensor_rt_accelerator_as_scanbotsdk_accelerator | ( | scanbotsdk_tensor_rt_accelerator_t * | object, |
| scanbotsdk_accelerator_t ** | result ) |
Casts the given instance of scanbotsdk_tensor_rt_accelerator_t to its parent type scanbotsdk_accelerator_t.
| object | Pointer to the instance of scanbotsdk_accelerator_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_tensor_rt_accelerator_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_tensor_rt_accelerator_create | ( | const char * | engine_path, |
| scanbotsdk_tensor_rt_accelerator_t ** | result ) |
Creates a new instance of scanbotsdk_tensor_rt_accelerator with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| engine_path | Directory in which the TensorRT engine files are stored. The SDK automatically generates the files if they are absent. |
Note, that it might take a few minutes to generate the engine files, therefore it is recommended to set the path to a directory that is not deleted between app launches.
If the path is empty, the SDK will generate the engine files in the current working directory.
Default is "" The value must not be null.
| result | Pointer to a variable that will store the created instance of scanbotsdk_tensor_rt_accelerator_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_tensor_rt_accelerator_create_with_defaults | ( | scanbotsdk_tensor_rt_accelerator_t ** | result | ) |
Creates a new instance of scanbotsdk_tensor_rt_accelerator_t with given required params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| result | Pointer to a variable that will store the created instance of scanbotsdk_tensor_rt_accelerator_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_tensor_rt_accelerator_free | ( | scanbotsdk_tensor_rt_accelerator_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_tensor_rt_accelerator_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_tensor_rt_accelerator_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_tensor_rt_accelerator_get_engine_path | ( | scanbotsdk_tensor_rt_accelerator_t * | self, |
| const char ** | engine_path ) |
Returns value of engine_path field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Directory in which the TensorRT engine files are stored. The SDK automatically generates the files if they are absent.
Note, that it might take a few minutes to generate the engine files, therefore it is recommended to set the path to a directory that is not deleted between app launches.
If the path is empty, the SDK will generate the engine files in the current working directory.
Default is ""
| self | Pointer to the instance of scanbotsdk_tensor_rt_accelerator_t |
| engine_path | Pointer to a variable that will store the value of the field. |