Actual source code: petscblaslapack_caps.h

petsc-3.6.3 2015-12-03
Report Typos and Errors
  1: /*
  2:      This file deals with CAPS BLAS/LAPACK naming convention.
  3: */
  4: #if !defined(_BLASLAPACK_CAPS_H)
  5: #define _BLASLAPACK_CAPS_H

  7: #if !defined(PETSC_USE_COMPLEX)
  8: # if defined(PETSC_USE_REAL_SINGLE) || defined(PETSC_BLASLAPACK_SINGLEISDOUBLE)
  9: /* Real single precision with no character string arguments */
 10: #  define LAPACKgeqrf_ SGEQRF
 11: #  define LAPACKungqr_ SORGQR
 12: #  define LAPACKgetrf_ SGETRF
 13: #  define LAPACKgetri_ SGETRI
 14: #  define BLASdot_     SDOT
 15: #  define BLASdotu_    SDOT
 16: #  define BLASnrm2_    SNRM2
 17: #  define BLASscal_    SSCAL
 18: #  define BLAScopy_    SCOPY
 19: #  define BLASswap_    SSWAP
 20: #  define BLASaxpy_    SAXPY
 21: #  define BLASasum_    SASUM
 22: #  define LAPACKpttrf_ SPTTRF
 23: #  define LAPACKpttrs_ SPTTRS
 24: #  define LAPACKstein_ SSTEIN
 25: #  define LAPACKgesv_  SGESV
 26: #  define LAPACKgelss_ SGELSS
 27: #  define LAPACKgerfs_ SGERFS
 28: #  define LAPACKtgsen_ STGSEN
 29: /* Real single precision with character string arguments. */
 30: #  define LAPACKpotrf_ SPOTRF
 31: #  define LAPACKpotri_ SPOTRI
 32: #  define LAPACKpotrs_ SPOTRS
 33: #  define LAPACKpotri_ SPOTRI
 34: #  define LAPACKsytrf_ SSYTRF
 35: #  define LAPACKsytrs_ SSYTRS
 36: #  define LAPACKsytri_ SSYTRI
 37: #  define BLASgemv_    SGEMV
 38: #  define LAPACKgetrs_ SGETRS
 39: #  define BLAStrmv_    STRMV
 40: #  define LAPACKgesvd_ SGESVD
 41: #  define LAPACKgeev_  SGEEV
 42: #  define LAPACKsyev_  SSYEV
 43: #  define LAPACKsyevx_ SSYEVX
 44: #  define LAPACKsygv_  SSYGV
 45: #  define LAPACKsygvx_ SSYGVX
 46: #  define BLASgemm_    SGEMM
 47: #  define BLASsymm_    SSYMM
 48: #  define BLAStrsm_    STRSM
 49: #  define LAPACKstebz_ SSTEBZ
 50: #  define LAPACKsteqr_ SSTEQR  /* eigenvalues of symm tridiagonal matrix */
 51: #  define LAPACKhseqr_ SHSEQR
 52: #  define LAPACKgges_  SGGES
 53: #  define LAPACKtrsen_ STRSEN
 54: #  define LAPACKormqr_ SORMQR
 55: #  define LAPACKhgeqz_ SHGEQZ
 56: #  define LAPACKtrtrs_ STRTRS
 57: # else
 58: /* Real double precision with no character string arguments */
 59: #  define LAPACKgeqrf_ DGEQRF
 60: #  define LAPACKungqr_ DORGQR
 61: #  define LAPACKgetrf_ DGETRF
 62: #  define LAPACKgetri_ DGETRI
 63: #  define BLASdot_     DDOT
 64: #  define BLASdotu_    DDOT
 65: #  define BLASnrm2_    DNRM2
 66: #  define BLASscal_    DSCAL
 67: #  define BLAScopy_    DCOPY
 68: #  define BLASswap_    DSWAP
 69: #  define BLASaxpy_    DAXPY
 70: #  define BLASasum_    DASUM
 71: #  define LAPACKpttrf_ DPTTRF
 72: #  define LAPACKpttrs_ DPTTRS
 73: #  define LAPACKstein_ DSTEIN
 74: #  define LAPACKgesv_  DGESV
 75: #  define LAPACKgelss_ DGELSS
 76: #  define LAPACKgerfs_ DGERFS
 77: #  define LAPACKtgsen_ DTGSEN
 78: /* Real double precision with character string arguments. */
 79: #  define LAPACKpotrf_ DPOTRF
 80: #  define LAPACKpotrf_ DPOTRI
 81: #  define LAPACKpotrs_ DPOTRS
 82: #  define LAPACKpotri_ DPOTRI
 83: #  define LAPACKsytrf_ DSYTRF
 84: #  define LAPACKsytrs_ DSYTRS
 85: #  define LAPACKsytri_ DSYTRI
 86: #  define BLASgemv_    DGEMV
 87: #  define LAPACKgetrs_ DGETRS
 88: #  define BLAStrmv_    DTRMV
 89: #  define LAPACKgesvd_ DGESVD
 90: #  define LAPACKgeev_  DGEEV
 91: #  define LAPACKsyev_  DSYEV
 92: #  define LAPACKsyevx_ DSYEVX
 93: #  define LAPACKsygv_  DSYGV
 94: #  define LAPACKsygvx_ DSYGVX
 95: #  define BLASgemm_    DGEMM
 96: #  define BLASsymm_    DSYMM
 97: #  define BLAStrsm_    DTRSM
 98: #  define LAPACKstebz_ DSTEBZ
 99: #  define LAPACKsteqr_ DSTEQR
