Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Ml

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
 

Functions

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_accelerator_t

scanbotsdk_accelerator_t class

Accelerator to use for running machine learning models.

◆ scanbotsdk_tensor_rt_accelerator_t

Function Documentation

◆ scanbotsdk_accelerator_as_scanbotsdk_tensor_rt_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.

Parameters
objectPointer to the instance of scanbotsdk_accelerator_t to be casted
resultPointer to a variable that will store the casted instance of scanbotsdk_tensor_rt_accelerator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_accelerator_free()

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.

Parameters
objectPointer to the instance of scanbotsdk_accelerator_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_accelerator_is_scanbotsdk_tensor_rt_accelerator()

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.

Parameters
objectPointer to the instance of scanbotsdk_accelerator_t to be checked
resultPointer to a variable that will store the result of the check
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_tensor_rt_accelerator_as_scanbotsdk_accelerator()

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.

Parameters
objectPointer to the instance of scanbotsdk_accelerator_t to be casted
resultPointer to a variable that will store the casted instance of scanbotsdk_tensor_rt_accelerator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_tensor_rt_accelerator_create()

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.

Parameters
engine_pathDirectory 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.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_tensor_rt_accelerator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_tensor_rt_accelerator_create_with_defaults()

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.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_tensor_rt_accelerator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_tensor_rt_accelerator_free()

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.

Parameters
objectPointer to the instance of scanbotsdk_tensor_rt_accelerator_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_tensor_rt_accelerator_get_engine_path()

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 ""

Parameters
selfPointer to the instance of scanbotsdk_tensor_rt_accelerator_t
engine_pathPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.