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.

SpeedUp.m 1.6 KiB

12345678910111213141516171819202122232425262728293031323334
  1. % MATLAB script to plot Speedup (Serial Time / Total Time)
  2. % Define Q values
  3. Q = 20:30;
  4. % Define Serial execution times (converted to milliseconds)
  5. serial_times = [
  6. 74, 154, 328, 689, 1441, 3028, 6293, 13700, 27170, 55340, 115580];
  7. % Define Total execution times (converted to milliseconds)
  8. total_times = [
  9. 8.733, 12, 59, 37, 56, 98, 229, 420, 976, 1910, 3971; % V0 - ampere
  10. 2.676, 6.308, 10, 18, 34, 83, 134, 331, 664, 1364, 2938; % V1 - ampere
  11. 2.883, 5.861, 12, 21, 34, 86, 135, 331, 749, 1459, 3063; % V2 - ampere
  12. 6.559, 12, 23, 49, 101, 210, 442, 939, 1986, 4211, 9071; % V0 - tesla
  13. 4.559, 9.014, 18, 39, 80, 169, 358, 761, 1618, 3440, 7326; % V1 - tesla
  14. 4.407, 8.751, 17, 38, 75, 159, 338, 719, 1533, 3262, 6932; % V2 - tesla
  15. 16, 33, 71, 153, 327, 696, 1493, 3177, 6782, 14420, NaN; % V0 - gtx1650
  16. 8.271, 17, 37, 78, 161, 353, 774, 1709, 3701, 8106, NaN; % V1 - gtx1650
  17. 8.985, 18, 38, 81, 169, 370, 810, 1779, 3864, 8424, NaN % V2 - gtx1650
  18. ];
  19. % Compute Speedup
  20. speedup = serial_times ./ total_times;
  21. % Plot in log scale
  22. figure('Name', 'Results-SpeedUp', 'Position', [100, 100, 1600, 900]);
  23. plot(Q, speedup', '-o', 'LineWidth', 1.5);
  24. grid on;
  25. xlabel('Q (Memory Size)');
  26. ylabel('Speedup (Serial / Total)');
  27. title('Speed up over memory size');
  28. legend({'V0 ampere', 'V1 ampere', 'V2 ampere', 'V0 tesla', 'V1 tesla', 'V2 tesla', 'V0 gtx1650', 'V1 gtx1650', 'V2 gtx1650'}, 'Location', 'northwest');
  29. saveas(gcf, 'speedup_plot.png');