From 92692e10db991cfabb07c62843525bdc9f56a358 Mon Sep 17 00:00:00 2001 From: Andriy Gerasika Date: Mon, 25 Dec 2017 02:51:19 +0200 Subject: [PATCH 1/2] >2x performance increase if DLIB_DO_NOT_USE_SIMD is defined (#1027) --- dlib/simd/simd8f.h | 8 ++++---- dlib/simd/simd8i.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlib/simd/simd8f.h b/dlib/simd/simd8f.h index adbc28d0e..628ba74ee 100644 --- a/dlib/simd/simd8f.h +++ b/dlib/simd/simd8f.h @@ -125,8 +125,8 @@ namespace dlib return _high[idx-4]; } - inline simd4f low() const { return _low; } - inline simd4f high() const { return _high; } + inline const simd4f& low() const { return _low; } + inline const simd4f& high() const { return _high; } private: simd4f _low, _high; @@ -141,8 +141,8 @@ namespace dlib inline simd8f_bool(const simd4f_bool& low_, const simd4f_bool& high_): _low(low_),_high(high_){} - inline simd4f_bool low() const { return _low; } - inline simd4f_bool high() const { return _high; } + inline const simd4f_bool& low() const { return _low; } + inline const simd4f_bool& high() const { return _high; } private: simd4f_bool _low,_high; }; diff --git a/dlib/simd/simd8i.h b/dlib/simd/simd8i.h index 8fefa2644..18c06ec7e 100644 --- a/dlib/simd/simd8i.h +++ b/dlib/simd/simd8i.h @@ -91,8 +91,8 @@ namespace dlib return _high[idx-4]; } - inline simd4i low() const { return _low; } - inline simd4i high() const { return _high; } + inline const simd4i& low() const { return _low; } + inline const simd4i& high() const { return _high; } private: simd4i _low, _high; From 9185e0a7256a0cfb2af2150f25fd4f87b7018976 Mon Sep 17 00:00:00 2001 From: Duc Thien Bui Date: Mon, 25 Dec 2017 19:56:42 +0700 Subject: [PATCH 2/2] fix typo in train find cars example (#1028) --- examples/dnn_mmod_train_find_cars_ex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dnn_mmod_train_find_cars_ex.cpp b/examples/dnn_mmod_train_find_cars_ex.cpp index 16419477a..b97e25a85 100644 --- a/examples/dnn_mmod_train_find_cars_ex.cpp +++ b/examples/dnn_mmod_train_find_cars_ex.cpp @@ -124,7 +124,7 @@ int main(int argc, char** argv) try // // To explain this non-max suppression idea further it's important to understand how // the detector works. Essentially, sliding window detectors scan all image locations - // and ask "is there a care here?". If there really is a car in a specific location in + // and ask "is there a car here?". If there really is a car in a specific location in // an image then usually many slightly different sliding window locations will produce // high detection scores, indicating that there is a car at those locations. If we // just stopped there then each car would produce multiple detections. But that isn't