From 5c5b11bece4a3dccd4691e1400a6169c07fb37e5 Mon Sep 17 00:00:00 2001 From: Nikola Date: Fri, 3 Jul 2026 17:58:54 +0200 Subject: [PATCH] Further optimizations on SISD --- Implementierung/tricorn_V2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Implementierung/tricorn_V2.c b/Implementierung/tricorn_V2.c index 948a628..f13935e 100644 --- a/Implementierung/tricorn_V2.c +++ b/Implementierung/tricorn_V2.c @@ -24,6 +24,7 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un float c_start_imag = cimag(start); float c_imag = c_start_imag; + float vertical_step = imag_step * res; size_t position = 0; @@ -33,7 +34,6 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un // Calculate imaginary part on each row as it stays the same float c_real = c_start_real; - for(size_t x = 0; x < width; x++){ unsigned value = converge(c_real,c_imag,n); @@ -52,7 +52,7 @@ void tricorn_V2(float complex start, size_t width, ssize_t height, float res, un c_real += res; } - c_imag -= imag_step * res; + c_imag -= vertical_step; } }