Added implementation switching based on -V parameter

This commit is contained in:
go38coz
2026-06-28 20:49:00 +02:00
parent 9e96876852
commit a3d829533c
2 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -199,13 +199,19 @@ int main(int argc, char** argv)
bytesPerColour = 1;
}
unsigned char *tempArr = malloc(width*abs(height)*bytesPerColour);// allocate image array on the heap to support large images as the stack is usually only 8 MB big
ssize_t absolute_height = height >= 0 ? height : height * - 1;
unsigned char *tempArr = malloc(width*absolute_height*bytesPerColour);// allocate image array on the heap to support large images as the stack is usually only 8 MB big
if(tempArr == NULL) {
exit(EXIT_FAILURE);
}
printf("yashar\n");
tricorn_simd(complexA,width,height,resolution,n,colored,tempArr);
if(version_to_use == 0) {
tricorn_simd(complexA,width,height,resolution,n,colored,tempArr);
}
else {
tricorn(complexA,width,height,resolution,n,colored,tempArr);
}
printf("yashar\n");
save_bmp(output_data,tempArr,width,height,colored);