Added implementation switching based on -V parameter
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user