Utils functions are miscellaneous auxiliary tools. More...
Functions | |
| static void | hpm_nn_reshape_s8 (const int8_t *in_tensor, int8_t *out_tensor, const uint32_t size) |
| This function turns the input tensor into another tensor with the same data but in a different shape. More... | |
| static int32_t | hpm_nn_top_k_s8 (q7_t *in_vec, uint32_t size, uint32_t k, q7_t *val, uint32_t *idx) |
| This function finds the k largest values and their indices from the signed 8-bit integer input vector. More... | |
Utils functions are miscellaneous auxiliary tools.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function turns the input tensor into another tensor with the same data but in a different shape.
| [in] | in_tensor | pointer of the input tensor |
| [out] | out_tensor | pointer of the output tensor |
| [in] | size | size, in bytes, of total input tensor |
Example:
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
This function finds the k largest values and their indices from the signed 8-bit integer input vector.
| [in] | in_vec | pointer of the input vector |
| [in] | size | number of elements in the input vector |
| [in] | k | the number of the largest values to be searched |
| [out] | val | the k largest values in the input vector |
| [out] | idx | the indices of the k largest values in the input vector |