Matrix computations on Intel® Xeon Phi MAGMA MIC and MKL by example

Dodaj recenzję:
  • 3440
  • Producent: BTC
  • Autor: Andrzej Chrzęszczyk, Jakub Chrzęszczyk
  • Cena netto: 56,19 zł 59,00 zł
Matrix computations on Intel® Xeon Phi MAGMA MIC and MKL by example

rok wydania: 2016
ilość stron: 433
ISBN: 978-83-64702-09-9
format: B5
oprawa: twarda
Książka w języku angielskim

Opis
W książce pokazano, jak skorzystać z bibliotek MAGMA MIC, by efektywnie używać procesora Intel® XEON PHI podczas wykonywania programów komputerowych, w których muszą być wykonywane operacje na macierzach i wektorach.
Ogromną zaletą książki jest bardzo duża liczba przykładów cennych dla programistów.

Contents
Foreword / 1
1. Introduction / 3
1.1. General remarks on MAGMA MIC / 3
1.2. Remarks on installation and compilation / 4
1.2.1. MAGMA MIC / 4
1.2.2. MKL / 5
1.2.3. Random matrix generation / 5
2. Measuring Xeon Phi performance / 6
2.1. Linpack benchmark for Xeon Phi / 6
2.2. Linpack benchmark results / 6
2.3. MAGMA MIC benchmark / 8
3. Matrix-vector multiplication / 9
3.1. magma_sgemv- matrix-vector multiplication, real, single precision / 9
3.2. mkl sgemv- matrix-vector multiplication, real, single precision / 11
3.3. magma_dgemv- matrix-vector multiplication, real, double precision / 12
3.4. mkl dgemv- matrix-vector multiplication, real, double precision / 14
3.5. magma_cgemv- matrix-vector multiplication, complex, single precision / 15
3.6. mkl cgemv- matrix-vector multiplication, complex, single precision / 17
3.7. magma_zgemv- matrix-vector multiplication, complex, double precision / 18
3.8. mkl zgemv- matrix-vector multiplication, complex, double precision / 20
3.9. magma_ssymv- symmetric matrix-vector multiplication, real, singleprec / 22
3.10. mkl ssymv- symmetric matrix-vector multiplication, real, singleprecision / 23
3.11. magma_dsymv- symmetric matrix-vector multiplication, real, double prec / 25
3.12. mkl dsymv- symmetric matrix-vector multiplication, real, double prec / 26
3.13. magma_csymv- symmetric matrix-vector multiplication, complex,single precision /28
3.14. mkl csymv- symmetric matrix-vector multiplication, complex, single prec. / 30
3.15. magma_zsymv- symmetric matrix-vector multiplication, complex, double precision / 31
3.16. mkl zsymv- symmetric matrix-vector multiplication, complex, double prec / 33
3.17. magma_strmv- triangular matrix-vector multiplication, real, single prec / 34
3.18. mkl strmv- triangular matrix-vector multiplication, real, single precision / 36
3.19. magma_dtrmv- triangular matrix-vector multiplication, real, double prec / 37
3.20. mkl dtrmv- triangular matrix-vector multiplication, real, double precision / 39
3.21. magma_ctrmv- triangular matrix-vector multiplication, complex, single prec. / 40
3.22. mkl ctrmv- triangular matrix-vector multiplication, complex, single prec / 42
3.23. magma_ztrmv- triangular matrix-vector multiplication, complex, double precision / 44
3.24. mkl ztrmv- triangular matrix-vector multiplication, complex, double prec / 45
4. Matrix-matrix multiplication / 48
4.1. magma_sgemm- matrix-matrix multiplication, real, single precision, example with matrices of ones / 48
4.2. mkl sgemm- matrix-matrix multiplication, real, single precision, example with matrices of ones / 50
4.3. magma_sgemm- matrix-matrix multiplication, real, single precision, example with random matrices / 52
4.4. mkl sgemm- matrix-matrix multiplication, real, single precision, example with random matrices / 54
4.5. magma_dgemm- matrix-matrix multiplication, real, double precision, example with matrices of ones / 56
4.6. mkl dgemm- matrix-matrix multiplication, real, single precision, example with matrices of ones / 58
4.7. magma_dgemm- matrix-matrix multiplication, real, double precision, example with random matrices / 60
4.8. mkl dgemm- matrix-matrix multiplication, real, single precision, example with random matrices / 63
4.9. magma_cgemm- matrix-matrix multiplication, complex, single precision, example with matrices of ones / 65
4.10. mkl cgemm- matrix-matrix multiplication, complex, single precision, example with matrices of ones / 67
4.11. magma_cgemm- matrix-matrix multiplication, complex, single precision, example with random matrices / 69
4.12. mkl cgemm- matrix-matrix multiplication, complex, single precision, example with random matrices / 72
4.13. magma_zgemm- matrix-matrix multiplication, complex, double precision, example with matrices of ones / 74
4.14. mkl zgemm- matrix-matrix multiplication, complex, double precision, example with matrices of ones / 77
4.15. magma_zgemm- matrix-matrix multiplication, complex, double precision, example with random matrices / 79
4.16. mkl zgemm- matrix-matrix multiplication, complex, double precision, example with random matrices / 82
4.17. magma_strmm- triangular matrix-matrix multiplication, real, single prec. / 84
4.18. mkl strmm- triangular matrix-matrix multiplication, real, single precision / 86
4.19. magma_dtrmm- triangular matrix-matrix multiplication, real, double prec. / 88
4.20. mkl dtrmm- triangular matrix-matrix multiplication, real, double prec. / 90
4.21. magma_ctrmm- triangular matrix-matrix multiplication, complex, single precision / 92
4.22. mkl ctrmm- triangular matrix-matrix multiplication, complex, single prec. / 94
4.23. magma_ztrmm- triangular matrix-matrix multiplication, complex, double precision / 96
4.24. mkl ztrmm- triangular matrix-matrix multiplication, complex, double prec. / 99
4.25. magma_ssyrk- symmetric rank-k update, real, single precision / 100
4.26. mkl ssyrk- symmetric rank-k update, real, single precision / 102
4.27. magma_dsyrk- symmetric rank-k update, real, double precision / 104
4.28. mkl dsyrk- symmetric rank-k update, real, double precision / 106
4.29. magma_cherk- Hermitian rank-k update, complex, single precision / 107
4.30. mkl cherk - Hermitian rank-k update, complex, single precision / 109
4.31. magma_zherk- Hermitian rank-k update, complex, double precision / 111
4.32. mkl zherk- Hermitian rank-k update, complex, double precision / 113
4.33. magma_ssyrk_mmic- symmetric rank-k update, real, single precision, multimic version / 114
4.34. magma_dsyrk_mmic- symmetric rank-k update, real, double precision, multimic version / 117
4.35. magma_cherk_mmic- Hermitian rank-k update, complex, single precision, multimic version / 119
4.36. magma_zherk_mmic- Hermitian rank-k update, complex, doubleprecision, multimic version / 121
5.  Solving triangular systems / 125
5.1. magma_strsv- solve a triangular linear system, real, single precision / 125
5.2. mkl strsv- solve a triangular linear system, real, single precision / 127
5.3. magma_dtrsv- solve a triangular linear system, real, double prec. / 128
5.4. mkl dtrsv- solve a triangular linear system, real, double prec. / 130
5.5. magma_ctrsv- solve a triangular linear system, complex, single prec. / 131
5.6. mkl ctrsv- solve a triangular linear system, complex, single prec. / 133
5.7. magma_ztrsv- solve a triangular linear system, complex, double prec. / 134
5.8. mkl ztrsv- solve a triangular linear system, complex, double prec. / 136
5.9. magma_strsm- solve a triangular linear system with matrix rhs,real, single precision / 137
5.10. mkl strsm- solve a triangular linear system with matrix rhs, real,single precision / 139
5.11. magma_dtrsm- solve a triangular linear system with matrix rhs,real, double precision / 141
5.12. mkl dtrsm- solve a triangular linear system with matrix rhs, real, double precision / 143
5.13. magma_ctrsm- solve a triangular linear system with matrix rhs, complex, single precision / 145
5.14. mkl ctrsm- solve a triangular linear system with matrix rhs, complex, single precision / 147
5.15. magma_ztrsm- solve a triangular linear system with matrix rhs, complex, double precision / 149
5.16. mkl ztrsm- solve a triangular linear system with matrix rhs, complex, double precision / 151
6. LU decomposition and solving general linear systems / 154
6.1. magma_sgesv- solve a general real linear system in single precision, CPU interface / 154
6.2. mkl sgesv- solve a general real linear system in single precision / 156
6.3. magma_dgesv- solve a general real linear system in double precision, CPU interface / 157
6.4. mkl dgesv- solve a general real linear system in double precision / 159
6.5. magma_cgesv- solve a general complex linear system in single precision, CPU interface / 161
6.6. mkl cgesv- solve a general complex linear system in single prec. / 163
6.7. magma_zgesv- solve a general complex linear system in double precision, CPU interface / 165
6.8. mkl zgesv- solve a general complex linear system in double prec. / 167
6.9. magma_sgesv_mic- solve a general real linear system in single precision, MIC interface / 169
6.10. magma_dgesv_mic- solve a general real linear system in double precision, MIC interface / 171
6.11. magma_cgesv_mic- solve a general complex linear system in single precision, MIC interface / 173
6.12. magma_zgesv_mic- solve a general complex linear system in double precision, MIC interface / 175
6.13. magma_sgetrf- LU factorization of a general real matrix in singleprecision, CPU interface / 177
6.14. mkl sgetrf- LU factorization of a general real matrix in single prec. / 179
6.15. magma_dgetrf- LU factorization of a general real matrix in double precision, CPU interface / 181
6.16. mkl dgetrf- LU factorization of a general real matrix in double prec. / 183
6.17. magma_cgetrf - LU factorization of a general complex matrix in single precision, CPU interface / 184
6.18. mkl cgetrf- LU factorization of a general complex matrix in single prec. / 186
6.19. magma_zgetrf- LU factorization of a general complex matrix indouble precision, CPU interface / 188
6.20. mkl zgetrf- LU factorization of a general complex matrix in double prec. / 190
6.21. magma_sgetrf_mic- LU factorization of a general real matrix in single precision, MIC interface / 191
6.22. magma_dgetrf_mic- LU factorization of a general real matrix in double precision, MIC interface / 193
6.23. magma_cgetrf_mic- LU factorization of a general complex matrix in single precision, MIC interface / 195
6.24. magma_zgetrf_mic- LU factorization of a general complex matrix in double precision, MIC interface / 196
6.25. magma_sgetrf_mmic- LU factorization of a general real matrix in single precision, multi-mic version / 198
6.26. magma_dgetrf_mmic- LU factorization of a general real matrix in double precision, multi-mic version / 201
6.27. magma_cgetrf_mmic- LU factorization of a general complex matrix in single precision, multi-mic version / 203
6.28. magma_zgetrf_mmic- LU factorization of a general complex matrix in double precision, multi-mic version / 206
6.29. magma_sgetri_mic- inverse matrix in single precision, MIC interf. / 208
6.30. mkl sgetri- inverse matrix in single precision / 210
6.31. magma_dgetri_mic- inverse matrix in double precision, MIC interf. / 212
6.32. mkl dgetri- inverse matrix in double precision / 214
6.33. magma_cgetri_mic- inverse of a complex matrix in single precision, MIC interface / 216
6.34. mkl cgetri- inverse of a complex matrix in single precision / 218
6.35. magma_zgetri_mic- inverse of a complex matrix in double precision, MIC interface / 220
6.36. mkl zgetri- inverse of a complex matrix in double precision / 222
7. Cholesky decomposition and solving systems with positive definite matrices / 225
7.1. magma_sposv- solve a system with a positive definite real matrix in single precision, CPU interface / 225
7.2. mkl sposv- solve a system with a positive definite real matrix in sin. Prec. / 227
7.3. magma_dposv- solve a system with a positive definite real matrix in double precision, CPU interface / 229
7.4. mkl dposv- solve a system with a positive definite real matrix in double precision / 231
7.5. magma_cposv- solve a system with a positive definite complex matrix in single precision, CPU interface / 232
7.6. mkl cposv- solve a system with a positive definite complex matrix in single precision / 235
7.7. magma_zposv- solve a system with a positive definite complex matrix in double precision, CPU interface / 237
7.8. mkl zposv- solve a system with a positive definite complex matrix in double precision / 239
7.9. magma_sposv_mic - solve a system with a positive definite real matrix in single precision, MIC interface / 241
7.10. magma_dposv_mic- solve a system with a positive definite real matrix in doble precision, MIC interface / 243
7.11. magma_cposv_mic- solve a system with a positive definite complex matrix in single precision, MIC interface / 245
7.12. magma_zposv_mic- solve a system with a positive definite complex matrix in double precision, MIC interface / 248
7.13. magma_spotrf- Cholesky decomposition with a positive definite matrix in single precision, CPU interface / 250
7.14. mkl spotrf- Cholesky decomposition with a positive definite matrix in single precision / 252
7.15. magma_dpotrf- Cholesky decomposition with a positive definite matrix in double precision, CPU interface / 254
7.16. mkl dpotrf- Cholesky decomposition with a positive definite matrix in double precision / 255
7.17. magma_cpotrf- Cholesky decomposition with a positive definite complex matrix in single precision, CPU interface / 257
7.18. mkl cpotrf- Cholesky decomposition with a positive definite complex matrix in single precision / 259
7.19. magma_zpotrf- Cholesky decomposition with a positive definite complex matrix in double precision, CPU interface / 261
7.20. mkl zpotrf- Cholesky decomposition with a positive definite complex matrix in double precision / 263
7.21. magma_spotrf_mic- Cholesky decomposition with a positive definite matrix in single precision, MIC interface / 265
7.22. magma_dpotrf_mic- Cholesky decomposition with a positive definite matrix in double precision, MIC interface / 267
7.23. magma_cpotrf_mic- Cholesky decomposition with a positive definite complex matrix in single precision, MIC interface / 268
7.24. magma_zpotrf_mic- Cholesky decomposition with a positive definite complex matrix in double precision, MIC interface / 270
7.25. magma_spotrf_mmic- Cholesky decomposition with a positive definite matrix in single precision, multi-mic interface / 272
7.26. magma_dpotrf_mmic- Cholesky decomposition with a positive definite matrix in double precision, multi-mic interface / 275
7.27. magma_cpotrf_mmic- Cholesky decomposition with a positive definite complex matrix in single precision, multi-mic interface / 277
7.28. magma_zpotrf_mmic- Cholesky decomposition with a positive definite complex matrix in double precision, multi-mic interface / 280
8. QR decomposition and the least squares solution of generallinear systems / 283
8.1. magma_cgels_mic- the least squares solution of a complex linearsystem using QR decomposition in single precision, MIC interface / 283
8.2. mkl cgels- the least squares solution of a complex linear systemusing QR decomposition in single precision / 285
8.3. magma_zgels_mic- the least squares solution of a complex linearsystem using QR decomposition in double precision, MIC interface / 288
8.4. mkl zgels- the least squares solution of a complex linear system using QR decomposition in double precision / 290
8.5. magma_sgeqrf- QR decomposition in single precision, CPU interf. / 292
8.6. mkl sgeqrf- QR decomposition in single precision / 294
8.7. magma_dgeqrf- QR decomposition in double precision, CPU interf. / 296
8.8. mkl dgeqrf- QR decomposition in double precision / 298
8.9. magma_cgeqrf- complex QR decomposition in single precision, CPU interf. / 299
8.10. mkl cgeqrf- complex QR decomposition in single precision / 302
8.11. magma_zgeqrf- complex QR decomposition in double prec., CPUinterf. / 303
8.12. mkl zgeqrf- complex QR decomposition in double precision / 305
8.13. magma_sgeqrf_mic- QR decomposition in single precision, MIC interf. / 307
8.14. magma_dgeqrf_mic- QR decomposition in double precision, MIC interf.  309
8.15. magma_cgeqrf_mic- complex QR decomposition in single precision, MIC interface / 311
8.16. magma_zgeqrf_mic- complex QR decomposition in double precision, MIC interface / 313
8.17. magma_sgeqrf_mmic- QR decomposition in single prec., multi-mic interf. / 315
8.18. magma_dgeqrf_mmic- QR decomposition in double precision, multi-mic interface / 318
8.19. magma_cgeqrf_mmic- complex QR decomposition in single precision, multi-mic interface / 320
8.20. magma_zgeqrf_mmic- complex QR decomposition in double precision, multi-mic interface / 323
9. Eigenvalues and eigenvectors for symmetric matrices / 327
9.1. magma_ssyevd- compute the eigenvalues and optionally eigenvec-tors of a symmetric real matrix in single precision, CPU interface / 327
9.2. mkl ssyevd- compute the eigenvalues and optionally eigenvectorsof a symmetric real matrix in single precision / 329
9.3. magma_dsyevd- compute the eigenvalues and optionally eigenvec-tors of a symmetric real matrix in double precision, CPU interface / 330
9.4. mkl dsyevd- compute the eigenvalues and optionally eigenvectorsof a symmetric real matrix in double precision / 332
9.5. magma_cheevd- compute the eigenvalues and optionally eigenvectors of a Hermitian complex matrix in single precision, CPU interface / 334
9.6. mkl cheevd- compute the eigenvalues and optionally eigenvectors of a Hermitian complex matrix in single precision / 336
9.7. magma_zheevd- compute the eigenvalues and optionally eigenvectors of a Hermitian complex matrix in double precision, CPU interface / 338
9.8. mkl zheevd- compute the eigenvalues and optionally eigenvectors of a Hermitian complex matrix in double precision / 340
10. Reduction to tridiagonal form / 342
10.1. magma_ssytrd- reduce a real symmetric matrix to symmetric tridiagonal form by an orthogonal transformation in single precision / 342
10.2. mkl ssytrd- reduce a real symmetric matrix to symmetric tridiagonal form by an orthogonal transformation in single precision / 344
10.3. magma_dsytrd- reduce a real symmetric matrix to symmetric tridiagonal form by an orthogonal transformation in double precision / 345
10.4. mkl dsytrd- reduce a real symmetric matrix to symmetric tridiagonal form by an orthogonal transformation in double precision / 347
10.5. magma_chetrd- reduce a complex Hermitian matrix to symmetric tridiag. form by an unitary transf. in single precision / 348
10.6. mkl chetrd- reduce a complex Hermitian matrix to symmetric tridiagonal form by an unitary transformation in single precision / 350
10.7. magma_zhetrd- reduce a complex Hermitian matrix to symmetric tridiag. form by an unitary transf. in double precision / 352
10.8. mkl zhetrd- reduce a complex Hermitian matrix to symmetrictridiagonal form by an unitary transformation in double precision / 354
11. Eigenvalues and eigenvectors for general matrices / 357
11.1. magma_sgeev- compute the eigenvalues and optionally eigenvectors of a general real matrix in single precision, CPU interface / 357
11.2. mkl sgeev- compute the eigenvalues and optionally eigenvectors of a general real matrix in single precision / 359
11.3. magma_dgeev- compute the eigenvalues and optionally eigenvectors of a general real matrix in double precision, CPU interfac / 360
11.4. mkl dgeev- compute the eigenvalues and optionally eigenvectors of a general real matrix in double precision / 362
11.5. magma_cgeev- compute the eigenvalues and optionally eigenvectors of a general complex matrix in single precision, CPU interface / 364
11.6. mkl cgeev- compute the eigenvalues and optionally eigenvectors of a general complex matrix in single precision / 366
11.7. magma_zgeev- compute the eigenvalues and optionally eigenvectors of a general complex matrix in double precision, CPU interface / 368
11.8. mkl zgeev- compute the eigenvalues and optionally eigenvectors of a general complex matrix in double precision / 370
12. Singular value decomposition / 373
12.1. magma_sgesvd- compute the singular value decomposition of a general real matrix in single precision, CPU interface / 373
12.2. mkl sgesvd- compute the singular value decomposition of a general real matrix in single precision / 375
12.3. magma_dgesvd- compute the singular value decomposition of a general real matrix in double precision, CPU interface / 376
12.4. mkl dgesvd- compute the singular value decomposition of a general real matrix in double precision / 378
12.5. magma_cgesvd- compute the singular value decomposition of a general complex matrix in single precision, CPU interface / 380
12.6. mkl cgesvd- compute the singular value decomposition of a general complex matrix in single precision / 382
12.7. magma_zgesvd- compute the singular value decomposition of a general complex matrix in double precision, CPU interface / 384
12.8. mkl zgesvd- compute the singular value decomposition of a general complex matrix in double precision / 386
13. Reduction to the Hessenberg form  / 389
13.1. magma_sgehrd- reduce a general matrix to the upper Hessenberg form in single precision, CPU interface / 389
13.2. mkl sgehrd - reduce a general matrix to the upper Hessenberg form in single precision / 391
13.3. magma_dgehrd- reduce a general matrix to the upper Hessenberg form in double precision, CPU interface / 392
13.4. mkl dgehrd- reduce a general matrix to the upper Hessenberg form in double precision / 394
13.5. magma_cgehrd- reduce a general complex matrix to the upper Hessenberg form in single precision, CPU interface / 396
13.6. mkl cgehrd- reduce a general complex matrix to the upper Hessenberg form in single precision / 398
13.7. magma_zgehrd- reduce a general complex matrix to the upper Hessenberg form in double precision, CPU interface / 400
13.8. mkl zgehrd- reduce a general complex matrix to the upper Hessenberg form in double precision / 402
14. Reduction to bidiagonal form / 405
14.1. magma_sgebrd- reduce a real matrix to bidiagonal form by orthogonal transformations in single precision, CPU interface / 405
14.2. mkl sgebrd- reduce a real matrix to bidiagonal form by orthogonal transformations in single precision / 407
14.3. magma_dgebrd- reduce a real matrix to bidiagonal form by orthogonal transformations in double precision, CPU interface / 408
14.4. mkl dgebrd- reduce a real matrix to bidiagonal form by orthogonal transformations in double precision / 410
14.5. magma_cgebrd- reduce a complex matrix to bidiagonal form by unitary transformations in single precision, CPU interface / 412
14.6. mkl cgebrd- reduce a complex matrix to bidiagonal form by unitary transformations in single precision / 414
14.7. magma_zgebrd- reduce a complex matrix to bidiagonal form by unitary transformations in double precision, CPU interface / 416
14.8. mkl zgebrd- reduce a complex matrix to bidiagonal form by unitary transformations in double precision / 418
Appendices / 421
A Generating random matrices / 422
B MAGMA Licence / 423
Bibliography / 424