LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
tpt_top_k_s8.c File Reference
#include "tpt_math_nn.h"
Include dependency graph for tpt_top_k_s8.c:

Data Structures

struct  HeapNode

Functions

static void swap (HeapNode *a, HeapNode *b)
static void minHeapify (HeapNode *heap, int size, int root)
static void heapPush (HeapNode *heap, int *size, HeapNode newNode, int maxSize)
static void extractHeap (HeapNode *heap, q7_t *out_val, uint32_t *out_idx, int heapSize)
tpt_nn_status tpt_top_k_s8 (q7_t *aOutData, uint32_t *aOut_idx, q7_t *aInData, uint32_t aKer_value, uint32_t aCount)
 This function finds the k largest values and their indices from the signed 8-bit integer input vector.

Function Documentation

◆ extractHeap()

void extractHeap ( HeapNode * heap,
q7_t * out_val,
uint32_t * out_idx,
int heapSize )
inlinestatic

◆ heapPush()

void heapPush ( HeapNode * heap,
int * size,
HeapNode newNode,
int maxSize )
inlinestatic

◆ minHeapify()

void minHeapify ( HeapNode * heap,
int size,
int root )
inlinestatic

◆ swap()

void swap ( HeapNode * a,
HeapNode * b )
inlinestatic