/tflite-micro-3.4.0-2.7.6/third_party_static/flatbuffers/include/flatbuffers/ |
D | stl_emulation.h | 63 template <typename T> inline T *vector_data(std::vector<T> &vector) { in vector_data() 69 template <typename T> inline const T *vector_data( in vector_data() 70 const std::vector<T> &vector) { in vector_data() 74 template <typename T, typename V> 75 inline void vector_emplace_back(std::vector<T> *vector, V &&data) { in vector_emplace_back() 85 template <typename T> 86 using numeric_limits = std::numeric_limits<T>; 88 template <typename T> class numeric_limits : 89 public std::numeric_limits<T> {}; 92 template <typename T> class numeric_limits : [all …]
|
D | flatbuffers.h | 35 template<typename T> inline bool IsTheSameAs(T e, T def) { return e == def; } in IsTheSameAs() 40 template<typename T> inline bool IsFloatTheSameAs(T e, T def) { in IsFloatTheSameAs() 54 template<typename T> 55 inline bool IsOutRange(const T &v, const T &low, const T &high) { in IsOutRange() 60 template<typename T> 61 inline bool IsInRange(const T &v, const T &low, const T &high) { in IsInRange() 67 template<typename T> struct Offset { 83 template<typename T> FLATBUFFERS_CONSTEXPR size_t AlignOf() { in AlignOf() 86 return __alignof(T); in AlignOf() 89 return __alignof__(T); in AlignOf() [all …]
|
D | base.h | 121 template<class T> inline operator T*() const { return 0; } 289 template<typename T> FLATBUFFERS_CONSTEXPR inline bool IsConstTrue(T t) { in IsConstTrue() 344 template<typename T> T EndianSwap(T t) { in EndianSwap() 365 if (sizeof(T) == 1) { // Compile-time if-then's. in EndianSwap() 367 } else if (sizeof(T) == 2) { in EndianSwap() 368 union { T t; uint16_t i; } u = { t }; in EndianSwap() 371 } else if (sizeof(T) == 4) { in EndianSwap() 372 union { T t; uint32_t i; } u = { t }; in EndianSwap() 375 } else if (sizeof(T) == 8) { in EndianSwap() 376 union { T t; uint64_t i; } u = { t }; in EndianSwap() [all …]
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/micro/ |
D | micro_utils.h | 35 template <typename T> 36 T FloatToQuantizedType(const float value, const float scale, int zero_point) { in FloatToQuantizedType() 39 std::max(static_cast<int32_t>(std::numeric_limits<T>::min()), result); in FloatToQuantizedType() 41 std::min(static_cast<int32_t>(std::numeric_limits<T>::max()), result); in FloatToQuantizedType() 45 template <typename T> 46 T FloatToSymmetricQuantizedType(const float value, const float scale) { in FloatToSymmetricQuantizedType() 51 static_cast<std::int64_t>(std::numeric_limits<T>::min() + 1), result); in FloatToSymmetricQuantizedType() 52 result = std::min(static_cast<std::int64_t>(std::numeric_limits<T>::max()), in FloatToSymmetricQuantizedType() 68 template <typename T> 69 void Quantize(const float* input, T* output, int num_elements, float scale, in Quantize() [all …]
|
D | test_helpers.h | 168 template <typename T> 169 TfLiteTensor CreateTensor(const T* data, TfLiteIntArray* dims, 177 result.type = typeToTfLiteType<T>(); 182 result.data.data = const_cast<T*>(data); 184 result.bytes = ElementCount(*dims) * sizeof(T); 188 template <typename T> 189 TfLiteTensor CreateQuantizedTensor(const T* data, TfLiteIntArray* dims, 198 template <typename T> 199 TfLiteTensor CreateQuantizedTensor(const float* input, T* quantized, 248 template <typename T> [all …]
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/kernels/internal/reference/ |
D | comparisons.h | 26 template <typename T> 27 inline bool EqualFn(T lhs, T rhs) { in EqualFn() 31 template <typename T> 32 inline bool NotEqualFn(T lhs, T rhs) { in NotEqualFn() 36 template <typename T> 37 inline bool GreaterFn(T lhs, T rhs) { in GreaterFn() 40 template <typename T> 41 inline bool GreaterEqualFn(T lhs, T rhs) { in GreaterEqualFn() 44 template <typename T> 45 inline bool LessFn(T lhs, T rhs) { in LessFn() [all …]
|
D | pad.h | 37 template <typename T, typename P> 39 const RuntimeShape& input_shape, const T* input_data, in PadImpl() 41 T* output_data) { in PadImpl() 87 const T pad_value = *pad_value_ptr; in PadImpl() 89 const T* in_ptr = input_data; in PadImpl() 90 T* out_ptr = output_data; in PadImpl() 117 template <typename T, typename P> 119 const RuntimeShape& input_shape, const T* input_data, in Pad() 121 T* output_data) { in Pad() 127 template <typename T> [all …]
|
D | floor_mod.h | 25 template <typename T> 26 T FloorMod(T input1, T input2) { in FloorMod() 32 using ModFunc = typename std::conditional<std::is_integral<T>::value, in FloorMod() 33 std::modulus<T>, FloatMod>::type; in FloorMod() 35 T trunc_mod = mod_func(input1, input2); in FloorMod()
|
D | prelu.h | 27 template <typename T> 30 const T* input_data, const RuntimeShape& alpha_shape, const T* alpha_data, in BroadcastPrelu4DSlow() 31 const RuntimeShape& output_shape, T* output_data) { in BroadcastPrelu4DSlow() 64 const int32_t quantized_min = std::numeric_limits<T>::min(); in BroadcastPrelu4DSlow() 65 const int32_t quantized_max = std::numeric_limits<T>::max(); in BroadcastPrelu4DSlow() 68 output_data[output_index] = static_cast<T>(clamped_output); in BroadcastPrelu4DSlow() 75 template <typename T> 77 const T* input_data, const RuntimeShape& alpha_shape, in Prelu() 78 const T* alpha_data, const RuntimeShape& output_shape, in Prelu() 79 T* output_data) { in Prelu() [all …]
|
D | reduce.h | 156 template <typename T> 158 const T init_value, T* data) { in InitTensorDataForReduce() 177 template <typename T> 178 inline bool ReduceGeneric(const T* input_data, const int* input_dims, in ReduceGeneric() 179 const int input_num_dims, T* output_data, in ReduceGeneric() 183 T init_value, in ReduceGeneric() 184 T reducer(const T current, const T in)) { in ReduceGeneric() 206 return Reduce<T, T>(input_data, input_dims, output_dims, input_num_dims, in ReduceGeneric() 214 template <typename T, typename U> 215 inline bool Mean(const T* input_data, const int* input_dims, in Mean() [all …]
|
D | hard_swish.h | 44 template <typename T> 45 inline void HardSwish(const RuntimeShape& input_shape, const T* input_data, in HardSwish() 46 const RuntimeShape& output_shape, T* output_data) { in HardSwish() 49 const T* in_end = input_data + matching_size; in HardSwish() 53 in * std::min(static_cast<T>(6), std::max(static_cast<T>(0), in + 3)) / in HardSwish() 58 template <typename T> 60 const RuntimeShape& input_shape, const T* input_data, in HardSwish() 61 const RuntimeShape& output_shape, T* output_data) { in HardSwish() 156 std::min<int16_t>(output_value, std::numeric_limits<T>::max()); in HardSwish() 158 std::max<int16_t>(output_value, std::numeric_limits<T>::min()); in HardSwish()
|
D | leaky_relu.h | 37 template <typename T> 40 const T* input_data, in QuantizeLeakyRelu() 42 T* output_data) { in QuantizeLeakyRelu() 44 static const int32_t quantized_min = std::numeric_limits<T>::min(); in QuantizeLeakyRelu() 45 static const int32_t quantized_max = std::numeric_limits<T>::max(); in QuantizeLeakyRelu() 60 const T clamped_output = in QuantizeLeakyRelu() 62 output_data[i] = static_cast<T>(clamped_output); in QuantizeLeakyRelu()
|
D | add.h | 27 template <typename T> 29 const RuntimeShape& input1_shape, const T* input1_data, in Add() 30 const RuntimeShape& input2_shape, const T* input2_data, in Add() 31 const RuntimeShape& output_shape, T* output_data) { in Add() 32 T activation_min, activation_max; in Add() 49 template <typename T> 51 const T* input1_data, const T* input2_data, in AddElementwise() 52 T* output_data) { in AddElementwise() 53 TFLITE_DCHECK_GT(params.input1_offset, -std::numeric_limits<T>::max()); in AddElementwise() 54 TFLITE_DCHECK_GT(params.input2_offset, -std::numeric_limits<T>::max()); in AddElementwise() [all …]
|
D | floor_div.h | 26 template <typename T> 27 T FloorDiv(T input1, T input2) { in FloorDiv()
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/micro/kernels/arc_mli/ |
D | mli_interface.h | 40 template <typename T> 41 T* Data(); 42 template <typename T> 43 T Scale(); 44 template <typename T> 45 T ZeroPoint(); 46 template <typename T> 47 T ScaleFracBits(); 61 template <typename T> 62 void SetData(T* data, uint32_t capacity) const;
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/micro/kernels/ |
D | floor_div.cc | 61 template <typename T> 66 const T* denominator_data = tflite::micro::GetTensorData<T>(input2); in EvalFloorDiv() 70 if (std::equal_to<T>()(denominator_data[i], 0)) { in EvalFloorDiv() 79 reference_ops::BroadcastBinaryFunction4DSlow<T, T, T>( in EvalFloorDiv() 81 tflite::micro::GetTensorData<T>(input1), in EvalFloorDiv() 84 tflite::micro::GetTensorData<T>(output), reference_ops::FloorDiv<T>); in EvalFloorDiv() 86 reference_ops::BinaryFunction<T, T, T>( in EvalFloorDiv() 88 tflite::micro::GetTensorData<T>(input1), in EvalFloorDiv() 91 tflite::micro::GetTensorData<T>(output), reference_ops::FloorDiv<T>); in EvalFloorDiv()
|
D | floor_mod.cc | 66 template <typename T> 71 const T* denominator_data = tflite::micro::GetTensorData<T>(input2); in EvalFloorMod() 74 reference_ops::BroadcastBinaryFunction4DSlow<T, T, T>( in EvalFloorMod() 76 tflite::micro::GetTensorData<T>(input1), in EvalFloorMod() 79 tflite::micro::GetTensorData<T>(output), reference_ops::FloorMod<T>); in EvalFloorMod() 81 reference_ops::BinaryFunction<T, T, T>( in EvalFloorMod() 83 tflite::micro::GetTensorData<T>(input1), in EvalFloorMod() 86 tflite::micro::GetTensorData<T>(output), reference_ops::FloorMod<T>); in EvalFloorMod()
|
D | micro_utils.h | 24 template <typename T> 25 bool operator()(const T& x, const T& y) const { in operator() 31 template <typename T> 32 bool operator()(const T& x, const T& y) const { in operator()
|
D | add_n_test.cc | 49 template <typename T> 50 void TestAddN(int* input_dims_data, const T* const* input_data, in TestAddN() 51 int input_data_count, int* expected_dims, const T* expected_data, in TestAddN() 52 T* output_data) { in TestAddN() 73 template <typename T, int kNumInputs, int kOutputSize> 77 T input_data[kNumInputs][kOutputSize]; // quantized input storage 78 T output_data[kOutputSize]; // quantized output storage 82 template <typename T> 86 (std::numeric_limits<T>::max() - std::numeric_limits<T>::min()); in GetTolerance() 90 template <typename T, int kNumInputs, int kOutputSize> [all …]
|
D | elu_test.cc | 28 template <typename T> 33 T* input_data; // quantized input storage 34 T* output_data; // quantized output storage 70 template <typename T> 71 void TestElu(int* input_dims_data, const T* input_data, int* expected_dims, in TestElu() 72 const T* expected_data, T* output_data) { in TestElu() 90 template <typename T> 91 void TestEluQuantized(const TestEluParams<T>& params, int* input_dims_data, in TestEluQuantized() 98 const float scale = ScaleFromMinMax<T>(params.data_min, params.data_max); in TestEluQuantized() 100 ZeroPointFromMinMax<T>(params.data_min, params.data_max); in TestEluQuantized()
|
D | hard_swish_test.cc | 57 template <typename T> 58 void TestHardSwishQuantized(int size, const T* output_data, in TestHardSwishQuantized() 59 T* input_data_quantized, float* dequantized_output, in TestHardSwishQuantized() 66 const float input_scale = ScaleFromMinMax<T>(input_min, input_max); in TestHardSwishQuantized() 67 const int input_zero_point = ZeroPointFromMinMax<T>(input_min, input_max); in TestHardSwishQuantized() 68 const float output_scale = ScaleFromMinMax<T>(output_min, output_max); in TestHardSwishQuantized() 69 const int output_zero_point = ZeroPointFromMinMax<T>(output_min, output_max); in TestHardSwishQuantized() 115 Dequantize<T>(output_data, output_elements_count, output_scale, in TestHardSwishQuantized() 124 template <typename T> 125 void TestHardSwishQuantizedBias(const int size, const T* output_data, in TestHardSwishQuantizedBias() [all …]
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/kernels/internal/ |
D | portable_tensor.h | 32 template <typename T> 46 all_data_.push_back(GetTensorData<T>(t)); in VectorOfTensors() 61 T* const* data() const { return all_data_.data(); } in data() 70 std::vector<T*> all_data_; 99 template <typename T> 103 input_data_ = GetTensorData<T>(input); in SequentialTensorWriter() 104 output_ptr_ = GetTensorData<T>(output); in SequentialTensorWriter() 106 SequentialTensorWriter(const T* input_data, T* output_data) in SequentialTensorWriter() 111 memcpy(output_ptr_, &input_data_[position], sizeof(T) * len); in WriteN() 116 const T* input_data_; [all …]
|
D | tensor_ctypes.h | 23 template <typename T> 24 inline T* GetTensorData(TfLiteTensor* tensor) { in GetTensorData() 25 return tensor != nullptr ? reinterpret_cast<T*>(tensor->data.raw) : nullptr; in GetTensorData() 28 template <typename T> 29 inline const T* GetTensorData(const TfLiteTensor* tensor) { in GetTensorData() 30 return tensor != nullptr ? reinterpret_cast<const T*>(tensor->data.raw) in GetTensorData()
|
D | max.h | 27 template <class T> 28 inline T TfLiteMax(const T& x, const T& y) {
|
/tflite-micro-3.4.0-2.7.6/tensorflow/lite/kernels/internal/reference/integer_ops/ |
D | mul.h | 25 template <typename T> 27 const T* input1_data, const T* input2_data, in MulElementwise() 28 T* output_data) { in MulElementwise() 40 output_data[i] = static_cast<T>(clamped_output); in MulElementwise() 44 template <typename T> 46 const RuntimeShape& input1_shape, const T* input1_data, in Mul() 47 const RuntimeShape& input2_shape, const T* input2_data, in Mul() 48 const RuntimeShape& output_shape, T* output_data) { in Mul() 88 template <typename T> 91 const T* input1_data, const RuntimeShape& input2_shape, in BroadcastMul4DSlow() [all …]
|