rawTherapee/rtengine/opthelper.h
Desmis d02ed52e00
Local adjustments - improve exposure - issue 6274 (#6277)
* Various change to improve LA exposure

* Removed pow_Fr - clean code

* Remove unused code
2021-06-08 07:38:47 +02:00

42 lines
1.4 KiB
C

////////////////////////////////////////////////////////////////
//
// opthelper.h includes some #defines which help to make optimizations easier and better readable
//
// copyright (c) 2013 Ingo Weyrich
//
// this is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////
#pragma once
#define pow_F(a,b) (xexpf((b)*xlogf(a)))
#ifdef __SSE2__
#include "sleefsseavx.h"
#endif
#ifdef __GNUC__
#define RESTRICT __restrict__
#define LIKELY(x) __builtin_expect (!!(x), 1)
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
#define ALIGNED64 __attribute__ ((aligned (64)))
#define ALIGNED16 __attribute__ ((aligned (16)))
#else
#define RESTRICT
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#define ALIGNED64
#define ALIGNED16
#endif