79 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Matlab
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Matlab
		
	
	
	
	
	
| % Plot measurements
 | ||
| 
 | ||
| accuracy = [100 80 60 40 20 10];
 | ||
| ser_sift_acc = [ 4395 4365 4384 4315 4295 4246 ];
 | ||
| ser_mnist_ser_acc = [ 7936 7924 7886 7903 7844 7801 ];
 | ||
| 
 | ||
| omp_sift_acc = [
 | ||
|     1162 1157 1148 1138 1134 1107
 | ||
| ];
 | ||
| omp_mnist_acc = [
 | ||
|     2044 2036 2028 2007 1993 1973
 | ||
| ];
 | ||
|     
 | ||
| cilk_sift_acc = [
 | ||
|     1148 1133 1127 1096 1079 1057
 | ||
| ];
 | ||
| cilk_mnist_acc = [
 | ||
|     2008 2024 1974 1965 1959 1947
 | ||
| ];
 | ||
| 
 | ||
| pth_sift_acc = [
 | ||
|     1157 1159 1121 1100 1084 1075
 | ||
| ];
 | ||
| pth_mnist_acc = [
 | ||
|     2050 2086 2040 2020 2004 1979
 | ||
| ];
 | ||
| 
 | ||
| % 1ο Διάγραμμα: OMP
 | ||
| figure;
 | ||
| set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
 | ||
| plot(accuracy, ser_sift_acc, '-o', 'DisplayName', 'Serial SIFT');
 | ||
| hold on;
 | ||
| plot(accuracy, ser_mnist_ser_acc, '-s', 'DisplayName', 'Serial MNIST');
 | ||
| plot(accuracy, omp_sift_acc, '-^', 'DisplayName', 'OMP SIFT');
 | ||
| plot(accuracy, omp_mnist_acc, '-d', 'DisplayName', 'OMP MNIST');
 | ||
| hold off;
 | ||
| title('OMP');
 | ||
| xlabel('Accuracy (%)');
 | ||
| ylabel('Execution Time [msec]');
 | ||
| set(gca, 'XDir', 'reverse'); % reverse x
 | ||
| legend('Location', 'northwest');
 | ||
| grid on;
 | ||
| print(gcf, 'OMP_over_accuracy.png', '-dpng', '-r300');
 | ||
| 
 | ||
| % 2ο Διάγραμμα: CILK
 | ||
| figure;
 | ||
| set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
 | ||
| plot(accuracy, ser_sift_acc, '-o', 'DisplayName', 'Serial SIFT');
 | ||
| hold on;
 | ||
| plot(accuracy, ser_mnist_ser_acc, '-s', 'DisplayName', 'Serial MNIST');
 | ||
| plot(accuracy, cilk_sift_acc, '-^', 'DisplayName', 'CILK SIFT');
 | ||
| plot(accuracy, cilk_mnist_acc, '-d', 'DisplayName', 'CILK MNIST');
 | ||
| hold off;
 | ||
| title('CILK');
 | ||
| xlabel('Accuracy (%)');
 | ||
| ylabel('Execution Time [msec]');
 | ||
| set(gca, 'XDir', 'reverse'); % reverse x
 | ||
| legend('Location', 'northwest');
 | ||
| grid on;
 | ||
| print(gcf, 'CILK_over_accuracy.png', '-dpng', '-r300');
 | ||
| 
 | ||
| % 3ο Διάγραμμα: Pthreads
 | ||
| figure;
 | ||
| set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
 | ||
| plot(accuracy, ser_sift_acc, '-o', 'DisplayName', 'Serial SIFT');
 | ||
| hold on;
 | ||
| plot(accuracy, ser_mnist_ser_acc, '-s', 'DisplayName', 'Serial MNIST');
 | ||
| plot(accuracy, pth_sift_acc, '-^', 'DisplayName', 'Pthreads SIFT');
 | ||
| plot(accuracy, pth_mnist_acc, '-d', 'DisplayName', 'Pthreads MNIST');
 | ||
| hold off;
 | ||
| title('Pthreads');
 | ||
| xlabel('Accuracy (%)');
 | ||
| ylabel('Execution Time [msec]');
 | ||
| set(gca, 'XDir', 'reverse'); % reverse x
 | ||
| legend('Location', 'northwest');
 | ||
| grid on;
 | ||
| print(gcf, 'Pthreads_over_accuracy.png', '-dpng', '-r300');
 | ||
| 
 |