AUTH's THMMY "Parallel and distributed systems" course assignments.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

76 lignes
2.2 KiB

  1. % Plot measurements
  2. threads = [1 2 4 6 8 10 12];
  3. ser_sift_threads = [ 4418 4418 4418 4418 4418 4418 4418 ];
  4. ser_mnist_ser_threads = [ 7924 7924 7924 7924 7924 7924 7924 ];
  5. omp_sift_th = [
  6. 4374 2194 1148 751 724 637 596
  7. ];
  8. omp_mnist_th = [
  9. 7918 3941 2031 1395 1415 1330 1292
  10. ];
  11. cilk_sift_th = [
  12. 4183 2076 1114 886 706 742 636
  13. ];
  14. cilk_mnist_th = [
  15. 7745 3883 2020 1454 1436 1342 1292
  16. ];
  17. pth_sift_th = [
  18. 4254 2155 1133 877 724 640 682
  19. ];
  20. pth_mnist_th = [
  21. 7889 3963 2058 1445 1496 1379 1352
  22. ];
  23. % 1ο Διάγραμμα: OMP
  24. figure;
  25. set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
  26. plot(threads, ser_sift_threads, '-o', 'DisplayName', 'Serial SIFT');
  27. hold on;
  28. plot(threads, ser_mnist_ser_threads, '-s', 'DisplayName', 'Serial MNIST');
  29. plot(threads, omp_sift_th, '-^', 'DisplayName', 'OMP SIFT');
  30. plot(threads, omp_mnist_th, '-d', 'DisplayName', 'OMP MNIST');
  31. hold off;
  32. title('OMP');
  33. xlabel('Threads');
  34. ylabel('Execution Time [msec]');
  35. legend('Location', 'northeast');
  36. grid on;
  37. print(gcf, 'OMP_over_threads.png', '-dpng', '-r300');
  38. % 2ο Διάγραμμα: CILK
  39. figure;
  40. set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
  41. plot(threads, ser_sift_threads, '-o', 'DisplayName', 'Serial SIFT');
  42. hold on;
  43. plot(threads, ser_mnist_ser_threads, '-s', 'DisplayName', 'Serial MNIST');
  44. plot(threads, cilk_sift_th, '-^', 'DisplayName', 'CILK SIFT');
  45. plot(threads, cilk_mnist_th, '-d', 'DisplayName', 'CILK MNIST');
  46. hold off;
  47. title('CILK');
  48. xlabel('Threads');
  49. ylabel('Execution Time [msec]');
  50. legend('Location', 'northeast');
  51. grid on;
  52. print(gcf, 'CILK_over_threads.png', '-dpng', '-r300');
  53. % 3ο Διάγραμμα: Pthreads
  54. figure;
  55. set(gcf, 'Position', [100, 100, 1280, 720]); % Set the figure size to HD
  56. plot(threads, ser_sift_threads, '-o', 'DisplayName', 'Serial SIFT');
  57. hold on;
  58. plot(threads, ser_mnist_ser_threads, '-s', 'DisplayName', 'Serial MNIST');
  59. plot(threads, pth_sift_th, '-^', 'DisplayName', 'Pthreads SIFT');
  60. plot(threads, pth_mnist_th, '-d', 'DisplayName', 'Pthreads MNIST');
  61. hold off;
  62. title('Pthreads');
  63. xlabel('Threads');
  64. ylabel('Execution Time [msec]');
  65. legend('Location', 'northeast');
  66. grid on;
  67. print(gcf, 'Pthreads_over_threads.png', '-dpng', '-r300');