From 73744fe131b55b47b7485fa555210d45e6e394b9 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 18 Aug 2015 13:50:06 +0200 Subject: [PATCH] Fixed formatting in rtengine/helpersse2.h and rtengine/opthelper.h --- rtengine/helpersse2.h | 24 +++++----- rtengine/opthelper.h | 100 +++++++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/rtengine/helpersse2.h b/rtengine/helpersse2.h index 5969784a4..c7dce8806 100644 --- a/rtengine/helpersse2.h +++ b/rtengine/helpersse2.h @@ -22,19 +22,19 @@ typedef __m128i vint2; // #ifdef __GNUC__ -#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 -#define LVF(x) _mm_load_ps(&x) -#define LVFU(x) _mm_loadu_ps(&x) -#define STVF(x,y) _mm_store_ps(&x,y) -#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 -#define LVF(x) _mm_loadu_ps(&x) -#define LVFU(x) _mm_loadu_ps(&x) -#define STVF(x,y) _mm_storeu_ps(&x,y) -#endif + #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 + #define LVF(x) _mm_load_ps(&x) + #define LVFU(x) _mm_loadu_ps(&x) + #define STVF(x,y) _mm_store_ps(&x,y) + #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 + #define LVF(x) _mm_loadu_ps(&x) + #define LVFU(x) _mm_loadu_ps(&x) + #define STVF(x,y) _mm_storeu_ps(&x,y) + #endif #else -#define LVF(x) _mm_load_ps(&x) -#define LVFU(x) _mm_loadu_ps(&x) -#define STVF(x,y) _mm_store_ps(&x,y) + #define LVF(x) _mm_load_ps(&x) + #define LVFU(x) _mm_loadu_ps(&x) + #define STVF(x,y) _mm_store_ps(&x,y) #endif // Load 8 floats from a and combine a[0],a[2],a[4] and a[6] into a vector of 4 floats diff --git a/rtengine/opthelper.h b/rtengine/opthelper.h index 1da03190b..fc49ad12e 100644 --- a/rtengine/opthelper.h +++ b/rtengine/opthelper.h @@ -20,56 +20,56 @@ //////////////////////////////////////////////////////////////// #ifndef OPTHELPER_H -#define OPTHELPER_H + #define OPTHELPER_H -#ifdef __SSE2__ -#include "sleefsseavx.c" -#ifdef __GNUC__ -#if defined(WIN32) && !defined( __x86_64__ ) -// needed for actual versions of GCC with 32-Bit Windows -#define SSEFUNCTION __attribute__((force_align_arg_pointer)) -#else -#define SSEFUNCTION -#endif -#else -#define SSEFUNCTION -#endif -#else -#ifdef __SSE__ -#ifdef __GNUC__ -#if defined(WIN32) && !defined( __x86_64__ ) -// needed for actual versions of GCC with 32-Bit Windows -#define SSEFUNCTION __attribute__((force_align_arg_pointer)) -#else -#define SSEFUNCTION -#endif -#else -#define SSEFUNCTION -#endif -#else -#define SSEFUNCTION -#endif -#endif + #ifdef __SSE2__ + #include "sleefsseavx.c" + #ifdef __GNUC__ + #if defined(WIN32) && !defined( __x86_64__ ) + // needed for actual versions of GCC with 32-Bit Windows + #define SSEFUNCTION __attribute__((force_align_arg_pointer)) + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #else + #ifdef __SSE__ + #ifdef __GNUC__ + #if defined(WIN32) && !defined( __x86_64__ ) + // needed for actual versions of GCC with 32-Bit Windows + #define SSEFUNCTION __attribute__((force_align_arg_pointer)) + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #else + #define SSEFUNCTION + #endif + #endif -#ifdef __GNUC__ -#define RESTRICT __restrict__ -#define LIKELY(x) __builtin_expect (!!(x), 1) -#define UNLIKELY(x) __builtin_expect (!!(x), 0) -#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 -#define ALIGNED64 __attribute__ ((aligned (64))) -#define ALIGNED16 __attribute__ ((aligned (16))) -#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 -#define ALIGNED64 -#define ALIGNED16 -#endif -#else -#define RESTRICT -#define LIKELY(x) (x) -#define UNLIKELY(x) (x) -#define ALIGNED64 -#define ALIGNED16 -#endif -#ifndef __clang__ -#define _RT_NESTED_OPENMP _OPENMP -#endif + #ifdef __GNUC__ + #define RESTRICT __restrict__ + #define LIKELY(x) __builtin_expect (!!(x), 1) + #define UNLIKELY(x) __builtin_expect (!!(x), 0) + #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 + #define ALIGNED64 __attribute__ ((aligned (64))) + #define ALIGNED16 __attribute__ ((aligned (16))) + #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 + #define ALIGNED64 + #define ALIGNED16 + #endif + #else + #define RESTRICT + #define LIKELY(x) (x) + #define UNLIKELY(x) (x) + #define ALIGNED64 + #define ALIGNED16 + #endif + #ifndef __clang__ + #define _RT_NESTED_OPENMP _OPENMP + #endif #endif