Copied tricorn to tricorn_simd .h and .c files to be later modified into SIMD optimization. Changed converge definition to static in order to not have conflicts with other versions of the function as it is an internal helper function

This commit is contained in:
go38coz
2026-06-26 19:32:33 +02:00
parent 9e0ed163f8
commit ee2b6b9506
3 changed files with 58 additions and 2 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "tricorn.h"
static const float convergenceLimit = 2.0f; // Mandelbrot set limit
unsigned converge(float complex position,unsigned n);
static unsigned converge(float complex position,unsigned n);
void tricorn(float complex start, size_t width, ssize_t height, float res, unsigned n, _Bool color, unsigned char* img){
@@ -34,7 +34,7 @@ void tricorn(float complex start, size_t width, ssize_t height, float res, unsig
}
// Iterative application of the equation given by the assignment
unsigned converge(float complex position,unsigned n){
static unsigned converge(float complex position,unsigned n){
complex float result = 0;
for(unsigned i = 0; i < n; i++){