ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Comparison.h File Reference
#include "cker/Shape.h"
#include "cker/Types.h"
#include "cker/Utils.h"

Go to the source code of this file.

Namespaces

namespace  nnfw
 
namespace  nnfw::cker
 

Macros

#define TFLITE_COMPARISON_OP(name)
 

Typedefs

template<typename T >
using nnfw::cker::ComparisonFn = bool(*)(T, T)
 

Functions

template<typename T >
bool nnfw::cker::EqualFn (T lhs, T rhs)
 
template<typename T >
bool nnfw::cker::NotEqualFn (T lhs, T rhs)
 
template<typename T >
bool nnfw::cker::GreaterFn (T lhs, T rhs)
 
template<typename T >
bool nnfw::cker::GreaterEqualFn (T lhs, T rhs)
 
template<typename T >
bool nnfw::cker::LessFn (T lhs, T rhs)
 
template<typename T >
bool nnfw::cker::LessEqualFn (T lhs, T rhs)
 
template<typename T , ComparisonFn< T > F>
void nnfw::cker::ComparisonImpl (const Shape &input1_shape, const T *input1_data, const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data)
 
template<ComparisonFn< float > F>
void nnfw::cker::Comparison (const Shape &input1_shape, const float *input1_data, const Shape &input2_shape, const float *input2_data, const Shape &output_shape, bool *output_data)
 
template<typename T , ComparisonFn< int32_t > F>
void nnfw::cker::ComparisonWithScaling (ComparisonParams &params, const Shape &input1_shape, const T *input1_data, const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data)
 
template<typename T , ComparisonFn< T > F>
void nnfw::cker::BroadcastComparison4DSlowImpl (const Shape &unextended_input1_shape, const T *input1_data, const Shape &unextended_input2_shape, const T *input2_data, const Shape &unextended_output_shape, bool *output_data)
 
template<typename T , ComparisonFn< T > F>
void nnfw::cker::BroadcastComparison4DSlow (const Shape &input1_shape, const T *input1_data, const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data)
 
template<typename T , ComparisonFn< int32_t > F>
void nnfw::cker::BroadcastComparison4DSlowWithScaling (ComparisonParams &params, const Shape &input1_shape, const T *input1_data, const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data)
 
 nnfw::cker::TFLITE_COMPARISON_OP (Equal)
 
 nnfw::cker::TFLITE_COMPARISON_OP (NotEqual)
 
 nnfw::cker::TFLITE_COMPARISON_OP (Greater)
 
 nnfw::cker::TFLITE_COMPARISON_OP (GreaterEqual)
 
 nnfw::cker::TFLITE_COMPARISON_OP (Less)
 
 nnfw::cker::TFLITE_COMPARISON_OP (LessEqual)
 

Macro Definition Documentation

◆ TFLITE_COMPARISON_OP

#define TFLITE_COMPARISON_OP (   name)

Definition at line 178 of file Comparison.h.

182 { \
183 Comparison<name##Fn>(input1_shape, input1_data, input2_shape, input2_data, output_shape, \
184 output_data); \
185 } \
186 template <typename T> \
187 inline void name##NoScaling(const Shape &input1_shape, const T *input1_data, \
188 const Shape &input2_shape, const T *input2_data, \
189 const Shape &output_shape, bool *output_data) \
190 { \
191 ComparisonImpl<T, name##Fn>(input1_shape, input1_data, input2_shape, input2_data, \
192 output_shape, output_data); \
193 } \
194 template <typename T> \
195 inline void name##WithScaling( \
196 ComparisonParams &params, const Shape &input1_shape, const T *input1_data, \
197 const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data) \
198 { \
199 ComparisonWithScaling<T, name##Fn>(params, input1_shape, input1_data, input2_shape, \
200 input2_data, output_shape, output_data); \
201 } \
202 template <typename T> \
203 inline void Broadcast4DSlow##name##NoScaling(const Shape &input1_shape, const T *input1_data, \
204 const Shape &input2_shape, const T *input2_data, \
205 const Shape &output_shape, bool *output_data) \
206 { \
207 BroadcastComparison4DSlowImpl<T, name##Fn>(input1_shape, input1_data, input2_shape, \
208 input2_data, output_shape, output_data); \
209 } \
210 template <typename T> \
211 inline void Broadcast4DSlow##name(const Shape &input1_shape, const T *input1_data, \
212 const Shape &input2_shape, const T *input2_data, \
213 const Shape &output_shape, bool *output_data) \
214 { \
215 BroadcastComparison4DSlow<T, name##Fn>(input1_shape, input1_data, input2_shape, input2_data, \
216 output_shape, output_data); \
217 } \
218 template <typename T> \
219 inline void Broadcast4DSlow##name##WithScaling( \
220 ComparisonParams &params, const Shape &input1_shape, const T *input1_data, \
221 const Shape &input2_shape, const T *input2_data, const Shape &output_shape, bool *output_data) \
222 { \
223 BroadcastComparison4DSlowWithScaling<T, name##Fn>( \
224 params, input1_shape, input1_data, input2_shape, input2_data, output_shape, output_data); \
225 }
const luci_interpreter::RuntimeShape output_shape
Definition Shape.h:28