From 0bf22b6dad4dbbf5bb03d559b8ce053568a13306 Mon Sep 17 00:00:00 2001 From: sunwen Date: Fri, 26 May 2023 13:59:10 +0800 Subject: [PATCH] Speed up of removeDataFromArrays. --- .../removeDataFromArrays.cpp | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/common/dataBlockCreation/removeDataFromArrays.cpp b/src/common/dataBlockCreation/removeDataFromArrays.cpp index 9cc3d95..81a5c20 100644 --- a/src/common/dataBlockCreation/removeDataFromArrays.cpp +++ b/src/common/dataBlockCreation/removeDataFromArrays.cpp @@ -4,6 +4,7 @@ #include "Function2D.h" #include "Matrix.h" #include +#include #include using namespace Recon; @@ -11,36 +12,41 @@ using namespace Aurora; Aurora::Matrix Recon::removeDataFromArrays(const Aurora::Matrix& aOutPutMatrix, const Aurora::Matrix& aRemoveList) { - Matrix result = aOutPutMatrix; - int minusNum = 0; - for(int i=0; i> copyList; + size_t length = 0; + int end = 0; + for(size_t i=0; i> copyList; - // size_t length = 0; - // for(size_t i=0; i