ONE - On-device Neural Engine
|
class to define TopK operation More...
#include <topk_v2.h>
Public Member Functions | |
TopContainer ()=delete | |
Prevent default constructor of of this class. | |
TopContainer (int32 k, int32 row_size) | |
Constructor with params. | |
TopContainer (const TopContainer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) | |
TopContainer & | operator= (const TopContainer &)=delete |
void | start_collecting (const T *values) |
Start collecting. | |
void | push (int32 a) |
Push a value to be compared for topk. | |
const std::vector< int32 > & | sorted_result () |
Get sorted result from pushed values. | |
class to define TopK operation
The class that collects top indexes of k values. Based on template tensorflow::gtl::TopN<> but, for optimization, it re-uses the same container.
|
delete |
Prevent default constructor of of this class.
|
inline |
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
[in] | topContainer | To copy |
|
delete |
|
inline |
Push a value to be compared for topk.
[in] | a | A value to compare |
Definition at line 91 of file topk_v2.h.
Referenced by nnfw::rt::optimized_ops::TopK().
|
inline |
Get sorted result from pushed values.
Definition at line 115 of file topk_v2.h.
Referenced by nnfw::rt::optimized_ops::TopK().
|
inline |
Start collecting.
[in] | values | To set as values |
Definition at line 80 of file topk_v2.h.
Referenced by nnfw::rt::optimized_ops::TopK().