Actual source code: petscblaslapack_caps.h

petsc-3.6.4 2016-04-12
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 LAPACKsytrf_ SSYTRF
 34: #  define LAPACKsytrs_ SSYTRS
 35: #  define LAPACKsytri_ SSYTRI
 36: #  define BLASgemv_    SGEMV
 37: #  define LAPACKgetrs_ SGETRS
 38: #  define BLAStrmv_    STRMV
 39: #  define LAPACKgesvd_ SGESVD
 40: #  define LAPACKgeev_  SGEEV
 41: #  define LAPACKsyev_  SSYEV
 42: #  define LAPACKsyevx_ SSYEVX
 43: #  define LAPACKsygv_  SSYGV
 44: #  define LAPACKsygvx_ SSYGVX
 45: #  define BLASgemm_    SGEMM
 46: #  define BLASsymm_    SSYMM
 47: #  define BLAStrsm_    STRSM
 48: #  define LAPACKstebz_ SSTEBZ
 49: #  define LAPACKsteqr_ SSTEQR  /* eigenvalues of symm tridiagonal matrix */
 50: #  define LAPACKhseqr_ SHSEQR
 51: #  define LAPACKgges_  SGGES
 52: #  define LAPACKtrsen_ STRSEN
 53: #  define LAPACKormqr_ SORMQR
 54: #  define LAPACKhgeqz_ SHGEQZ
 55: #  define LAPACKtrtrs_ STRTRS
 56: # else
 57: /* Real double precision with no character string arguments */
 58: #  define LAPACKgeqrf_ DGEQRF
 59: #  define LAPACKungqr_ DORGQR
 60: #  define LAPACKgetrf_ DGETRF
 61: #  define LAPACKgetri_ DGETRI
 62: #  define BLASdot_     DDOT
 63: #  define BLASdotu_    DDOT
 64: #  define BLASnrm2_    DNRM2
 65: #  define BLASscal_    DSCAL
 66: #  define BLAScopy_    DCOPY
 67: #  define BLASswap_    DSWAP
 68: #  define BLASaxpy_    DAXPY
 69: #  define BLASasum_    DASUM
 70: #  define LAPACKpttrf_ DPTTRF
 71: #  define LAPACKpttrs_ DPTTRS
 72: #  define LAPACKstein_ DSTEIN
 73: #  define LAPACKgesv_  DGESV
 74: #  define LAPACKgelss_ DGELSS
 75: #  define LAPACKgerfs_ DGERFS
 76: #  define LAPACKtgsen_ DTGSEN
 77: /* Real double precision with character string arguments. */
 78: #  define LAPACKpotrf_ DPOTRF
 79: #  define LAPACKpotri_ DPOTRI
 80: #  define LAPACKpotrs_ DPOTRS
 81: #  define LAPACKsytrf_ DSYTRF
 82: #  define LAPACKsytrs_ DSYTRS
 83: #  define LAPACKsytri_ DSYTRI
 84: #  define BLASgemv_    DGEMV
 85: #  define LAPACKgetrs_ DGETRS
 86: #  define BLAStrmv_    DTRMV
 87: #  define LAPACKgesvd_ DGESVD
 88: #  define LAPACKgeev_  DGEEV
 89: #  define LAPACKsyev_  DSYEV
 90: #  define LAPACKsyevx_ DSYEVX
 91: #  define LAPACKsygv_  DSYGV
 92: #  define LAPACKsygvx_ DSYGVX
 93: #  define BLASgemm_    DGEMM
 94: #  define BLASsymm_    DSYMM
 95: #  define BLAStrsm_    DTRSM
 96: #  define LAPACKstebz_ DSTEBZ
 97: #  define LAPACKsteqr_ DSTEQR
 98: #  define LAPACKhseqr_ DHSEQR
 99: #  define LAPACKgges_  DGGES
100: #  define LAPACKtrsen_ DTRSEN
101: #  define LAPACKormqr_ DORMQR
102: #  define LAPACKhgeqz_ DHGEQZ
103: #  define LAPACKtrtrs_ DTRTRS
104: # endif

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

206: #endif