Skip to content
heliaCORE
API reference
HELIA HUB

Structure Types

Enums and Data Structures used in public API.

Machine-readable model

struct

CMSIS-NN object to contain the dimensions of the tensors

Include/arm_nn_types.h:126

struct cmsis_nn_dims

CMSIS-NN object to contain the dimensions of the tensors

attribute

n

C

Generic dimension to contain either the batch size or output channels.

Include/arm_nn_types.h:128

int32_t n

Generic dimension to contain either the batch size or output channels. Please refer to the function documentation for more information

struct

CMSIS-NN object for quantization parameters.

Include/arm_nn_types.h:162

struct cmsis_nn_quant_params

CMSIS-NN object for quantization parameters. This struct supports both per-tensor and per-channels requantization and is recommended for new operators.

struct

CMSIS-NN object for the convolution layer parameters

Include/arm_nn_types.h:177

struct cmsis_nn_conv_params

CMSIS-NN object for the convolution layer parameters

struct

CMSIS-NN object for the transpose convolution layer parameters

Include/arm_nn_types.h:188

struct cmsis_nn_transpose_conv_params

CMSIS-NN object for the transpose convolution layer parameters

struct

CMSIS-NN object for the depthwise convolution layer parameters

Include/arm_nn_types.h:200

struct cmsis_nn_dw_conv_params

CMSIS-NN object for the depthwise convolution layer parameters

struct

CMSIS-NN object for the gather operator

Include/arm_nn_types.h:220

struct cmsis_nn_gather_params

CMSIS-NN object for the gather operator

attribute

Rank of the coordinate tensor ([1, 4]; float gather also accepts scalar rank 0)

Include/arm_nn_types.h:225

int32_t coords_rank

Rank of the coordinate tensor ([1, 4]; float gather also accepts scalar rank 0)

struct

CMSIS-NN object for the gathernd operator

Include/arm_nn_types.h:229

struct cmsis_nn_gather_nd_params

CMSIS-NN object for the gather_nd operator

struct

CMSIS-NN object for the tile operator

Include/arm_nn_types.h:237

struct cmsis_nn_tile_params

CMSIS-NN object for the tile operator

struct

CMSIS-NN object for the broadcastto operator

Include/arm_nn_types.h:245

struct cmsis_nn_broadcast_to_params

CMSIS-NN object for the broadcast_to operator

struct

CMSIS-NN object for the scatternd operator

Include/arm_nn_types.h:253

struct cmsis_nn_scatter_nd_params

CMSIS-NN object for the scatter_nd operator

struct

CMSIS-NN object for the mirrorpad operator

Include/arm_nn_types.h:263

struct cmsis_nn_mirror_pad_params

CMSIS-NN object for the mirror_pad operator

struct

CMSIS-NN object for the selectv2 operator (with broadcast)

Include/arm_nn_types.h:280

struct cmsis_nn_select_v2_params

CMSIS-NN object for the select_v2 operator (with broadcast)

struct

CMSIS-NN object for the reversesequence operator

Include/arm_nn_types.h:290

struct cmsis_nn_reverse_sequence_params

CMSIS-NN object for the reverse_sequence operator

struct

CMSIS-NN object for the dynamicupdateslice operator

Include/arm_nn_types.h:299

struct cmsis_nn_dynamic_update_slice_params

CMSIS-NN object for the dynamic_update_slice operator

struct

CMSIS-NN object for Fully Connected layer parameters

Include/arm_nn_types.h:310

struct cmsis_nn_fc_params

CMSIS-NN object for Fully Connected layer parameters

struct

CMSIS-NN object for Resize Nearest Neighbor layer parameters

Include/arm_nn_types.h:334

struct cmsis_nn_resize_params

CMSIS-NN object for Resize Nearest Neighbor layer parameters

struct

CMSIS-NN object for SVDF layer parameters

Include/arm_nn_types.h:341

struct cmsis_nn_svdf_params

CMSIS-NN object for SVDF layer parameters

struct

CMSIS-NN object for LSTM gate parameters

Include/arm_nn_types.h:370

struct cmsis_nn_lstm_gate

CMSIS-NN object for LSTM gate parameters

struct

CMSIS-NN object for LSTM parameters

Include/arm_nn_types.h:387

struct cmsis_nn_lstm_params

CMSIS-NN object for LSTM parameters

attribute

0 if first dimension is batch, else first dimension is time

Include/arm_nn_types.h:389

int32_t time_major

0 if first dimension is batch, else first dimension is time

attribute

Size of output from the LSTM cell, used as output and recursively into the next time step

