CMSIS-NN  Version 4.0.0
CMSIS NN Software Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Neural Network Data Conversion Functions

Functions

void arm_q7_to_q15_no_shift (const q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Converts the elements of the q7 vector to q15 vector without left-shift. More...
 
void arm_q7_to_q15_reordered_no_shift (const q7_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Converts the elements of the q7 vector to reordered q15 vector without left-shift. More...
 
void arm_q7_to_q15_reordered_with_offset (const q7_t *src, q15_t *dst, uint32_t block_size, q15_t offset)
 Converts the elements of the q7 vector to reordered q15 vector with an added offset. More...
 
void arm_q7_to_q15_with_offset (const q7_t *src, q15_t *dst, uint32_t block_size, q15_t offset)
 Converts the elements from a q7 vector to a q15 vector with an added offset. More...
 

Description

Perform data type conversion in-between neural network operations

Function Documentation

void arm_q7_to_q15_no_shift ( const q7_t pSrc,
q15_t pDst,
uint32_t  blockSize 
)
Parameters
[in]*pSrcpoints to the q7 input vector
[out]*pDstpoints to the q15 output vector
[in]blockSizelength of the input vector

References arm_nn_read_q7x4_ia(), and arm_nn_write_q15x2_ia().

Referenced by arm_avepool_q7_HWC(), arm_convolve_HWC_q7_basic(), and arm_convolve_HWC_q7_basic_nonsquare().

void arm_q7_to_q15_reordered_no_shift ( const q7_t pSrc,
q15_t pDst,
uint32_t  blockSize 
)
Parameters
[in]*pSrcpoints to the q7 input vector
[out]*pDstpoints to the q15 output vector
[in]blockSizelength of the input vector

References arm_nn_read_q7x4_ia(), and arm_nn_write_q7x4_ia().

Referenced by arm_convolve_1x1_HWC_q7_fast_nonsquare(), arm_convolve_HWC_q7_fast(), arm_convolve_HWC_q7_fast_nonsquare(), arm_fully_connected_q7(), and arm_fully_connected_q7_opt().

void arm_q7_to_q15_reordered_with_offset ( const q7_t src,
q15_t dst,
uint32_t  block_size,
q15_t  offset 
)
Parameters
[in]srcpointer to the q7 input vector
[out]dstpointer to the q15 output vector
[in]block_sizelength of the input vector
[in]offsetoffset to be added to each input vector element.

This function does the q7 to q15 expansion with re-ordering of bytes. Re-ordering is a consequence of the sign extension intrinsic(DSP extension). The tail (i.e., last (N % 4) elements) retains its original order.

References arm_nn_read_q7x4_ia(), and arm_nn_write_q15x2_ia().

void arm_q7_to_q15_with_offset ( const q7_t src,
q15_t dst,
uint32_t  block_size,
q15_t  offset 
)
Parameters
[in]srcpointer to the q7 input vector
[out]dstpointer to the q15 output vector
[in]block_sizelength of the input vector
[in]offsetq7 offset to be added to each input vector element.
Description:

The equation used for the conversion process is:

 dst[n] = (q15_t) src[n] + offset;   0 <= n < block_size.

References arm_nn_read_q7x4_ia(), and arm_nn_write_q15x2_ia().

Referenced by arm_convolve_s8(), and arm_depthwise_conv_s8_opt().