1% print blas benchmark 2 3 4 5% DGEMM 6 7printf('dgemm\n'); 8 9f1 = figure(); 10 11dgemm_nn 12save -mat dgemm_nn.mat A B 13 14plot(B(:,1), B(:,2)); 15 16dgemm_nt 17save -mat dgemm_nt.mat A B 18 19hold all 20plot(B(:,1), B(:,2)); 21hold off 22 23dgemm_tn 24save -mat dgemm_tn.mat A B 25 26hold all 27plot(B(:,1), B(:,2)); 28hold off 29 30dgemm_tt 31save -mat dgemm_tt.mat A B 32 33hold all 34plot(B(:,1), B(:,2)); 35hold off 36 37Gflops_max = A(1)*A(2); 38 39axis([0 300 0 Gflops_max]); 40legend('dgemm\_nn', 'dgemm\_nt', 'dgemm\_tn', 'dgemm\_tt', 'Location', 'SouthEast'); 41xlabel('matrix size n') 42ylabel('Gflops') 43grid on 44ytick = get(gca, 'ytick'); 45ytick = [ytick, Gflops_max]; 46set(gca, 'ytick', ytick); 47 48file_name = ['dgemm']; 49file_name_eps = [file_name, '.eps']; 50file_name_pdf = [file_name, '.pdf']; 51print(f1, file_name_eps, '-depsc') 52system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 53system(['rm ', file_name_eps]); 54 55 56 57% DSYRK 58 59printf('dsyrk\n'); 60 61f1 = figure(); 62 63dsyrk_ln 64save -mat dsyrk_ln.mat A B 65 66plot(B(:,1), B(:,2)); 67 68dsyrk_lt 69save -mat dsyrk_lt.mat A B 70 71hold all 72plot(B(:,1), B(:,2)); 73hold off 74 75dsyrk_un 76save -mat dsyrk_un.mat A B 77 78hold all 79plot(B(:,1), B(:,2)); 80hold off 81 82dsyrk_ut 83save -mat dsyrk_ut.mat A B 84 85hold all 86plot(B(:,1), B(:,2)); 87hold off 88 89Gflops_max = A(1)*A(2); 90 91axis([0 300 0 Gflops_max]); 92legend('dsyrk\_ln', 'dsyrk\_lt', 'dsyrk\_un', 'dsyrk\_ut', 'Location', 'SouthEast'); 93xlabel('matrix size n') 94ylabel('Gflops') 95grid on 96ytick = get(gca, 'ytick'); 97ytick = [ytick, Gflops_max]; 98set(gca, 'ytick', ytick); 99 100file_name = ['dsyrk']; 101file_name_eps = [file_name, '.eps']; 102file_name_pdf = [file_name, '.pdf']; 103print(f1, file_name_eps, '-depsc') 104system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 105system(['rm ', file_name_eps]); 106 107 108 109% DTRMM 110 111printf('dtrmm\n'); 112 113f1 = figure(); 114 115dtrmm_llnn 116save -mat dtrmm_llnn.mat A B 117 118plot(B(:,1), B(:,2)); 119 120dtrmm_llnu 121save -mat dtrmm_llnu.mat A B 122 123hold all 124plot(B(:,1), B(:,2)); 125hold off 126 127dtrmm_lltn 128save -mat dtrmm_lltn.mat A B 129 130hold all 131plot(B(:,1), B(:,2)); 132hold off 133 134dtrmm_lltu 135save -mat dtrmm_lltu.mat A B 136 137hold all 138plot(B(:,1), B(:,2)); 139hold off 140 141dtrmm_lunn 142save -mat dtrmm_lunn.mat A B 143 144hold all 145plot(B(:,1), B(:,2)); 146hold off 147 148dtrmm_lunu 149save -mat dtrmm_lunu.mat A B 150 151hold all 152plot(B(:,1), B(:,2)); 153hold off 154 155dtrmm_lutn 156save -mat dtrmm_lutn.mat A B 157 158hold all 159plot(B(:,1), B(:,2)); 160hold off 161 162dtrmm_lutu 163save -mat dtrmm_lutu.mat A B 164 165hold all 166plot(B(:,1), B(:,2)); 167hold off 168 169dtrmm_rlnn 170save -mat dtrmm_rlnn.mat A B 171 172hold all 173plot(B(:,1), B(:,2)); 174hold off 175 176dtrmm_rlnu 177save -mat dtrmm_rlnu.mat A B 178 179hold all 180plot(B(:,1), B(:,2)); 181hold off 182 183dtrmm_rltn 184save -mat dtrmm_rltn.mat A B 185 186hold all 187plot(B(:,1), B(:,2)); 188hold off 189 190dtrmm_rltu 191save -mat dtrmm_rltu.mat A B 192 193hold all 194plot(B(:,1), B(:,2)); 195hold off 196 197dtrmm_runn 198save -mat dtrmm_runn.mat A B 199 200hold all 201plot(B(:,1), B(:,2)); 202hold off 203 204dtrmm_runu 205save -mat dtrmm_runu.mat A B 206 207hold all 208plot(B(:,1), B(:,2)); 209hold off 210 211dtrmm_rutn 212save -mat dtrmm_rutn.mat A B 213 214hold all 215plot(B(:,1), B(:,2)); 216hold off 217 218dtrmm_rutu 219save -mat dtrmm_rutu.mat A B 220 221hold all 222plot(B(:,1), B(:,2)); 223hold off 224 225Gflops_max = A(1)*A(2); 226 227axis([0 300 0 Gflops_max]); 228legend('dtrmm\_llnn', 'dtrmm\_llnu', 'dtrmm\_lltn', 'dtrmm\_lltu', 'dtrmm\_lunn', 'dtrmm\_lunu', 'dtrmm\_lutn', 'dtrmm\_lutu', 'dtrmm\_rlnn', 'dtrmm\_rlnu', 'dtrmm\_rltn', 'dtrmm\_rltu', 'dtrmm\_runn', 'dtrmm\_runu', 'dtrmm\_rutn', 'dtrmm\_rutu', 'Location', 'SouthEast'); 229xlabel('matrix size n') 230ylabel('Gflops') 231grid on 232ytick = get(gca, 'ytick'); 233ytick = [ytick, Gflops_max]; 234set(gca, 'ytick', ytick); 235 236file_name = ['dtrmm']; 237file_name_eps = [file_name, '.eps']; 238file_name_pdf = [file_name, '.pdf']; 239print(f1, file_name_eps, '-depsc') 240system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 241system(['rm ', file_name_eps]); 242 243 244 245% DTRSM 246 247printf('dtrsm\n'); 248 249f1 = figure(); 250 251dtrsm_llnn 252save -mat dtrsm_llnn.mat A B 253 254plot(B(:,1), B(:,2)); 255 256dtrsm_llnu 257save -mat dtrsm_llnu.mat A B 258 259hold all 260plot(B(:,1), B(:,2)); 261hold off 262 263dtrsm_lltn 264save -mat dtrsm_lltn.mat A B 265 266hold all 267plot(B(:,1), B(:,2)); 268hold off 269 270dtrsm_lltu 271save -mat dtrsm_lltu.mat A B 272 273hold all 274plot(B(:,1), B(:,2)); 275hold off 276 277dtrsm_lunn 278save -mat dtrsm_lunn.mat A B 279 280hold all 281plot(B(:,1), B(:,2)); 282hold off 283 284dtrsm_lunu 285save -mat dtrsm_lunu.mat A B 286 287hold all 288plot(B(:,1), B(:,2)); 289hold off 290 291dtrsm_lutn 292save -mat dtrsm_lutn.mat A B 293 294hold all 295plot(B(:,1), B(:,2)); 296hold off 297 298dtrsm_lutu 299save -mat dtrsm_lutu.mat A B 300 301hold all 302plot(B(:,1), B(:,2)); 303hold off 304 305dtrsm_rlnn 306save -mat dtrsm_rlnn.mat A B 307 308hold all 309plot(B(:,1), B(:,2)); 310hold off 311 312dtrsm_rlnu 313save -mat dtrsm_rlnu.mat A B 314 315hold all 316plot(B(:,1), B(:,2)); 317hold off 318 319dtrsm_rltn 320save -mat dtrsm_rltn.mat A B 321 322hold all 323plot(B(:,1), B(:,2)); 324hold off 325 326dtrsm_rltu 327save -mat dtrsm_rltu.mat A B 328 329hold all 330plot(B(:,1), B(:,2)); 331hold off 332 333dtrsm_runn 334save -mat dtrsm_runn.mat A B 335 336hold all 337plot(B(:,1), B(:,2)); 338hold off 339 340dtrsm_runu 341save -mat dtrsm_runu.mat A B 342 343hold all 344plot(B(:,1), B(:,2)); 345hold off 346 347dtrsm_rutn 348save -mat dtrsm_rutn.mat A B 349 350hold all 351plot(B(:,1), B(:,2)); 352hold off 353 354dtrsm_rutu 355save -mat dtrsm_rutu.mat A B 356 357hold all 358plot(B(:,1), B(:,2)); 359hold off 360 361Gflops_max = A(1)*A(2); 362 363axis([0 300 0 Gflops_max]); 364legend('dtrsm\_llnn', 'dtrsm\_llnu', 'dtrsm\_lltn', 'dtrsm\_lltu', 'dtrsm\_lunn', 'dtrsm\_lunu', 'dtrsm\_lutn', 'dtrsm\_lutu', 'dtrsm\_rlnn', 'dtrsm\_rlnu', 'dtrsm\_rltn', 'dtrsm\_rltu', 'dtrsm\_runn', 'dtrsm\_runu', 'dtrsm\_rutn', 'dtrsm\_rutu', 'Location', 'SouthEast'); 365xlabel('matrix size n') 366ylabel('Gflops') 367grid on 368ytick = get(gca, 'ytick'); 369ytick = [ytick, Gflops_max]; 370set(gca, 'ytick', ytick); 371 372file_name = ['dtrsm']; 373file_name_eps = [file_name, '.eps']; 374file_name_pdf = [file_name, '.pdf']; 375print(f1, file_name_eps, '-depsc') 376system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 377system(['rm ', file_name_eps]); 378 379 380 381% DGEQRF 382 383printf('dgeqrf\n'); 384 385f1 = figure(); 386 387dgelqf 388save -mat dgelqf.mat A B 389 390plot(B(:,1), B(:,2)); 391 392dgeqrf 393save -mat dgeqrf.mat A B 394 395hold all 396plot(B(:,1), B(:,2)); 397hold off 398 399Gflops_max = A(1)*A(2); 400 401axis([0 300 0 Gflops_max]); 402legend('dgelqf', 'dgeqrf', 'Location', 'SouthEast'); 403xlabel('matrix size n') 404ylabel('Gflops') 405grid on 406ytick = get(gca, 'ytick'); 407ytick = [ytick, Gflops_max]; 408set(gca, 'ytick', ytick); 409 410file_name = ['dgeqrf']; 411file_name_eps = [file_name, '.eps']; 412file_name_pdf = [file_name, '.pdf']; 413print(f1, file_name_eps, '-depsc') 414system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 415system(['rm ', file_name_eps]); 416 417 418 419% DGETRF 420 421printf('dgetrf\n'); 422 423f1 = figure(); 424 425dgetrf_nopivot 426save -mat dgetrf_nopivot.mat A B 427 428plot(B(:,1), B(:,2)); 429 430dgetrf_rowpivot 431save -mat dgetrf_rowpivot.mat A B 432 433hold all 434plot(B(:,1), B(:,2)); 435hold off 436 437Gflops_max = A(1)*A(2); 438 439axis([0 300 0 Gflops_max]); 440legend('dgetrf\_nopivot', 'dgetrf\_rowpivot', 'Location', 'SouthEast'); 441xlabel('matrix size n') 442ylabel('Gflops') 443grid on 444ytick = get(gca, 'ytick'); 445ytick = [ytick, Gflops_max]; 446set(gca, 'ytick', ytick); 447 448file_name = ['dgetrf']; 449file_name_eps = [file_name, '.eps']; 450file_name_pdf = [file_name, '.pdf']; 451print(f1, file_name_eps, '-depsc') 452system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 453system(['rm ', file_name_eps]); 454 455 456 457% DPOTRF 458 459printf('dpotrf\n'); 460 461f1 = figure(); 462 463dpotrf_l 464save -mat dpotrf_l.mat A B 465 466plot(B(:,1), B(:,2)); 467 468dpotrf_u 469save -mat dpotrf_u.mat A B 470 471hold all 472plot(B(:,1), B(:,2)); 473hold off 474 475Gflops_max = A(1)*A(2); 476 477axis([0 300 0 Gflops_max]); 478legend('dpotrf\_l', 'dpotrf\_u', 'Location', 'SouthEast'); 479xlabel('matrix size n') 480ylabel('Gflops') 481grid on 482ytick = get(gca, 'ytick'); 483ytick = [ytick, Gflops_max]; 484set(gca, 'ytick', ytick); 485 486file_name = ['dpotrf']; 487file_name_eps = [file_name, '.eps']; 488file_name_pdf = [file_name, '.pdf']; 489print(f1, file_name_eps, '-depsc') 490system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 491system(['rm ', file_name_eps]); 492 493 494 495% DGEMV 496 497printf('dgemv\n'); 498 499f1 = figure(); 500 501dgemv_n 502save -mat dgemv_n.mat A B 503 504plot(B(:,1), B(:,2)); 505 506dgemv_t 507save -mat dgemv_t.mat A B 508 509hold all 510plot(B(:,1), B(:,2)); 511hold off 512 513dgemv_nt 514save -mat dgemv_nt.mat A B 515 516hold all 517plot(B(:,1), B(:,2)); 518hold off 519 520Gflops_max = A(1)*A(2); 521 522axis([0 300 0 Gflops_max]); 523legend('dgemv\_n', 'dgemv\_t', 'dgemv\_nt', 'Location', 'SouthEast'); 524xlabel('matrix size n') 525ylabel('Gflops') 526grid on 527ytick = get(gca, 'ytick'); 528ytick = [ytick, Gflops_max]; 529set(gca, 'ytick', ytick); 530 531file_name = ['dgemv']; 532file_name_eps = [file_name, '.eps']; 533file_name_pdf = [file_name, '.pdf']; 534print(f1, file_name_eps, '-depsc') 535system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 536system(['rm ', file_name_eps]); 537 538 539 540% DTRMV 541 542printf('dtrmv\n'); 543 544f1 = figure(); 545 546dtrmv_lnn 547save -mat dtrmv_lnn.mat A B 548 549plot(B(:,1), B(:,2)); 550 551dtrmv_ltn 552save -mat dtrmv_ltn.mat A B 553 554hold all 555plot(B(:,1), B(:,2)); 556hold off 557 558Gflops_max = A(1)*A(2); 559 560axis([0 300 0 Gflops_max]); 561legend('dtrmv\_lnn', 'dtrmv\_ltn', 'Location', 'SouthEast'); 562xlabel('matrix size n') 563ylabel('Gflops') 564grid on 565ytick = get(gca, 'ytick'); 566ytick = [ytick, Gflops_max]; 567set(gca, 'ytick', ytick); 568 569file_name = ['dtrmv']; 570file_name_eps = [file_name, '.eps']; 571file_name_pdf = [file_name, '.pdf']; 572print(f1, file_name_eps, '-depsc') 573system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 574system(['rm ', file_name_eps]); 575 576 577 578% DTRSV 579 580printf('dtrsv\n'); 581 582f1 = figure(); 583 584dtrsv_lnn 585save -mat dtrsv_lnn.mat A B 586 587plot(B(:,1), B(:,2)); 588 589dtrsv_ltn 590save -mat dtrsv_ltn.mat A B 591 592hold all 593plot(B(:,1), B(:,2)); 594hold off 595 596Gflops_max = A(1)*A(2); 597 598axis([0 300 0 Gflops_max]); 599legend('dtrsv\_lnn', 'dtrsv\_ltn', 'Location', 'SouthEast'); 600xlabel('matrix size n') 601ylabel('Gflops') 602grid on 603ytick = get(gca, 'ytick'); 604ytick = [ytick, Gflops_max]; 605set(gca, 'ytick', ytick); 606 607file_name = ['dtrsv']; 608file_name_eps = [file_name, '.eps']; 609file_name_pdf = [file_name, '.pdf']; 610print(f1, file_name_eps, '-depsc') 611system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 612system(['rm ', file_name_eps]); 613 614 615 616% DSYMV 617 618printf('dsymv\n'); 619 620f1 = figure(); 621 622dsymv_l 623save -mat dsymv_l.mat A B 624 625plot(B(:,1), B(:,2)); 626 627Gflops_max = A(1)*A(2); 628 629axis([0 300 0 Gflops_max]); 630legend('dsymv\_l', 'Location', 'SouthEast'); 631xlabel('matrix size n') 632ylabel('Gflops') 633grid on 634ytick = get(gca, 'ytick'); 635ytick = [ytick, Gflops_max]; 636set(gca, 'ytick', ytick); 637 638file_name = ['dsymv']; 639file_name_eps = [file_name, '.eps']; 640file_name_pdf = [file_name, '.pdf']; 641print(f1, file_name_eps, '-depsc') 642system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 643system(['rm ', file_name_eps]); 644 645 646 647% SGEMM 648 649printf('sgemm\n'); 650 651f1 = figure(); 652 653sgemm_nn 654save -mat sgemm_nn.mat A B 655 656plot(B(:,1), B(:,2)); 657 658sgemm_nt 659save -mat sgemm_nt.mat A B 660 661hold all 662plot(B(:,1), B(:,2)); 663hold off 664 665sgemm_tn 666save -mat sgemm_tn.mat A B 667 668hold all 669plot(B(:,1), B(:,2)); 670hold off 671 672sgemm_tt 673save -mat sgemm_tt.mat A B 674 675hold all 676plot(B(:,1), B(:,2)); 677hold off 678 679Gflops_max = A(1)*A(2); 680 681axis([0 300 0 Gflops_max]); 682legend('sgemm\_nn', 'sgemm\_nt', 'sgemm\_tn', 'sgemm\_tt', 'Location', 'SouthEast'); 683xlabel('matrix size n') 684ylabel('Gflops') 685grid on 686ytick = get(gca, 'ytick'); 687ytick = [ytick, Gflops_max]; 688set(gca, 'ytick', ytick); 689 690file_name = ['sgemm']; 691file_name_eps = [file_name, '.eps']; 692file_name_pdf = [file_name, '.pdf']; 693print(f1, file_name_eps, '-depsc') 694system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 695system(['rm ', file_name_eps]); 696 697 698 699% SSYRK 700 701printf('ssyrk\n'); 702 703f1 = figure(); 704 705ssyrk_ln 706save -mat ssyrk_ln.mat A B 707 708plot(B(:,1), B(:,2)); 709 710ssyrk_lt 711save -mat ssyrk_lt.mat A B 712 713hold all 714plot(B(:,1), B(:,2)); 715hold off 716 717ssyrk_un 718save -mat ssyrk_un.mat A B 719 720hold all 721plot(B(:,1), B(:,2)); 722hold off 723 724ssyrk_ut 725save -mat ssyrk_ut.mat A B 726 727hold all 728plot(B(:,1), B(:,2)); 729hold off 730 731Gflops_max = A(1)*A(2); 732 733axis([0 300 0 Gflops_max]); 734legend('ssyrk\_ln', 'ssyrk\_lt', 'ssyrk\_un', 'ssyrk\_ut', 'Location', 'SouthEast'); 735xlabel('matrix size n') 736ylabel('Gflops') 737grid on 738ytick = get(gca, 'ytick'); 739ytick = [ytick, Gflops_max]; 740set(gca, 'ytick', ytick); 741 742file_name = ['ssyrk']; 743file_name_eps = [file_name, '.eps']; 744file_name_pdf = [file_name, '.pdf']; 745print(f1, file_name_eps, '-depsc') 746system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 747system(['rm ', file_name_eps]); 748 749 750 751% STRMM 752 753printf('strmm\n'); 754 755f1 = figure(); 756 757strmm_llnn 758save -mat strmm_llnn.mat A B 759 760plot(B(:,1), B(:,2)); 761 762strmm_llnu 763save -mat strmm_llnu.mat A B 764 765hold all 766plot(B(:,1), B(:,2)); 767hold off 768 769strmm_lltn 770save -mat strmm_lltn.mat A B 771 772hold all 773plot(B(:,1), B(:,2)); 774hold off 775 776strmm_lltu 777save -mat strmm_lltu.mat A B 778 779hold all 780plot(B(:,1), B(:,2)); 781hold off 782 783strmm_lunn 784save -mat strmm_lunn.mat A B 785 786hold all 787plot(B(:,1), B(:,2)); 788hold off 789 790strmm_lunu 791save -mat strmm_lunu.mat A B 792 793hold all 794plot(B(:,1), B(:,2)); 795hold off 796 797strmm_lutn 798save -mat strmm_lutn.mat A B 799 800hold all 801plot(B(:,1), B(:,2)); 802hold off 803 804strmm_lutu 805save -mat strmm_lutu.mat A B 806 807hold all 808plot(B(:,1), B(:,2)); 809hold off 810 811strmm_rlnn 812save -mat strmm_rlnn.mat A B 813 814hold all 815plot(B(:,1), B(:,2)); 816hold off 817 818strmm_rlnu 819save -mat strmm_rlnu.mat A B 820 821hold all 822plot(B(:,1), B(:,2)); 823hold off 824 825strmm_rltn 826save -mat strmm_rltn.mat A B 827 828hold all 829plot(B(:,1), B(:,2)); 830hold off 831 832strmm_rltu 833save -mat strmm_rltu.mat A B 834 835hold all 836plot(B(:,1), B(:,2)); 837hold off 838 839strmm_runn 840save -mat strmm_runn.mat A B 841 842hold all 843plot(B(:,1), B(:,2)); 844hold off 845 846strmm_runu 847save -mat strmm_runu.mat A B 848 849hold all 850plot(B(:,1), B(:,2)); 851hold off 852 853strmm_rutn 854save -mat strmm_rutn.mat A B 855 856hold all 857plot(B(:,1), B(:,2)); 858hold off 859 860strmm_rutu 861save -mat strmm_rutu.mat A B 862 863hold all 864plot(B(:,1), B(:,2)); 865hold off 866 867Gflops_max = A(1)*A(2); 868 869axis([0 300 0 Gflops_max]); 870legend('strmm\_llnn', 'strmm\_llnu', 'strmm\_lltn', 'strmm\_lltu', 'strmm\_lunn', 'strmm\_lunu', 'strmm\_lutn', 'strmm\_lutu', 'strmm\_rlnn', 'strmm\_rlnu', 'strmm\_rltn', 'strmm\_rltu', 'strmm\_runn', 'strmm\_runu', 'strmm\_rutn', 'strmm\_rutu', 'Location', 'SouthEast'); 871xlabel('matrix size n') 872ylabel('Gflops') 873grid on 874ytick = get(gca, 'ytick'); 875ytick = [ytick, Gflops_max]; 876set(gca, 'ytick', ytick); 877 878file_name = ['strmm']; 879file_name_eps = [file_name, '.eps']; 880file_name_pdf = [file_name, '.pdf']; 881print(f1, file_name_eps, '-depsc') 882system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 883system(['rm ', file_name_eps]); 884 885 886 887% STRSM 888 889printf('strsm\n'); 890 891f1 = figure(); 892 893strsm_llnn 894save -mat strsm_llnn.mat A B 895 896plot(B(:,1), B(:,2)); 897 898strsm_llnu 899save -mat strsm_llnu.mat A B 900 901hold all 902plot(B(:,1), B(:,2)); 903hold off 904 905strsm_lltn 906save -mat strsm_lltn.mat A B 907 908hold all 909plot(B(:,1), B(:,2)); 910hold off 911 912strsm_lltu 913save -mat strsm_lltu.mat A B 914 915hold all 916plot(B(:,1), B(:,2)); 917hold off 918 919strsm_lunn 920save -mat strsm_lunn.mat A B 921 922hold all 923plot(B(:,1), B(:,2)); 924hold off 925 926strsm_lunu 927save -mat strsm_lunu.mat A B 928 929hold all 930plot(B(:,1), B(:,2)); 931hold off 932 933strsm_lutn 934save -mat strsm_lutn.mat A B 935 936hold all 937plot(B(:,1), B(:,2)); 938hold off 939 940strsm_lutu 941save -mat strsm_lutu.mat A B 942 943hold all 944plot(B(:,1), B(:,2)); 945hold off 946 947strsm_rlnn 948save -mat strsm_rlnn.mat A B 949 950hold all 951plot(B(:,1), B(:,2)); 952hold off 953 954strsm_rlnu 955save -mat strsm_rlnu.mat A B 956 957hold all 958plot(B(:,1), B(:,2)); 959hold off 960 961strsm_rltn 962save -mat strsm_rltn.mat A B 963 964hold all 965plot(B(:,1), B(:,2)); 966hold off 967 968strsm_rltu 969save -mat strsm_rltu.mat A B 970 971hold all 972plot(B(:,1), B(:,2)); 973hold off 974 975strsm_runn 976save -mat strsm_runn.mat A B 977 978hold all 979plot(B(:,1), B(:,2)); 980hold off 981 982strsm_runu 983save -mat strsm_runu.mat A B 984 985hold all 986plot(B(:,1), B(:,2)); 987hold off 988 989strsm_rutn 990save -mat strsm_rutn.mat A B 991 992hold all 993plot(B(:,1), B(:,2)); 994hold off 995 996strsm_rutu 997save -mat strsm_rutu.mat A B 998 999hold all 1000plot(B(:,1), B(:,2)); 1001hold off 1002 1003Gflops_max = A(1)*A(2); 1004 1005axis([0 300 0 Gflops_max]); 1006legend('strsm\_llnn', 'strsm\_llnu', 'strsm\_lltn', 'strsm\_lltu', 'strsm\_lunn', 'strsm\_lunu', 'strsm\_lutn', 'strsm\_lutu', 'strsm\_rlnn', 'strsm\_rlnu', 'strsm\_rltn', 'strsm\_rltu', 'strsm\_runn', 'strsm\_runu', 'strsm\_rutn', 'strsm\_rutu', 'Location', 'SouthEast'); 1007xlabel('matrix size n') 1008ylabel('Gflops') 1009grid on 1010ytick = get(gca, 'ytick'); 1011ytick = [ytick, Gflops_max]; 1012set(gca, 'ytick', ytick); 1013 1014file_name = ['strsm']; 1015file_name_eps = [file_name, '.eps']; 1016file_name_pdf = [file_name, '.pdf']; 1017print(f1, file_name_eps, '-depsc') 1018system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1019system(['rm ', file_name_eps]); 1020 1021 1022 1023% SGEQRF 1024 1025printf('sgeqrf\n'); 1026 1027f1 = figure(); 1028 1029sgelqf 1030save -mat sgelqf.mat A B 1031 1032plot(B(:,1), B(:,2)); 1033 1034sgeqrf 1035save -mat sgeqrf.mat A B 1036 1037hold all 1038plot(B(:,1), B(:,2)); 1039hold off 1040 1041Gflops_max = A(1)*A(2); 1042 1043axis([0 300 0 Gflops_max]); 1044legend('sgelqf', 'sgeqrf', 'Location', 'SouthEast'); 1045xlabel('matrix size n') 1046ylabel('Gflops') 1047grid on 1048ytick = get(gca, 'ytick'); 1049ytick = [ytick, Gflops_max]; 1050set(gca, 'ytick', ytick); 1051 1052file_name = ['sgeqrf']; 1053file_name_eps = [file_name, '.eps']; 1054file_name_pdf = [file_name, '.pdf']; 1055print(f1, file_name_eps, '-depsc') 1056system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1057system(['rm ', file_name_eps]); 1058 1059 1060 1061% SGETRF 1062 1063printf('sgetrf\n'); 1064 1065f1 = figure(); 1066 1067sgetrf_nopivot 1068save -mat sgetrf_nopivot.mat A B 1069 1070plot(B(:,1), B(:,2)); 1071 1072sgetrf_rowpivot 1073save -mat sgetrf_rowpivot.mat A B 1074 1075hold all 1076plot(B(:,1), B(:,2)); 1077hold off 1078 1079Gflops_max = A(1)*A(2); 1080 1081axis([0 300 0 Gflops_max]); 1082legend('sgetrf\_nopivot', 'sgetrf\_rowpivot', 'Location', 'SouthEast'); 1083xlabel('matrix size n') 1084ylabel('Gflops') 1085grid on 1086ytick = get(gca, 'ytick'); 1087ytick = [ytick, Gflops_max]; 1088set(gca, 'ytick', ytick); 1089 1090file_name = ['sgetrf']; 1091file_name_eps = [file_name, '.eps']; 1092file_name_pdf = [file_name, '.pdf']; 1093print(f1, file_name_eps, '-depsc') 1094system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1095system(['rm ', file_name_eps]); 1096 1097 1098 1099% SPOTRF 1100 1101printf('spotrf\n'); 1102 1103f1 = figure(); 1104 1105spotrf_l 1106save -mat spotrf_l.mat A B 1107 1108plot(B(:,1), B(:,2)); 1109 1110spotrf_u 1111save -mat spotrf_u.mat A B 1112 1113hold all 1114plot(B(:,1), B(:,2)); 1115hold off 1116 1117Gflops_max = A(1)*A(2); 1118 1119axis([0 300 0 Gflops_max]); 1120legend('spotrf\_l', 'spotrf\_u', 'Location', 'SouthEast'); 1121xlabel('matrix size n') 1122ylabel('Gflops') 1123grid on 1124ytick = get(gca, 'ytick'); 1125ytick = [ytick, Gflops_max]; 1126set(gca, 'ytick', ytick); 1127 1128file_name = ['spotrf']; 1129file_name_eps = [file_name, '.eps']; 1130file_name_pdf = [file_name, '.pdf']; 1131print(f1, file_name_eps, '-depsc') 1132system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1133system(['rm ', file_name_eps]); 1134 1135 1136 1137% SGEMV 1138 1139printf('sgemv\n'); 1140 1141f1 = figure(); 1142 1143sgemv_n 1144save -mat sgemv_n.mat A B 1145 1146plot(B(:,1), B(:,2)); 1147 1148sgemv_t 1149save -mat sgemv_t.mat A B 1150 1151hold all 1152plot(B(:,1), B(:,2)); 1153hold off 1154 1155sgemv_nt 1156save -mat sgemv_nt.mat A B 1157 1158hold all 1159plot(B(:,1), B(:,2)); 1160hold off 1161 1162Gflops_max = A(1)*A(2); 1163 1164axis([0 300 0 Gflops_max]); 1165legend('sgemv\_n', 'sgemv\_t', 'sgemv\_nt', 'Location', 'SouthEast'); 1166xlabel('matrix size n') 1167ylabel('Gflops') 1168grid on 1169ytick = get(gca, 'ytick'); 1170ytick = [ytick, Gflops_max]; 1171set(gca, 'ytick', ytick); 1172 1173file_name = ['sgemv']; 1174file_name_eps = [file_name, '.eps']; 1175file_name_pdf = [file_name, '.pdf']; 1176print(f1, file_name_eps, '-depsc') 1177system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1178system(['rm ', file_name_eps]); 1179 1180 1181 1182% STRMV 1183 1184printf('strmv\n'); 1185 1186f1 = figure(); 1187 1188strmv_lnn 1189save -mat strmv_lnn.mat A B 1190 1191plot(B(:,1), B(:,2)); 1192 1193strmv_ltn 1194save -mat strmv_ltn.mat A B 1195 1196hold all 1197plot(B(:,1), B(:,2)); 1198hold off 1199 1200Gflops_max = A(1)*A(2); 1201 1202axis([0 300 0 Gflops_max]); 1203legend('strmv\_lnn', 'strmv\_ltn', 'Location', 'SouthEast'); 1204xlabel('matrix size n') 1205ylabel('Gflops') 1206grid on 1207ytick = get(gca, 'ytick'); 1208ytick = [ytick, Gflops_max]; 1209set(gca, 'ytick', ytick); 1210 1211file_name = ['strmv']; 1212file_name_eps = [file_name, '.eps']; 1213file_name_pdf = [file_name, '.pdf']; 1214print(f1, file_name_eps, '-depsc') 1215system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1216system(['rm ', file_name_eps]); 1217 1218 1219 1220% STRSV 1221 1222printf('strsv\n'); 1223 1224f1 = figure(); 1225 1226strsv_lnn 1227save -mat strsv_lnn.mat A B 1228 1229plot(B(:,1), B(:,2)); 1230 1231strsv_ltn 1232save -mat strsv_ltn.mat A B 1233 1234hold all 1235plot(B(:,1), B(:,2)); 1236hold off 1237 1238Gflops_max = A(1)*A(2); 1239 1240axis([0 300 0 Gflops_max]); 1241legend('strsv\_lnn', 'strsv\_ltn', 'Location', 'SouthEast'); 1242xlabel('matrix size n') 1243ylabel('Gflops') 1244grid on 1245ytick = get(gca, 'ytick'); 1246ytick = [ytick, Gflops_max]; 1247set(gca, 'ytick', ytick); 1248 1249file_name = ['strsv']; 1250file_name_eps = [file_name, '.eps']; 1251file_name_pdf = [file_name, '.pdf']; 1252print(f1, file_name_eps, '-depsc') 1253system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1254system(['rm ', file_name_eps]); 1255 1256 1257 1258% SSYMV 1259 1260printf('ssymv\n'); 1261 1262f1 = figure(); 1263 1264ssymv_l 1265save -mat ssymv_l.mat A B 1266 1267plot(B(:,1), B(:,2)); 1268 1269Gflops_max = A(1)*A(2); 1270 1271axis([0 300 0 Gflops_max]); 1272legend('ssymv\_l', 'Location', 'SouthEast'); 1273xlabel('matrix size n') 1274ylabel('Gflops') 1275grid on 1276ytick = get(gca, 'ytick'); 1277ytick = [ytick, Gflops_max]; 1278set(gca, 'ytick', ytick); 1279 1280file_name = ['ssymv']; 1281file_name_eps = [file_name, '.eps']; 1282file_name_pdf = [file_name, '.pdf']; 1283print(f1, file_name_eps, '-depsc') 1284system(['epstopdf ', file_name_eps, ' -out ', file_name_pdf]); 1285system(['rm ', file_name_eps]); 1286 1287 1288