Menoh
Classes | Typedefs | Enumerations | Functions
Variable profile table types and operations

Classes

struct  menoh_variable_profile_table_builder
 menoh_variable_profile_table_builder is the builder for creation of menoh_variable_profile_table. More...
 
struct  menoh_variable_profile_table
 menoh_variable_profile_table contains information of dims of variables. More...
 

Typedefs

typedef int32_t menoh_dtype
 
typedef struct menoh_variable_profile_table_buildermenoh_variable_profile_table_builder_handle
 
typedef struct menoh_variable_profile_tablemenoh_variable_profile_table_handle
 

Enumerations

enum  menoh_dtype_constant { menoh_dtype_float }
 

Functions

menoh_error_code MENOH_API menoh_make_variable_profile_table_builder (menoh_variable_profile_table_builder_handle *dst_handle)
 Factory function for variable_profile_table_builder. More...
 
void MENOH_API menoh_delete_variable_profile_table_builder (menoh_variable_profile_table_builder_handle builder)
 Delete function for variable_profile_table_builder. More...
 
menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile (menoh_variable_profile_table_builder_handle builder, const char *name, menoh_dtype dtype, int32_t dims_size, const int32_t *dims)
 Add input profile. More...
 
deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile_dims_2 (menoh_variable_profile_table_builder_handle builder, const char *name, menoh_dtype dtype, int32_t num, int32_t size)
 Add 2D input profile. More...
 
deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile_dims_4 (menoh_variable_profile_table_builder_handle builder, const char *name, menoh_dtype dtype, int32_t num, int32_t channel, int32_t height, int32_t width)
 Add 4D input profile. More...
 
menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_output_name (menoh_variable_profile_table_builder_handle builder, const char *name)
 Add output name. More...
 
deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_output_profile (menoh_variable_profile_table_builder_handle builder, const char *name, menoh_dtype dtype)
 Add output profile. More...
 
menoh_error_code MENOH_API menoh_build_variable_profile_table (const menoh_variable_profile_table_builder_handle builder, const menoh_model_data_handle model_data, menoh_variable_profile_table_handle *dst_handle)
 Factory function for variable_profile_table. More...
 
void MENOH_API menoh_delete_variable_profile_table (menoh_variable_profile_table_handle variable_profile_table)
 Delete function for variable_profile_table. More...
 
menoh_error_code MENOH_API menoh_variable_profile_table_get_dtype (const menoh_variable_profile_table_handle variable_profile_table, const char *variable_name, menoh_dtype *dst_dtype)
 Accessor function for variable_profile_table. More...
 
menoh_error_code MENOH_API menoh_variable_profile_table_get_dims_size (const menoh_variable_profile_table_handle variable_profile_table, const char *variable_name, int32_t *dst_size)
 Accessor function for variable_profile_table. More...
 
menoh_error_code MENOH_API menoh_variable_profile_table_get_dims_at (const menoh_variable_profile_table_handle variable_profile_table, const char *variable_name, int32_t index, int32_t *dst_size)
 Accessor function for variable_profile_table. More...
 

Detailed Description

Typedef Documentation

◆ menoh_dtype

typedef int32_t menoh_dtype

◆ menoh_variable_profile_table_builder_handle

◆ menoh_variable_profile_table_handle

Enumeration Type Documentation

◆ menoh_dtype_constant

Enumerator
menoh_dtype_float 

Function Documentation

◆ menoh_build_variable_profile_table()

menoh_error_code MENOH_API menoh_build_variable_profile_table ( const menoh_variable_profile_table_builder_handle  builder,
const menoh_model_data_handle  model_data,
menoh_variable_profile_table_handle dst_handle 
)

Factory function for variable_profile_table.

◆ menoh_delete_variable_profile_table()

void MENOH_API menoh_delete_variable_profile_table ( menoh_variable_profile_table_handle  variable_profile_table)

Delete function for variable_profile_table.