Include/arm_nn_types.h:394

int32_t hidden_size

Size of output from the LSTM cell, used as output and recursively into the next time step

struct

CMSIS-NN object for LSTM scratch buffers.

Include/arm_nn_types.h:420

struct cmsis_nn_lstm_context

CMSIS-NN object for LSTM scratch buffers.

There is no size field and no runtime enforcement: an undersized temp1 or temp2 is written past on every build target, so size them from the queries below, not by transcribing a formula.

attribute

Gate-vector scratch (int16t elements for both the s8 and s16 layers).

Include/arm_nn_types.h:422

void * temp1

Gate-vector scratch (int16_t elements for both the s8 and s16 layers). Sized by arm_lstm_unidirectional_s8_temp1_get_buffer_size() / arm_lstm_unidirectional_s16_temp1_get_buffer_size().

attribute

Cell-gate and tanh(cellstate) scratch (int16t elements for both layers).

Include/arm_nn_types.h:425

void * temp2

Cell-gate and tanh(cell_state) scratch (int16_t elements for both layers). Sized by arm_lstm_unidirectional_s8_temp2_get_buffer_size() / arm_lstm_unidirectional_s16_temp2_get_buffer_size().

attribute

Cell-state buffer, batchsize hiddensize int16t elements for both layers.

Include/arm_nn_types.h:428

void * cell_state

Cell-state buffer, batch_size * hidden_size int16_t elements for both layers.

attribute

Optional in/out hidden state for streaming; NULL selects stateless.

Include/arm_nn_types.h:429

void * hidden_state

Optional in/out hidden state for streaming; NULL selects stateless.

struct

Convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:142

struct cmsis_nn_conv_params_f32

Convolution parameters for float32 operators.

struct

Transpose convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:154

struct cmsis_nn_transpose_conv_params_f32

Transpose convolution parameters for float32 operators.

struct

Depthwise convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:166

struct cmsis_nn_dw_conv_params_f32

Depthwise convolution parameters for float32 operators.

struct

Pooling parameters for float32 operators.

Include/arm_nn_types_flt.h:178

struct cmsis_nn_pool_params_f32

Pooling parameters for float32 operators.

struct

Batched matrix multiplication parameters for float32 operators.

Include/arm_nn_types_flt.h:197

struct cmsis_nn_bmm_params_f32

Batched matrix multiplication parameters for float32 operators.

attribute

True when the left-hand-side operand is stored transposed.

Include/arm_nn_types_flt.h:199

const bool adj_x

True when the left-hand-side operand is stored transposed.

attribute

True when the right-hand-side operand is stored transposed.

Include/arm_nn_types_flt.h:200

const bool adj_y

True when the right-hand-side operand is stored transposed.

attribute

Right-hand-side operand storage format.

Include/arm_nn_types_flt.h:202

arm_nn_weight_format_flt rhs_format

Right-hand-side operand storage format. ARM_NN_WEIGHT_FORMAT_NT_N_PACKED is currently supported only when adj_x == false and adj_y == false.

struct

Transpose parameters for float32 operators.

Include/arm_nn_types_flt.h:219

struct cmsis_nn_transpose_params_f32

Transpose parameters for float32 operators.

attribute

Layout convention used to interpret tensor dimensions.

Include/arm_nn_types_flt.h:223

arm_nn_tensor_layout layout

Layout convention used to interpret tensor dimensions.

struct

Singular value decomposition filter parameters for float32 operators.

Include/arm_nn_types_flt.h:229

struct cmsis_nn_svdf_params_f32

Singular value decomposition filter parameters for float32 operators.

struct

Read-only weights and bias metadata for one float32 LSTM gate.

Include/arm_nn_types_flt.h:239

struct cmsis_nn_lstm_gate_f32

Read-only weights and bias metadata for one float32 LSTM gate.

struct

Parameters for a unidirectional float32 LSTM layer.

Include/arm_nn_types_flt.h:250

struct cmsis_nn_lstm_params_f32

Parameters for a unidirectional float32 LSTM layer.

struct

Scratch and mutable state buffers for a float32 LSTM invocation.

Include/arm_nn_types_flt.h:268

struct cmsis_nn_lstm_context_f32

Scratch and mutable state buffers for a float32 LSTM invocation.

attribute

Unused by the current implementation and may be NULL.

Include/arm_nn_types_flt.h:270

float32_t * temp1

Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f32_temp1_get_buffer_size(), which reports 0; size from the query rather than hard-coding NULL if the buffer is arena-allocated.

attribute

Unused by the current implementation and may be NULL.

