Oops memory leak - Now fixed :)
This commit is contained in:
@@ -31,7 +31,7 @@ void benchmarking(size_t benchmarking_amount, int version_to_use, float complex
|
|||||||
printf("Benchmarking V0 - highly optimized SIMD + Threading implementation\n");
|
printf("Benchmarking V0 - highly optimized SIMD + Threading implementation\n");
|
||||||
tricorn_implementation = tricorn;
|
tricorn_implementation = tricorn;
|
||||||
break;
|
break;
|
||||||
case 1: // Uses unoptimised comparison implementation
|
case 1: // Uses unoptimised scalar comparison implementation
|
||||||
printf("Benchmarking V1 - unoptimized comparison implementation\n");
|
printf("Benchmarking V1 - unoptimized comparison implementation\n");
|
||||||
tricorn_implementation = tricorn_V1;
|
tricorn_implementation = tricorn_V1;
|
||||||
break;
|
break;
|
||||||
@@ -169,7 +169,6 @@ int main(int argc, char** argv)
|
|||||||
// fourth is "val" -> what to return when "--help" is given, returns "h"
|
// fourth is "val" -> what to return when "--help" is given, returns "h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int version_to_use = 0; // actual initial value
|
int version_to_use = 0; // actual initial value
|
||||||
_Bool colored = 0; // actual initial value
|
_Bool colored = 0; // actual initial value
|
||||||
_Bool will_benchmark = false; // actual initial value
|
_Bool will_benchmark = false; // actual initial value
|
||||||
@@ -193,6 +192,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
case 'V': // done, function needed
|
case 'V': // done, function needed
|
||||||
version_to_use = strtol(optarg,NULL,10);
|
version_to_use = strtol(optarg,NULL,10);
|
||||||
|
|
||||||
printf("version is %d\n", version_to_use);
|
printf("version is %d\n", version_to_use);
|
||||||
// call different version functions
|
// call different version functions
|
||||||
|
|
||||||
@@ -338,6 +338,8 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
printf("\nDoing benchmarking. No images will be created\n");
|
printf("\nDoing benchmarking. No images will be created\n");
|
||||||
benchmarking(amount_function_called,version_to_use,complexA,width,height,resolution,n,colored,tempArr);
|
benchmarking(amount_function_called,version_to_use,complexA,width,height,resolution,n,colored,tempArr);
|
||||||
|
free(tempArr);
|
||||||
|
free(output_data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user