CMSIS-NN  Version 3.1.0
CMSIS NN Software Library
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
Concatenation Functions

Functions

void arm_concatenation_s8_w (const int8_t *input, const uint16_t input_x, const uint16_t input_y, const uint16_t input_z, const uint16_t input_w, int8_t *output, const uint32_t offset_w)
 int8/uint8 concatenation function to be used for concatenating N-tensors along the W axis (Batch size) This function should be called for each input tensor to concatenate. The argument offset_w will be used to store the input tensor in the correct position in the output tensor More...
 
void arm_concatenation_s8_x (const int8_t *input, const uint16_t input_x, const uint16_t input_y, const uint16_t input_z, const uint16_t input_w, int8_t *output, const uint16_t output_x, const uint32_t offset_x)
 int8/uint8 concatenation function to be used for concatenating N-tensors along the X axis This function should be called for each input tensor to concatenate. The argument offset_x will be used to store the input tensor in the correct position in the output tensor More...
 
void arm_concatenation_s8_y (const int8_t *input, const uint16_t input_x, const uint16_t input_y, const uint16_t input_z, const uint16_t input_w, int8_t *output, const uint16_t output_y, const uint32_t offset_y)
 int8/uint8 concatenation function to be used for concatenating N-tensors along the Y axis This function should be called for each input tensor to concatenate. The argument offset_y will be used to store the input tensor in the correct position in the output tensor More...
 
void arm_concatenation_s8_z (const int8_t *input, const uint16_t input_x, const uint16_t input_y, const uint16_t input_z, const uint16_t input_w, int8_t *output, const uint16_t output_z, const uint32_t offset_z)
 int8/uint8 concatenation function to be used for concatenating N-tensors along the Z axis This function should be called for each input tensor to concatenate. The argument offset_z will be used to store the input tensor in the correct position in the output tensor More...
 

Description

Function Documentation

void arm_concatenation_s8_w ( const int8_t *  input,
const uint16_t  input_x,
const uint16_t  input_y,
const uint16_t  input_z,
const uint16_t  input_w,
int8_t *  output,
const uint32_t  offset_w 
)

i.e. offset_w = 0 for(i = 0 i < num_input_tensors; ++i) { arm_concatenation_s8_w(&input[i], ..., &output, ..., ..., offset_w) offset_w += input_w[i] }

This function assumes that the output tensor has:

  1. The same width of the input tensor
  2. The same height of the input tensor
  3. The same number o channels of the input tensor

Unless specified otherwise, arguments are mandatory.

Note
This function, data layout independent, can be used to concatenate either int8 or uint8 tensors because it does not involve any arithmetic operation
Parameters
[in]inputPointer to input tensor
[in]input_xWidth of input tensor
[in]input_yHeight of input tensor
[in]input_zChannels in input tensor
[in]input_wBatch size in input tensor
[out]outputPointer to output tensor. Expected to be at least input_x * input_y * input_z * input_w bytes.
[in]offset_wThe offset on the W axis to start concatenating the input tensor It is user responsibility to provide the correct value

References arm_memcpy_q7().

void arm_concatenation_s8_x ( const int8_t *  input,
const uint16_t  input_x,
const uint16_t  input_y,
const uint16_t  input_z,
const uint16_t  input_w,
int8_t *  output,
const uint16_t  output_x,
const uint32_t  offset_x 
)

i.e. offset_x = 0 for(i = 0 i < num_input_tensors; ++i) { arm_concatenation_s8_x(&input[i], ..., &output, ..., ..., offset_x) offset_x += input_x[i] }

This function assumes that the output tensor has:

  1. The same height of the input tensor
  2. The same number of channels of the input tensor
  3. The same batch size of the input tensor

Unless specified otherwise, arguments are mandatory.

Note
This function, data layout independent, can be used to concatenate either int8 or uint8 tensors because it does not involve any arithmetic operation
Parameters
[in]inputPointer to input tensor. Input tensor must not overlap with the output tensor.
[in]input_xWidth of input tensor
[in]input_yHeight of input tensor
[in]input_zChannels in input tensor
[in]input_wBatch size in input tensor
[out]outputPointer to output tensor. Expected to be at least (input_x * input_y * input_z * input_w) + offset_x bytes.
[in]output_xWidth of output tensor
[in]offset_xThe offset (in number of elements) on the X axis to start concatenating the input tensor It is user responsibility to provide the correct value

Input constraints offset_x is less than output_x

References arm_memcpy_q7().

void arm_concatenation_s8_y ( const int8_t *  input,
const uint16_t  input_x,
const uint16_t  input_y,
const uint16_t  input_z,
const uint16_t  input_w,
int8_t *  output,
const uint16_t  output_y,
const uint32_t  offset_y 
)

i.e. offset_y = 0 for(i = 0 i < num_input_tensors; ++i) { arm_concatenation_s8_y(&input[i], ..., &output, ..., ..., offset_y) offset_y += input_y[i] }

This function assumes that the output tensor has:

  1. The same width of the input tensor
  2. The same number of channels of the input tensor
  3. The same batch size of the input tensor

Unless specified otherwise, arguments are mandatory.

Note
This function, data layout independent, can be used to concatenate either int8 or uint8 tensors because it does not involve any arithmetic operation
Parameters
[in]inputPointer to input tensor. Input tensor must not overlap with the output tensor.
[in]input_xWidth of input tensor
[in]input_yHeight of input tensor
[in]input_zChannels in input tensor
[in]input_wBatch size in input tensor
[out]outputPointer to output tensor. Expected to be at least (input_z * input_w * input_x * input_y) + offset_y bytes.
[in]output_yHeight of output tensor
[in]offset_yThe offset on the Y axis to start concatenating the input tensor It is user responsibility to provide the correct value

Input constraints offset_y is less than output_y

References arm_memcpy_q7().

void arm_concatenation_s8_z ( const int8_t *  input,
const uint16_t  input_x,
const uint16_t  input_y,
const uint16_t  input_z,
const uint16_t  input_w,
int8_t *  output,
const uint16_t  output_z,
const uint32_t  offset_z 
)

i.e. offset_z = 0 for(i = 0 i < num_input_tensors; ++i) { arm_concatenation_s8_z(&input[i], ..., &output, ..., ..., offset_z) offset_z += input_z[i] }

This function assumes that the output tensor has:

  1. The same width of the input tensor
  2. The same height of the input tensor
  3. The same batch size of the input tensor

Unless specified otherwise, arguments are mandatory.

Note
This function, data layout independent, can be used to concatenate either int8 or uint8 tensors because it does not involve any arithmetic operation
Parameters
[in]inputPointer to input tensor. Input tensor must not overlap with output tensor.
[in]input_xWidth of input tensor
[in]input_yHeight of input tensor
[in]input_zChannels in input tensor
[in]input_wBatch size in input tensor
[out]outputPointer to output tensor. Expected to be at least (input_x * input_y * input_z * input_w) + offset_z bytes.
[in]output_zChannels in output tensor
[in]offset_zThe offset on the Z axis to start concatenating the input tensor It is user responsibility to provide the correct value

Input constraints offset_z is less than output_z

References arm_memcpy_q7().