diff --git a/src/develop/openmp_maths.h b/src/develop/openmp_maths.h index a3d466b841f4..8966e4f63b83 100644 --- a/src/develop/openmp_maths.h +++ b/src/develop/openmp_maths.h @@ -41,8 +41,10 @@ extern float fabsf(const float x); DT_OMP_DECLARE_SIMD() extern float powf(const float x, const float y); +#ifndef __GNUC__ // GCC 15 compiles but fails at runtime due to missing library function DT_OMP_DECLARE_SIMD() extern float sqrtf(const float x); +#endif DT_OMP_DECLARE_SIMD() extern float cbrtf(const float x); diff --git a/src/iop/rawdenoise.c b/src/iop/rawdenoise.c index 841f068dbde6..76802d8a342c 100644 --- a/src/iop/rawdenoise.c +++ b/src/iop/rawdenoise.c @@ -226,7 +226,7 @@ static void wavelet_denoise(const float *const restrict in, float *const restric const float *const restrict inp = in + (size_t)row * roi->width + offset; const int senselwidth = (roi->width-offset+1)/2; for(int col = 0; col < senselwidth; col++) - fimgp[col] = sqrtf(fmaxf(0.0f, inp[2*col])); + fimgp[col] = sqrtf(MAX(0.0f, inp[2*col])); } // perform the wavelet decomposition and denoising @@ -298,7 +298,7 @@ static void wavelet_denoise(const float *const restrict in, float *const restric static inline float vstransform(const float value) { - return sqrtf(fmaxf(0.0f, value)); + return sqrtf(MAX(0.0f, value)); } static void wavelet_denoise_xtrans(const float *const restrict in, float *const restrict out,