From f1a9f8462606d994ae42cffbd71cac0756786194 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 29 Oct 2019 17:42:53 +0900 Subject: [PATCH] [nnfw-ncnn] Fix bug in Mat class (#8564) Rename mat class code file mat.cpp to mat.cc - not compiled Fix build error by call function in cpu.h Signed-off-by: Hyeongseok Oh --- compute/ncnn/CMakeLists.txt | 4 ++-- compute/ncnn/src/{mat.cpp => mat.cc} | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename compute/ncnn/src/{mat.cpp => mat.cc} (99%) diff --git a/compute/ncnn/CMakeLists.txt b/compute/ncnn/CMakeLists.txt index d91c171..eb7cfe4 100644 --- a/compute/ncnn/CMakeLists.txt +++ b/compute/ncnn/CMakeLists.txt @@ -11,8 +11,8 @@ if(NOT OpenMP_FOUND) return() endif(NOT OpenMP_FOUND) -file(GLOB_RECURSE SOURCES "*.cc") -file(GLOB_RECURSE TESTS "*_test.cc") +file(GLOB_RECURSE SOURCES src/*.cc) +file(GLOB_RECURSE TESTS src/*_test.cc) list(REMOVE_ITEM SOURCES ${TESTS}) add_library(nnfw_lib_srcn STATIC ${SOURCES}) diff --git a/compute/ncnn/src/mat.cpp b/compute/ncnn/src/mat.cc similarity index 99% rename from compute/ncnn/src/mat.cpp rename to compute/ncnn/src/mat.cc index 071334c..568378e 100644 --- a/compute/ncnn/src/mat.cpp +++ b/compute/ncnn/src/mat.cc @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "mat.h" +#include "ncnn/mat.h" #if __ARM_NEON #include @@ -282,7 +282,9 @@ Mat Mat::from_float16(const unsigned short *data, int size) float *ptr = m; //.data; #if __ARM_NEON && (__ARM_FP & 2) - int nn = cpu_support_arm_vfpv4() ? size >> 2 : 0; + // Fix for nnfw: Alway support vfpv4 + // int nn = cpu_support_arm_vfpv4() ? size >> 2 : 0; + int nn = size >> 2; int remain = size - (nn << 2); #else int remain = size; -- 2.7.4