Include/arm_nn_types_flt.h:273

float32_t * temp2

Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f32_temp2_get_buffer_size().

attribute

Optional in/out hidden state for streaming; NULL selects stateless.

Include/arm_nn_types_flt.h:276

float32_t * hidden_state

Optional in/out hidden state for streaming; NULL selects stateless. Streaming is NULL-gated, so zero-initialise the context (e.g. designated initialisers) to keep legacy 3-field callers stateless. Matches the quantized cmsis_nn_lstm_context contract.

struct

Weights and biases for a single float32 GRU gate.

Include/arm_nn_types_flt.h:291

struct cmsis_nn_gru_gate_f32

Weights and biases for a single float32 GRU gate.

The activation (sigmoid for update/reset, tanh for candidate) is implied by the gate’s role and is not stored here. The reset-after formulation keeps the input-projection bias and the recurrent-projection bias separate, because the reset gate multiplies the recurrent projection (including its bias) after the matmul.

struct

Parameters for a float32 unidirectional GRU invocation.

Include/arm_nn_types_flt.h:305

struct cmsis_nn_gru_params_f32

Parameters for a float32 unidirectional GRU invocation.

GRU has three gates (update, reset, candidate) and, unlike LSTM, no cell state. The hidden state is the layer output.

attribute

Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).

Include/arm_nn_types_flt.h:312

int32_t reset_after

Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).

struct

Scratch buffers for a float32 GRU invocation.

Include/arm_nn_types_flt.h:333

struct cmsis_nn_gru_context_f32

Scratch buffers for a float32 GRU invocation.

attribute

Scratch required when resetafter == 0; sized by armgruunidirectionalf32temp1getbuffersize().

Include/arm_nn_types_flt.h:335

float32_t * temp1

Scratch required when reset_after == 0; sized by arm_gru_unidirectional_f32_temp1_get_buffer_size().

attribute

Optional in/out persistent hidden state [hiddensize] for streaming (batchsize == 1).

Include/arm_nn_types_flt.h:338

float32_t * hidden_state

Optional in/out persistent hidden state [hidden_size] for streaming (batch_size == 1).

struct

Convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:359

struct cmsis_nn_conv_params_f16

Convolution parameters for float32 operators.

struct

Transpose convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:371

struct cmsis_nn_transpose_conv_params_f16

Transpose convolution parameters for float32 operators.

struct

Depthwise convolution parameters for float32 operators.

Include/arm_nn_types_flt.h:383

struct cmsis_nn_dw_conv_params_f16

Depthwise convolution parameters for float32 operators.

struct

Pooling parameters for float32 operators.

Include/arm_nn_types_flt.h:395

struct cmsis_nn_pool_params_f16

Pooling parameters for float32 operators.

struct

Batched matrix multiplication parameters for float32 operators.

Include/arm_nn_types_flt.h:414

struct cmsis_nn_bmm_params_f16

Batched matrix multiplication parameters for float32 operators.

attribute

True when the left-hand-side operand is stored transposed.

Include/arm_nn_types_flt.h:416

const bool adj_x

True when the left-hand-side operand is stored transposed.

attribute

True when the right-hand-side operand is stored transposed.

Include/arm_nn_types_flt.h:417

const bool adj_y

True when the right-hand-side operand is stored transposed.

attribute

Right-hand-side operand storage format.

Include/arm_nn_types_flt.h:419

arm_nn_weight_format_flt rhs_format

Right-hand-side operand storage format. ARM_NN_WEIGHT_FORMAT_NT_N_PACKED is currently supported only when adj_x == false and adj_y == false.

struct

Transpose parameters for float32 operators.

Include/arm_nn_types_flt.h:436

struct cmsis_nn_transpose_params_f16

Transpose parameters for float32 operators.

attribute

Layout convention used to interpret tensor dimensions.

Include/arm_nn_types_flt.h:440

arm_nn_tensor_layout layout

Layout convention used to interpret tensor dimensions.

struct

Singular value decomposition filter parameters for float32 operators.

Include/arm_nn_types_flt.h:446

struct cmsis_nn_svdf_params_f16

Singular value decomposition filter parameters for float32 operators.

struct

Read-only weights and bias metadata for one float32 LSTM gate.

Include/arm_nn_types_flt.h:456

struct cmsis_nn_lstm_gate_f16

Read-only weights and bias metadata for one float32 LSTM gate.

struct

Parameters for a unidirectional float32 LSTM layer.

Include/arm_nn_types_flt.h:467

struct cmsis_nn_lstm_params_f16

Parameters for a unidirectional float32 LSTM layer.