100: #  define LAPACKhseqr_ DHSEQR
101: #  define LAPACKgges_  DGGES
102: #  define LAPACKtrsen_ DTRSEN
103: #  define LAPACKormqr_ DORMQR
104: #  define LAPACKhgeqz_ DHGEQZ
105: #  define LAPACKtrtrs_ DTRTRS
106: # endif

108: #else
109: # if defined(PETSC_BLASLAPACK_SINGLEISDOUBLE)
110: /* Complex single precision with no character string arguments */
111: #  define LAPACKgeqrf_ CGEQRF
112: #  define LAPACKungqr_ CUNGQR
113: #  define LAPACKgetrf_ CGETRF
114: #  define LAPACKgetri_ CGETRI
115: /* #  define BLASdot_     CDOTC */
116: /* #  define BLASdotu_    CDOTU */
117: #  define BLASnrm2_    SCNRM2
118: #  define BLASscal_    CSCAL
119: #  define BLAScopy_    CCOPY
120: #  define BLASswap_    CSWAP
121: #  define BLASaxpy_    CAXPY
122: #  define BLASasum_    SCASUM
123: #  define LAPACKpttrf_ CPTTRF
124: #  define LAPACKstein_ CSTEIN
125: #  define LAPACKgesv_  CGESV
126: #  define LAPACKgelss_ CGELSS
127: #  define LAPACKgerfs_ CGERFS
128: #  define LAPACKtgsen_ CTGSEN
129: /* Complex single precision with character string arguments */
130: #  define LAPACKpotrf_ CPOTRF
131: #  define LAPACKpotri_ CPOTRI
132: #  define LAPACKpotrs_ CPOTRS
133: #  define LAPACKpotri_ CPOTRI
134: #  define LAPACKsytrf_ CSYTRF
135: #  define LAPACKsytrs_ CSYTRS
136: #  define LAPACKsytri_ CSYTRI
137: #  define BLASgemv_    CGEMV
138: #  define LAPACKgetrs_ CGETRS
139: #  define BLAStrmv_    CTRMV
140: #  define BLASgemm_    CGEMM
141: #  define BLASsymm_    CSYMM
142: #  define BLAStrsm_    CTRSM
143: #  define LAPACKgesvd_ CGESVD
144: #  define LAPACKgeev_  CGEEV
145: #  define LAPACKsyev_  CSYEV
146: #  define LAPACKsyevx_ CSYEVX
147: #  define LAPACKsygv_  CHEGV
148: #  define LAPACKsygvx_ CHEGVX
149: #  define LAPACKpttrs_ CPTTRS
150: /* LAPACKstebz_ does not exist for complex. */
151: #  define LAPACKsteqr_ CSTEQR
152: #  define LAPACKhseqr_ CHSEQR
153: #  define LAPACKgges_  CGGES
154: #  define LAPACKtrsen_ CTRSEN
155: #  define LAPACKormqr_ CORMQR
156: #  define LAPACKhgeqz_ CHGEQZ
157: #  define LAPACKtrtrs_ CTRTRS
158: # else
159: /* Complex double precision with no character string arguments */
160: #  define LAPACKgeqrf_ ZGEQRF
161: #  define LAPACKungqr_ ZUNGQR
162: #  define LAPACKgetrf_ ZGETRF
163: #  define LAPACKgetri_ ZGETRI
164: /* #  define BLASdot_     ZDOTC */
165: /* #  define BLASdotu_    ZDOTU */
166: #  define BLASnrm2_    DZNRM2
167: #  define BLASscal_    ZSCAL
168: #  define BLAScopy_    ZCOPY
169: #  define BLASswap_    ZSWAP
170: #  define BLASaxpy_    ZAXPY
171: #  define BLASasum_    DZASUM
172: #  define LAPACKpttrf_ ZPTTRF
173: #  define LAPACKstein_ ZSTEIN
174: #  define LAPACKgesv_  ZGESV
175: #  define LAPACKgelss_ ZGELSS
176: #  define LAPACKgerfs_ ZGERFS
177: #  define LAPACKtgsen_ ZTGSEN
178: /* Complex double precision with character string arguments */
179: #  define LAPACKpotrf_ ZPOTRF
180: #  define LAPACKpotri_ ZPOTRI
181: #  define LAPACKpotrs_ ZPOTRS
182: #  define LAPACKpotri_ ZPOTRI
183: #  define LAPACKsytrf_ ZSYTRF
184: #  define LAPACKsytrs_ ZSYTRS
185: #  define LAPACKsytri_ ZSYTRI
186: #  define BLASgemv_    ZGEMV
187: #  define LAPACKgetrs_ ZGETRS
188: #  define BLAStrmv_    ZTRMV
189: #  define BLASgemm_    ZGEMM
190: #  define BLASsymm_    ZSYMM
191: #  define BLAStrsm_    ZTRSM
192: #  define LAPACKgesvd_ ZGESVD
193: #  define LAPACKgeev_  ZGEEV
194: #  define LAPACKsyev_  ZHEEV
195: #  define LAPACKsyevx_ ZHEEVX
196: #  define LAPACKsygv_  ZHEGV
197: #  define LAPACKsygvx_ ZHEGVX
198: #  define LAPACKpttrs_ ZPTTRS
199: /* LAPACKstebz_ does not exist for complex. */
200: #  define LAPACKsteqr_ ZSTEQR
201: #  define LAPACKhseqr_ ZHSEQR
202: #  define LAPACKgges_  ZGGES
203: #  define LAPACKtrsen_ ZTRSEN
204: #  define LAPACKormqr_ ZORMQR
205: #  define LAPACKhgeqz_ ZHGEQZ
206: #  define LAPACKtrtrs_ ZTRTRS
207: # endif
208: #endif

210: #endif