Users must call to release memory resources allocated for variable_profile_table.

◆ menoh_delete_variable_profile_table_builder()

void MENOH_API menoh_delete_variable_profile_table_builder ( menoh_variable_profile_table_builder_handle  builder)

Delete function for variable_profile_table_builder.

Users must call to release memory resources allocated for variable_profile_table_builder

◆ menoh_make_variable_profile_table_builder()

menoh_error_code MENOH_API menoh_make_variable_profile_table_builder ( menoh_variable_profile_table_builder_handle dst_handle)

Factory function for variable_profile_table_builder.

◆ menoh_variable_profile_table_builder_add_input_profile()

menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile ( menoh_variable_profile_table_builder_handle  builder,
const char *  name,
menoh_dtype  dtype,
int32_t  dims_size,
const int32_t *  dims 
)

Add input profile.

Input profile contains name, dtype and dims.

Note
Users can free dims buffer after calling this function.

◆ menoh_variable_profile_table_builder_add_input_profile_dims_2()

deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile_dims_2 ( menoh_variable_profile_table_builder_handle  builder,
const char *  name,
menoh_dtype  dtype,
int32_t  num,
int32_t  size 
)

Add 2D input profile.

Input profile contains name, dtype and dims (num, size). This 2D input is conventional batched 1D inputs.

Warning
This function is depreated. Please use menoh_variable_profile_table_builder_add_input_profile() instead

◆ menoh_variable_profile_table_builder_add_input_profile_dims_4()

deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_input_profile_dims_4 ( menoh_variable_profile_table_builder_handle  builder,
const char *  name,
menoh_dtype  dtype,
int32_t  num,
int32_t  channel,
int32_t  height,
int32_t  width 
)

Add 4D input profile.

Input profile contains name, dtype and dims (num, channel, height, width). This 4D input is conventional batched image inputs. Image input is 3D(channel, height, width).

Warning
This function is depreated. Please use menoh_variable_profile_table_builder_add_input_profile() instead

◆ menoh_variable_profile_table_builder_add_output_name()

menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_output_name ( menoh_variable_profile_table_builder_handle  builder,
const char *  name 
)

Add output name.

dims amd dtype of output are calculated automatically when calling of menoh_build_variable_profile_table.

◆ menoh_variable_profile_table_builder_add_output_profile()

deprecated menoh_error_code MENOH_API menoh_variable_profile_table_builder_add_output_profile ( menoh_variable_profile_table_builder_handle  builder,
const char *  name,
menoh_dtype  dtype 
)

Add output profile.

Output profile contains name and dtype. Its dims are calculated automatically when calling of menoh_build_variable_profile_table.

Warning
This function is depreated. Please use menoh_variable_profile_table_builder_add_output_name() instead

◆ menoh_variable_profile_table_get_dims_at()

menoh_error_code MENOH_API menoh_variable_profile_table_get_dims_at ( const menoh_variable_profile_table_handle  variable_profile_table,
const char *  variable_name,
int32_t  index,
int32_t *  dst_size 
)

Accessor function for variable_profile_table.

Select variable name and index, then get its dims.at(index). (eg if dims of variable "foo" and index is 1, (32, 128), dims.at(1) is 128)

◆ menoh_variable_profile_table_get_dims_size()

menoh_error_code MENOH_API menoh_variable_profile_table_get_dims_size ( const menoh_variable_profile_table_handle  variable_profile_table,
const char *  variable_name,
int32_t *  dst_size 
)

Accessor function for variable_profile_table.

Select variable name and get its dims.size() . (eg if dims of variable "foo" is (32, 128), dims.size() is 2)

◆ menoh_variable_profile_table_get_dtype()

menoh_error_code MENOH_API menoh_variable_profile_table_get_dtype ( const menoh_variable_profile_table_handle  variable_profile_table,
const char *  variable_name,
menoh_dtype dst_dtype 
)

Accessor function for variable_profile_table.

Select variable name and get its dtype.