commit 9d46316e1c2b745ed0cb8eeaae8c19b25620f69f
parent 624e2ab468eeeddc35265dd8944a02eae4d0e5f7
Author: vaplv <vaplv@free.fr>
Date: Tue, 16 Dec 2014 14:20:34 +0100
Add local unroll loop directives to the floatX[Y] functions
Diffstat:
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/floatX.h b/src/floatX.h
@@ -28,6 +28,11 @@
#include "rsys.h"
#include <math.h>
+#ifdef COMPILER_GCC
+ #pragma GCC push_options
+ #pragma GCC optimize("unroll-loops")
+#endif
+
STATIC_ASSERT(FLOATX_DIMENSION__ > 1, Unexpected_value);
#define FLOATX_FUNC__(Func) \
@@ -324,3 +329,7 @@ FLOATX_FUNC__(min)(float* dst, const float* a, const float* b)
#undef FLOATX_DIMENSION__
#undef FLOATX_FUNC__
+#ifdef COMPILER_GCC
+ #pragma GCC pop_options
+#endif
+
diff --git a/src/floatXY.h b/src/floatXY.h
@@ -28,6 +28,11 @@
#include "math.h"
#include "rsys.h"
+#ifdef COMPILER_GCC
+ #pragma GCC push_options
+ #pragma GCC optimize("unroll-loops")
+#endif
+
STATIC_ASSERT
(FLOATX_DIMENSION__ > 1 && FLOATY_DIMENSION__ > 1, Unexpected_value);
@@ -315,3 +320,7 @@ FLOATXY_FUNC__(CONCAT(CONCAT(mulf, FLOATX_DIMENSION__), FLOATY_DIMENSION__))
#undef FLOATY_DIMENSION__
#undef SIZEOF_FLOATXY__
+#ifdef COMPILER_GCC
+ #pragma GCC pop_options
+#endif
+