AUTH's THMMY "Parallel and distributed systems" course assignments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SortTime.m 1.4 KiB

123456789101112131415161718192021222324252627
  1. % MATLAB script to plot Sort execution times
  2. % Define Q values
  3. Q = 20:30;
  4. % Define Sort execution times (converted to milliseconds)
  5. sort_times = [
  6. 3.134, 4.105, 6.074, 14, 29, 59, 120, 256, 554, 1164, 2453; % V0 - ampere
  7. 1.417, 2.193, 3.699, 8.329, 17, 37, 71, 153, 351, 742, 1556; % V1 - ampere
  8. 1.574, 2.411, 4.134, 8.94, 19, 40, 76, 163, 372, 788, 1650; % V2 - ampere
  9. 5.419, 10, 19, 40, 85, 181, 385, 826, 1762, 3765, 8034; % V0 - tesla
  10. 3.418, 6.995, 14, 30, 64, 139, 300, 648, 1394, 2992, 6411; % V1 - tesla
  11. 3.264, 6.728, 13, 29, 60, 129, 280, 606, 1308, 2815, 6048; % V2 - tesla
  12. 15, 30, 66, 142, 305, 654, 1408, 3009, 6445, 13750, NaN; % V0 - gtx1650
  13. 6.666, 14, 31, 67, 139, 311, 689, 1539, 3358, 7428, NaN; % V1 - gtx1650
  14. 7.294, 15, 33, 70, 148, 328, 726, 1609, 3527, 7749, NaN % V2 - gtx1650
  15. ];
  16. % Plot in log scale
  17. figure('Name', 'Results-SortTime', 'Position', [100, 100, 1600, 900]);
  18. semilogy(Q, sort_times', '-o', 'LineWidth', 1.5);
  19. grid on;
  20. xlabel('Q (Memory Size)');
  21. ylabel('Sort Execution Time (ms)');
  22. title('Sort time over memory size');
  23. legend({'V0 ampere', 'V1 ampere', 'V2 ampere', 'V0 tesla', 'V1 tesla', 'V2 tesla', 'V0 gtx1650', 'V1 gtx1650', 'V2 gtx1650'}, 'Location', 'northwest');
  24. saveas(gcf, 'sort_time_plot.png');