Refactored file and fuction names
Now: tricorn - Optimized SIMD main implementation tricorn_V1 - Optimized SISD comparison implementation tricorn_V0 - Unoptimized SIMD implementation tricorn_V5 - highly optimized SIMD + threading implementation
This commit is contained in:
+9
-26
@@ -14,8 +14,7 @@
|
||||
#include "tricorn_V1.h"
|
||||
#include "tricorn_V2.h"
|
||||
#include "tricorn_V3.h"
|
||||
#include "tricorn_V4.h"
|
||||
#include "tricorn_V5.h"
|
||||
|
||||
|
||||
|
||||
void save_bmp(const char *filename, unsigned char *img, size_t width, ssize_t height,_Bool color);
|
||||
@@ -28,29 +27,21 @@ void benchmarking(size_t benchmarking_amount, int version_to_use, float complex
|
||||
switch (version_to_use)
|
||||
{
|
||||
case 0: // Uses highly optimized SIMD and threaded version / main implementation
|
||||
printf("Benchmarking V0 - highly optimized SIMD + Threading implementation\n");
|
||||
printf("Benchmarking V0 - highly optimized SIMD\n");
|
||||
tricorn_implementation = tricorn;
|
||||
break;
|
||||
case 1: // Uses unoptimised scalar comparison implementation
|
||||
printf("Benchmarking V1 - unoptimized comparison implementation\n");
|
||||
printf("Benchmarking V1 - scalar comparison implementation\n");
|
||||
tricorn_implementation = tricorn_V1;
|
||||
break;
|
||||
case 2: // Uses optimized SISD implementation
|
||||
printf("Benchmarking V2 - optimized SISD implementation\n");
|
||||
printf("Benchmarking V2 - unoptimized SIMD implementation\n");
|
||||
tricorn_implementation = tricorn_V2;
|
||||
break;
|
||||
case 3: // Uses unoptimized SIMD implementation
|
||||
printf("Benchmarking V3 - unoptimized SIMD implementation\n");
|
||||
printf("Benchmarking V3 - highly optimized SIMD + Threading implementation\n");
|
||||
tricorn_implementation = tricorn_V3;
|
||||
break;
|
||||
case 4: // Uses highly optimized SIMD
|
||||
printf("Benchmarking V4 - optimized SIMD implementation\n");
|
||||
tricorn_implementation = tricorn_V4;
|
||||
break;
|
||||
case 5: // Experimental cleanups and inlines / for testing
|
||||
printf("Benchmarking V5 - experimental implementation\n");
|
||||
tricorn_implementation = tricorn_V5;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"Invalid version to use: V%d. Available versions are : V0,V1,V2,V3,V4,V5\n",version_to_use);
|
||||
return;
|
||||
@@ -433,29 +424,21 @@ int main(int argc, char** argv)
|
||||
switch (version_to_use)
|
||||
{
|
||||
case 0:
|
||||
// Uses highly optimized SIMD and threaded version / main implementation
|
||||
// Uses highly optimized SIMD - main implementation
|
||||
tricorn(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
case 1:
|
||||
// Uses unoptimised comparison implementation
|
||||
// Uses scalar comparison implementation
|
||||
tricorn_V1(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
case 2:
|
||||
// Uses optimized SISD version
|
||||
// Uses unoptimized SIMD implementation
|
||||
tricorn_V2(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
case 3:
|
||||
// Uses unoptimized SIMD version
|
||||
// Uses highly optimized SIMD + Threading implementation
|
||||
tricorn_V3(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
case 4:
|
||||
// Uses highly optimized SIMD
|
||||
tricorn_V4(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
case 5:
|
||||
// Experimental cleanups and inlines / for testing
|
||||
tricorn_V5(complexA,width,height,resolution,n,colored,tempArr);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user