SqueezeBrains SDK 1.18
Parameters

Project Parameters. More...

Collaboration diagram for Parameters:

Data Structures

struct  sb_t_par_perturbation
 Describes the perturbation of a sample. More...
 
struct  sb_t_par_perturbations
 List of the perturbations of a sample. More...
 
struct  sb_t_par_level
 Level parameters. More...
 
struct  sb_t_par_levels
 Levels parameter array. More...
 
struct  sb_t_par_model
 Parameters of a model. More...
 
struct  sb_t_par_models
 Array of models parameters. More...
 
struct  sb_t_par_sl
 Shallow Learning modules parameters. More...
 
struct  sb_t_par
 Project parameters. More...
 

Functions

sb_t_err sb_par_create (sb_t_par **const par, sb_t_project_type project_type)
 Creates the project parameters structure. More...
 
sb_t_err sb_par_destroy (sb_t_par **const par)
 Destroys the project parameters structure. More...
 
sb_t_err sb_par_copy (sb_t_par *const dst, const sb_t_par *const src)
 Copies the project parameters structure. More...
 
sb_t_err sb_par_clone (sb_t_par **const dst, const sb_t_par *const src)
 Clones the project parameters structure. More...
 
sb_t_err sb_par_compare (const sb_t_par *const par1, const sb_t_par *const par2)
 Compares content of a pair of project parameter structures. More...
 
sb_t_err sb_par_init (sb_t_par *const par, sb_t_project_type project_type)
 Initializes the fields of the structure. More...
 
sb_t_err sb_par_add_model (sb_t_par *const par, const char *const model_name)
 Adds the model to the parameter structure. More...
 
sb_t_err sb_par_remove_model (sb_t_par *const par, const char *const model_name)
 Removes the model from the structure of the project parameters. More...
 
sb_t_err sb_par_set_model_description (sb_t_par *const par, const char *const model_name, const char *const description)
 Set a brief description of the model into parameters. More...
 
sb_t_err sb_par_set_devices (sb_t_par *const par, sb_t_device_type device_type, sb_t_framework_type framework, int id, int svl)
 Set device parameters. More...
 
sb_t_err sb_par_add_level (sb_t_par *const par, const char *const model_name, float scale)
 Adds the level to the parameter structure. More...
 
sb_t_err sb_par_remove_level (sb_t_par *const par, const char *const model_name, float scale)
 Removes the l-th level from the structure of the project parameters. More...
 
sb_t_err sb_par_set_collaboration (sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int value)
 Sets collaboration between two models. More...
 
sb_t_err sb_par_get_collaboration (sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int *const value)
 Retrieves the collaboration between two models. More...
 
sb_t_err sb_par_format (const sb_t_par *const par, char *const str, int str_size)
 Formats the project parameters structure. More...
 
const char * sb_floating_point_precision_type_format (sb_t_floating_point_op_type type)
 Returns the string of the floating point precision type. More...
 
const char * sb_interpolation_mode_format (sb_t_interpolation_mode mode)
 Returns the string of the interpolation mode. More...
 
const char * sb_device_type_format (sb_t_device_type type)
 Returns the string of the device type. More...
 
const char * sb_framework_type_format (sb_t_framework_type type)
 Returns the string of the framework type. More...
 

Detailed Description

Project Parameters.

Function Documentation

◆ sb_device_type_format()

const char * sb_device_type_format ( sb_t_device_type  type)

Returns the string of the device type.

Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding device type.
The string must not be freed.

Parameters
[in]typeDevice type.
Returns
A C - string containing the device type in a human - readable format.

◆ sb_floating_point_precision_type_format()

const char * sb_floating_point_precision_type_format ( sb_t_floating_point_op_type  type)

Returns the string of the floating point precision type.

Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding type.
The string must not be freed.

Parameters
[in]typeFloating point precision type.
Returns
A C - string containing the floating point precision type in a human - readable format.

◆ sb_framework_type_format()

const char * sb_framework_type_format ( sb_t_framework_type  type)

Returns the string of the framework type.

Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding framework type.
The string must not be freed.

Parameters
[in]typeFramework type.
Returns
A C - string containing the framework type in a human - readable format.

◆ sb_interpolation_mode_format()

const char * sb_interpolation_mode_format ( sb_t_interpolation_mode  mode)

Returns the string of the interpolation mode.

Interprets the contents of the mode and converts it to a C - string containing a human - readable version of the corresponding mode.
The string must not be freed.

Parameters
[in]modeInterpolation mode.
Returns
A C - string containing the interpolation mode in a human - readable format.

◆ sb_par_add_level()

sb_t_err sb_par_add_level ( sb_t_par *const  par,
const char *const  model_name,
float  scale 
)

Adds the level to the parameter structure.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_nameModel for which the level should be added. If NULL the level is added to all the models
[in]scaleScale of the level to be added.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
Levels
sb_par_remove_level

◆ sb_par_add_model()

sb_t_err sb_par_add_model ( sb_t_par *const  par,
const char *const  model_name 
)

