summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorПавел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 <p.iliutchenk@samsung.com>2019-04-04 04:33:11 +0300
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2019-04-04 10:33:11 +0900
commit123c8fc2a05188098826a2aff52291a0de2dc6d3 (patch)
tree645aecd63796beba3b3653faff4c2358a9cd77c0 /libs
parent7f2473b22b9fccb519bb20f65d8380f676cb44af (diff)
downloadnnfw-123c8fc2a05188098826a2aff52291a0de2dc6d3.tar.gz
nnfw-123c8fc2a05188098826a2aff52291a0de2dc6d3.tar.bz2
nnfw-123c8fc2a05188098826a2aff52291a0de2dc6d3.zip
Fix some errors from Clang compiler (#4915)
* Fix some errors from Clang compiler * Fix abs on unsigned char, fix hidden overloaded virtual function, rename predeclared class on struct, remove unused private variable, remove std::move when he called in return statement Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com> * Fix unused variables, struct/class mismatching Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com> * Fix extern C++, unused variables, explicit overriding, remove std::move in return statement Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com> * Fix file for format-check and extern C Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com> * Fix library information removing from neurun Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/tflite/include/tflite/Diff.h3
-rw-r--r--libs/tflite/include/tflite/FeatureView.h2
-rw-r--r--libs/tflite/include/tflite/ext/nnapi_delegate.h6
-rw-r--r--libs/tflite/src/ext/kernels/Abs.cpp2
-rw-r--r--libs/tflite/src/interp/FlatBufferBuilder.cpp2
-rw-r--r--libs/tflite/src/interp/FunctionBuilder.cpp2
6 files changed, 10 insertions, 7 deletions
diff --git a/libs/tflite/include/tflite/Diff.h b/libs/tflite/include/tflite/Diff.h
index 15c672831..908bc3815 100644
--- a/libs/tflite/include/tflite/Diff.h
+++ b/libs/tflite/include/tflite/Diff.h
@@ -107,7 +107,7 @@ public:
const TfLiteQuantizationParams quantization = make_default_quantization())
: _rand{seed}, _dist{mean, stddev}, _quantization{quantization}
{
- // DO NOTHING
+ (void)_quantization;
}
public:
@@ -133,6 +133,7 @@ public:
private:
std::minstd_rand _rand;
std::normal_distribution<float> _dist;
+ // unused
const TfLiteQuantizationParams _quantization;
};
diff --git a/libs/tflite/include/tflite/FeatureView.h b/libs/tflite/include/tflite/FeatureView.h
index 06cbf4b14..7bee854a7 100644
--- a/libs/tflite/include/tflite/FeatureView.h
+++ b/libs/tflite/include/tflite/FeatureView.h
@@ -75,6 +75,8 @@ public:
*/
float &at(uint32_t ch, uint32_t row, uint32_t col);
+ float at(uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) const = 0;
+
private:
/**
* @brief Get offset of element from channel, row and column index
diff --git a/libs/tflite/include/tflite/ext/nnapi_delegate.h b/libs/tflite/include/tflite/ext/nnapi_delegate.h
index d10ad84cc..7903d0cae 100644
--- a/libs/tflite/include/tflite/ext/nnapi_delegate.h
+++ b/libs/tflite/include/tflite/ext/nnapi_delegate.h
@@ -33,9 +33,9 @@ limitations under the License.
#include "tensorflow/contrib/lite/interpreter.h"
#include "NeuralNetworksShim.h"
-class ANeuralNetworksModel;
-class ANeuralNetworksMemory;
-class ANeuralNetworksCompilation;
+struct ANeuralNetworksModel;
+struct ANeuralNetworksMemory;
+struct ANeuralNetworksCompilation;
namespace nnfw {
namespace tflite {
diff --git a/libs/tflite/src/ext/kernels/Abs.cpp b/libs/tflite/src/ext/kernels/Abs.cpp
index 8046f5bc0..5fe9b26e9 100644
--- a/libs/tflite/src/ext/kernels/Abs.cpp
+++ b/libs/tflite/src/ext/kernels/Abs.cpp
@@ -86,7 +86,7 @@ TfLiteStatus EvalAbs(TfLiteContext *context, TfLiteNode *node)
auto *in_end = in + elements;
auto *out = output->data.uint8;
for (; in < in_end; in++, out++)
- *out = std::abs(*in);
+ *out = *in;
return kTfLiteOk;
}
default:
diff --git a/libs/tflite/src/interp/FlatBufferBuilder.cpp b/libs/tflite/src/interp/FlatBufferBuilder.cpp
index 4b9cde719..f54e67202 100644
--- a/libs/tflite/src/interp/FlatBufferBuilder.cpp
+++ b/libs/tflite/src/interp/FlatBufferBuilder.cpp
@@ -33,7 +33,7 @@ std::unique_ptr<::tflite::Interpreter> FlatBufferBuilder::build(void) const
builder(&interpreter);
- return std::move(interpreter);
+ return interpreter;
}
} // namespace tflite
diff --git a/libs/tflite/src/interp/FunctionBuilder.cpp b/libs/tflite/src/interp/FunctionBuilder.cpp
index eab940c18..599a4f393 100644
--- a/libs/tflite/src/interp/FunctionBuilder.cpp
+++ b/libs/tflite/src/interp/FunctionBuilder.cpp
@@ -27,7 +27,7 @@ std::unique_ptr<::tflite::Interpreter> FunctionBuilder::build(void) const
_fn(*res);
- return std::move(res);
+ return res;
}
} // namespace tflite