clDNN
Network Topology
Collaboration diagram for Network Topology:

Modules

 Primitives
 

Classes

struct  cldnn_float_arr
 Represents reference to an array of floats. More...
 
struct  cldnn_uint16_t_arr
 Represents reference to an array of uint16_t. More...
 
struct  cldnn_tensor_arr
 Represents reference to an array of tensor. More...
 
struct  cldnn_primitive_id_arr
 Represents reference to an array of primitive ids. More...
 
struct  cldnn_arg
 Custom primitive kernel argument type. More...
 
struct  cldnn_activation_additional_params
 activation additional params More...
 
struct  cldnn_primitive_desc
 Basic primitive descriptor structure. More...
 

Macros

#define CLDNN_BEGIN_PRIMITIVE_DESC(PType)
 Begin primitive description definition. More...
 
#define CLDNN_END_PRIMITIVE_DESC(PType)   };
 Close primitive descriptor definition.
 
#define CLDNN_PRIMITIVE_DESC(PType)   cldnn_##PType##_desc
 

Typedefs

typedef struct cldnn_topology_impl * cldnn_topology
 Network topology to be defined by user.
 
typedef const struct cldnn_primitive_type * cldnn_primitive_type_id
 Globally unique primitive's type id.
 
typedef const char * cldnn_primitive_id
 Unique id of a primitive within a topology.
 
typedef const char * cldnn_kernel_code
 Custom primitive kernel source code.
 
typedef cldnn_kernel_codecldnn_kernels_code
 Custom primitive kernel source code array.
 
typedef const char * cldnn_kernel_entry_point
 Custom primitive kernel entry point.
 
typedef const char * cldnn_kernel_build_options
 Custom primitive kernel build options.
 
typedef const size_t * cldnn_work_group_sizes
 Custom primitive kernel workgroup sizes.
 
typedef uint32_t cldnn_arg_index
 Custom primitive kernel argument index.
 
typedef const cldnn_argcldnn_kernel_arguments
 Custom primitive kernel argument array.
 

Enumerations

enum  cldnn_arg_type { arg_input, arg_output }
 Custom primitive kernel argument type.
 
enum  cldnn_activation_func {
  activation_none, activation_logistic, activation_hyperbolic_tan, activation_relu,
  activation_relu_negative_slope, activation_clamp, activation_softrelu, activation_abs,
  activation_linear, activation_square, activation_sqrt
}
 activation functions
 

Functions

CLDNN_API cldnn_topology cldnn_create_topology (cldnn_status *status)
 Create empty network topology.
 
CLDNN_API void cldnn_add_primitive (cldnn_topology topology, const struct cldnn_primitive_desc *dto, cldnn_status *status)
 Add new primitive to the topology. More...
 
CLDNN_API void cldnn_get_primitive_ids (cldnn_topology topology, char *ids, size_t size, size_t *size_ret, cldnn_status *status)
 Return all primitives id from topology. More...
 
CLDNN_API void cldnn_retain_topology (cldnn_topology topology, cldnn_status *status)
 Increment reference counter for the topology object.
 
CLDNN_API void cldnn_release_topology (cldnn_topology topology, cldnn_status *status)
 Decrement reference counter for the topology object. Deletes object when counter becomes zero.
 

Detailed Description


Class Documentation

◆ cldnn_float_arr

struct cldnn_float_arr

Represents reference to an array of floats.

Definition at line 308 of file cldnn.h.

Class Members
const float * data Pointer to float array.
size_t size Size (in floats) of the array.

◆ cldnn_uint16_t_arr

struct cldnn_uint16_t_arr

Represents reference to an array of uint16_t.

Definition at line 315 of file cldnn.h.

Class Members
const uint16_t * data Pointer to uint16_t array.
size_t size Size (in uint16_t) of the array.

◆ cldnn_tensor_arr

struct cldnn_tensor_arr

Represents reference to an array of tensor.

Definition at line 322 of file cldnn.h.

Collaboration diagram for cldnn_tensor_arr:
Class Members
const cldnn_tensor * data Pointer to tensor array.
size_t size Size (in tensor) of the array.

◆ cldnn_primitive_id_arr

struct cldnn_primitive_id_arr

Represents reference to an array of primitive ids.

Definition at line 335 of file cldnn.h.

Class Members
const cldnn_primitive_id * data Pointer to ids array.
size_t size Number of ids in the array.

◆ cldnn_arg

struct cldnn_arg

Custom primitive kernel argument type.

Definition at line 363 of file cldnn.h.

Class Members
cldnn_arg_type arg_type
cldnn_arg_index index

◆ cldnn_activation_additional_params

struct cldnn_activation_additional_params

activation additional params

Definition at line 389 of file cldnn.h.

Class Members
float a
float b

◆ cldnn_primitive_desc

struct cldnn_primitive_desc

Basic primitive descriptor structure.

Definition at line 414 of file cldnn.h.

Collaboration diagram for cldnn_primitive_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

Macro Definition Documentation

◆ CLDNN_BEGIN_PRIMITIVE_DESC

#define CLDNN_BEGIN_PRIMITIVE_DESC (   PType)
Value:
struct cldnn_##PType##_desc {\
cldnn_primitive_type_id type; \
cldnn_primitive_id id; \
cldnn_primitive_id_arr input; \
cldnn_padding output_padding;

Begin primitive description definition.

Defines 'cldnn_primitive_type_desc' structure with first 5 fields common for all primitive descriptors. Other fields should be added after this macro. primitive descriptor definition should be closed by CLDNN_END_PRIMITIVE_DESC. Output padding information.

Definition at line 398 of file cldnn.h.

Function Documentation

◆ cldnn_add_primitive()

CLDNN_API void cldnn_add_primitive ( cldnn_topology  topology,
const struct cldnn_primitive_desc dto,
cldnn_status status 
)

Add new primitive to the topology.

Parameters
[in]dtoThe pointer to a structure defined by CLDNN_BEGIN_PRIMITIVE_DESC and CLDNN_END_PRIMITIVE_DESC

◆ cldnn_get_primitive_ids()

CLDNN_API void cldnn_get_primitive_ids ( cldnn_topology  topology,
char *  ids,
size_t  size,
size_t *  size_ret,
cldnn_status status 
)

Return all primitives id from topology.

Function fills user provided buffer by primitive ids. Each id is followed by '\0'.

Parameters
[in]idsPointer to user-allocated buffer to store names.
[in]sizeSize (in chars) of the buffer.
[out]size_retRequired size (in chars) to store result.