struct

Scratch and mutable state buffers for a float32 LSTM invocation.

Include/arm_nn_types_flt.h:485

struct cmsis_nn_lstm_context_f16

Scratch and mutable state buffers for a float32 LSTM invocation.

attribute

Unused by the current implementation and may be NULL.

Include/arm_nn_types_flt.h:487

float16_t * temp1

Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f16_temp1_get_buffer_size(), which reports 0; size from the query rather than hard-coding NULL if the buffer is arena-allocated.

attribute

Unused by the current implementation and may be NULL.

Include/arm_nn_types_flt.h:490

float16_t * temp2

Unused by the current implementation and may be NULL. Sized by arm_lstm_unidirectional_f16_temp2_get_buffer_size().

attribute

Optional in/out hidden state for streaming; NULL selects stateless.

Include/arm_nn_types_flt.h:493

float16_t * hidden_state

Optional in/out hidden state for streaming; NULL selects stateless. Streaming is NULL-gated, so zero-initialise the context (e.g. designated initialisers) to keep legacy 3-field callers stateless. Matches the quantized cmsis_nn_lstm_context contract.

struct

Weights and biases for a single float16 GRU gate.

Include/arm_nn_types_flt.h:508

struct cmsis_nn_gru_gate_f16

Weights and biases for a single float16 GRU gate.

The activation (sigmoid for update/reset, tanh for candidate) is implied by the gate’s role and is not stored here. The reset-after formulation keeps the input-projection bias and the recurrent-projection bias separate, because the reset gate multiplies the recurrent projection (including its bias) after the matmul.

struct

Parameters for a float16 unidirectional GRU invocation.

Include/arm_nn_types_flt.h:522

struct cmsis_nn_gru_params_f16

Parameters for a float16 unidirectional GRU invocation.

GRU has three gates (update, reset, candidate) and, unlike LSTM, no cell state. The hidden state is the layer output.

attribute

Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).

Include/arm_nn_types_flt.h:529

int32_t reset_after

Non-zero: reset gate applied after the recurrent matmul (Keras/TFLite default).

struct

Scratch buffers for a float16 GRU invocation.

Include/arm_nn_types_flt.h:550

struct cmsis_nn_gru_context_f16

Scratch buffers for a float16 GRU invocation.

attribute

Scratch required when resetafter == 0; sized by armgruunidirectionalf16temp1getbuffersize().

Include/arm_nn_types_flt.h:552

float16_t * temp1

Scratch required when reset_after == 0; sized by arm_gru_unidirectional_f16_temp1_get_buffer_size().

attribute

Optional in/out persistent hidden state [hiddensize] for streaming (batchsize == 1).

Include/arm_nn_types_flt.h:555

float16_t * hidden_state

Optional in/out persistent hidden state [hidden_size] for streaming (batch_size == 1).

enum

Activation selector for floating-point operator APIs.

Include/arm_nn_types_flt.h:78

enum arm_nn_activation_type_flt

Activation selector for floating-point operator APIs.

Numeric values intentionally live in a dedicated floating-point range to avoid overlap with the legacy integer public activation enum.

enum

Enum for specifying comparison operator

Include/arm_nn_types.h:85

enum arm_nn_compare_operation

Enum for specifying comparison operator

enum

Function return codes

Include/arm_nn_types.h:96

enum arm_cmsis_nn_status

Function return codes

enum

Depthwise kernel storage layout selector for floating-point kernels.

Include/arm_nn_types_flt.h:98

enum arm_nn_dw_kernel_layout_f32

Depthwise kernel storage layout selector for floating-point kernels.

Public float depthwise entry points currently use KC storage ([k][c]).

enum

Weight storage format selector for floating-point operators.

Include/arm_nn_types_flt.h:122

enum arm_nn_weight_format_flt

Weight storage format selector for floating-point operators.

This enum allows frameworks to describe whether weights are provided in the standard public operator layout or in a backend-specific packed layout.

ARM_NN_WEIGHT_FORMAT_NT_N_PACKED matches the packed RHS layout consumed by arm_nn_mat_mult_nt_n_packed_f16/f32.

The packed NTxN layout exists because MVE kernels typically perform best when output-channel blocks can be loaded contiguously. With the standard NT x T formulation, vectorizing over output channels tends to require gather-load accesses to the RHS, which is less efficient than a packed non-transposed RHS layout.

For operators that support ARM_NN_WEIGHT_FORMAT_NT_N_PACKED, supplying offline-repacked constant weights in this layout is therefore generally the preferred way to achieve the best MVE performance.