From 72f035b4dd658a037a5d11eba0c43e343c7781aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 20 Jun 2025 21:42:37 +0200 Subject: [PATCH 1/2] Revert "Fix rawdenoise for gcc 15" This reverts commit 9d7ab0e82f4719132908720421a8d3c05fb3df37. --- src/iop/rawdenoise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, From ff945752d4b27935de9e633d5990e79df322ca40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Fri, 20 Jun 2025 21:46:21 +0200 Subject: [PATCH 2/2] Disable sqrtf vectorization for GCC 15 --- src/develop/openmp_maths.h | 2 ++ 1 file changed, 2 insertions(+) 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);