Adds the model to the parameter structure.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_nameName of the model to be added. The string must be compliant to UTF-8 format.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_remove_model

◆ sb_par_clone()

sb_t_err sb_par_clone ( sb_t_par **const  dst,
const sb_t_par *const  src 
)

Clones the project parameters structure.

Parameters
[out]dstDestination project parameter structure.
On successful return, this parameter will be filled with the pointer to sb_t_par structure.
The structure should be freed using the function sb_par_destroy.
[in]srcSource project parameter structure.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_destroy
sb_par_copy

◆ sb_par_compare()

sb_t_err sb_par_compare ( const sb_t_par *const  par1,
const sb_t_par *const  par2 
)

Compares content of a pair of project parameter structures.

Note
The function does not compare the following parameters:
Parameters
[in]par1Project parameter structure.
[in]par2Project parameter structure.
Returns
If the project parameter structures are equal, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_project_set_par

◆ sb_par_copy()

sb_t_err sb_par_copy ( sb_t_par *const  dst,
const sb_t_par *const  src 
)

Copies the project parameters structure.

Parameters
[out]dstDestination project parameter structure.
[in]srcSource project parameter structure.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_destroy
sb_par_clone

◆ sb_par_create()

sb_t_err sb_par_create ( sb_t_par **const  par,
sb_t_project_type  project_type 
)

Creates the project parameters structure.

The function initializes the structure.

Parameters
[out]parPointer to the project parameter structure.
On successful return, this parameter will be filled with the pointer to sb_t_par structure.
The structure should be freed using the function sb_par_destroy.
[in]project_typeProject type.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_destroy
sb_par_clone
sb_par_copy

◆ sb_par_destroy()

sb_t_err sb_par_destroy ( sb_t_par **const  par)

Destroys the project parameters structure.

Parameters
[in,out]parPointer to the project parameters structure. It is set to NULL.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_create

◆ sb_par_format()

sb_t_err sb_par_format ( const sb_t_par *const  par,
char *const  str,
int  str_size 
)

Formats the project parameters structure.

Interprets the contents of par and converts it to a C-string containing a human-readable version of the corresponding structure.

Parameters
[in]parPointer to the project parameters structure.
[out]strPointer to the string.
On successful return, this parameter will be filled with a human-readable version of the parameters structure.
[in]str_sizeNumber of bytes of the string str.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par

◆ sb_par_get_collaboration()

sb_t_err sb_par_get_collaboration ( sb_t_par par,
const char *const  model_name_1,
const char *const  model_name_2,
int *const  value 
)

Retrieves the collaboration between two models.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_name_1Name of the first model.
[in]model_name_2Name of the second model.
[in]valueValue of the collaboration between the two models.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_t_par::collaborations
sb_par_get_collaboration

◆ sb_par_init()

sb_t_err sb_par_init ( sb_t_par *const  par,
sb_t_project_type  project_type 
)

Initializes the fields of the structure.

Parameters
[in,out]parPointer to the parameters structure.
[in]project_typeProject type.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_destroy
sb_par_clone
sb_par_copy

◆ sb_par_remove_level()

sb_t_err sb_par_remove_level ( sb_t_par *const  par,
const char *const  model_name,
float  scale 
)

Removes the l-th level from the structure of the project parameters.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_nameModel for which the level should be removed. If NULL the level is removed from all the models
[in]scaleScale of the level to be removed.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
Levels
sb_par_add_level

◆ sb_par_remove_model()

sb_t_err sb_par_remove_model ( sb_t_par *const  par,
const char *const  model_name 
)

Removes the model from the structure of the project parameters.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_nameName of the model to be removed.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_par_add_model

◆ sb_par_set_collaboration()

sb_t_err sb_par_set_collaboration ( sb_t_par par,
const char *const  model_name_1,
const char *const  model_name_2,
int  value 
)

Sets collaboration between two models.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_name_1Name of the first model.
[in]model_name_2Name of the second model.
[in]valueValue = 1 models are collaborative, value=0 models are not collaborative.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_par
sb_t_par::collaborations
sb_par_get_collaboration

◆ sb_par_set_devices()

sb_t_err sb_par_set_devices ( sb_t_par *const  par,
sb_t_device_type  device_type,
sb_t_framework_type  framework,
int  id,
int  svl 
)

Set device parameters.

The function is used to set a sb_t_devices_par configuration inside project parameters structure.

Parameters
[in,out]parPointer to the parameters structure.
[in]device_typeType of the device to set
[in]frameworkFramework to be used by the device
[in]idID of the device
[in]svlFlag used to select which device to be set (detection or svl )
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_t_devices_par
sb_device_type_format

◆ sb_par_set_model_description()

sb_t_err sb_par_set_model_description ( sb_t_par *const  par,
const char *const  model_name,
const char *const  description 
)

Set a brief description of the model into parameters.

Used to set user information about the model in addition to the name.

Parameters
[in,out]parPointer to the parameters structure.
[in]model_nameModel to which to set description.
[in]descriptionString of the description to be written. The string must be compliant to UTF-8 format.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_t_par_model::description
sb_project_get_par
sb_par_add_model