cython_blas.pyx 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192
  1. # This file was generated by _generate_pyx.py.
  2. # Do not edit this file directly.
  3. # cython: boundscheck = False
  4. # cython: wraparound = False
  5. # cython: cdivision = True
  6. """
  7. BLAS Functions for Cython
  8. =========================
  9. Usable from Cython via::
  10. cimport scipy.linalg.cython_blas
  11. These wrappers do not check for alignment of arrays.
  12. Alignment should be checked before these wrappers are used.
  13. Raw function pointers (Fortran-style pointer arguments):
  14. - caxpy
  15. - ccopy
  16. - cdotc
  17. - cdotu
  18. - cgbmv
  19. - cgemm
  20. - cgemv
  21. - cgerc
  22. - cgeru
  23. - chbmv
  24. - chemm
  25. - chemv
  26. - cher
  27. - cher2
  28. - cher2k
  29. - cherk
  30. - chpmv
  31. - chpr
  32. - chpr2
  33. - crotg
  34. - cscal
  35. - csrot
  36. - csscal
  37. - cswap
  38. - csymm
  39. - csyr2k
  40. - csyrk
  41. - ctbmv
  42. - ctbsv
  43. - ctpmv
  44. - ctpsv
  45. - ctrmm
  46. - ctrmv
  47. - ctrsm
  48. - ctrsv
  49. - dasum
  50. - daxpy
  51. - dcabs1
  52. - dcopy
  53. - ddot
  54. - dgbmv
  55. - dgemm
  56. - dgemv
  57. - dger
  58. - dnrm2
  59. - drot
  60. - drotg
  61. - drotm
  62. - drotmg
  63. - dsbmv
  64. - dscal
  65. - dsdot
  66. - dspmv
  67. - dspr
  68. - dspr2
  69. - dswap
  70. - dsymm
  71. - dsymv
  72. - dsyr
  73. - dsyr2
  74. - dsyr2k
  75. - dsyrk
  76. - dtbmv
  77. - dtbsv
  78. - dtpmv
  79. - dtpsv
  80. - dtrmm
  81. - dtrmv
  82. - dtrsm
  83. - dtrsv
  84. - dzasum
  85. - dznrm2
  86. - icamax
  87. - idamax
  88. - isamax
  89. - izamax
  90. - lsame
  91. - sasum
  92. - saxpy
  93. - scasum
  94. - scnrm2
  95. - scopy
  96. - sdot
  97. - sdsdot
  98. - sgbmv
  99. - sgemm
  100. - sgemv
  101. - sger
  102. - snrm2
  103. - srot
  104. - srotg
  105. - srotm
  106. - srotmg
  107. - ssbmv
  108. - sscal
  109. - sspmv
  110. - sspr
  111. - sspr2
  112. - sswap
  113. - ssymm
  114. - ssymv
  115. - ssyr
  116. - ssyr2
  117. - ssyr2k
  118. - ssyrk
  119. - stbmv
  120. - stbsv
  121. - stpmv
  122. - stpsv
  123. - strmm
  124. - strmv
  125. - strsm
  126. - strsv
  127. - zaxpy
  128. - zcopy
  129. - zdotc
  130. - zdotu
  131. - zdrot
  132. - zdscal
  133. - zgbmv
  134. - zgemm
  135. - zgemv
  136. - zgerc
  137. - zgeru
  138. - zhbmv
  139. - zhemm
  140. - zhemv
  141. - zher
  142. - zher2
  143. - zher2k
  144. - zherk
  145. - zhpmv
  146. - zhpr
  147. - zhpr2
  148. - zrotg
  149. - zscal
  150. - zswap
  151. - zsymm
  152. - zsyr2k
  153. - zsyrk
  154. - ztbmv
  155. - ztbsv
  156. - ztpmv
  157. - ztpsv
  158. - ztrmm
  159. - ztrmv
  160. - ztrsm
  161. - ztrsv
  162. """
  163. # Within SciPy, these wrappers can be used via relative or absolute cimport.
  164. # Examples:
  165. # from ..linalg cimport cython_blas
  166. # from scipy.linalg cimport cython_blas
  167. # cimport scipy.linalg.cython_blas as cython_blas
  168. # cimport ..linalg.cython_blas as cython_blas
  169. # Within SciPy, if BLAS functions are needed in C/C++/Fortran,
  170. # these wrappers should not be used.
  171. # The original libraries should be linked directly.
  172. cdef extern from "fortran_defs.h":
  173. pass
  174. from numpy cimport npy_complex64, npy_complex128
  175. cdef extern from "_blas_subroutines.h":
  176. void _fortran_cdotc "F_FUNC(cdotcwrp, CDOTCWRP)"(c *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
  177. cdef c cdotc(int *n, c *cx, int *incx, c *cy, int *incy) nogil:
  178. cdef c out
  179. _fortran_cdotc(&out, n, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy)
  180. return out
  181. cdef extern from "_blas_subroutines.h":
  182. void _fortran_cdotu "F_FUNC(cdotuwrp, CDOTUWRP)"(c *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
  183. cdef c cdotu(int *n, c *cx, int *incx, c *cy, int *incy) nogil:
  184. cdef c out
  185. _fortran_cdotu(&out, n, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy)
  186. return out
  187. cdef extern from "_blas_subroutines.h":
  188. void _fortran_dasum "F_FUNC(dasumwrp, DASUMWRP)"(d *out, int *n, d *dx, int *incx) nogil
  189. cdef d dasum(int *n, d *dx, int *incx) nogil:
  190. cdef d out
  191. _fortran_dasum(&out, n, dx, incx)
  192. return out
  193. cdef extern from "_blas_subroutines.h":
  194. void _fortran_dcabs1 "F_FUNC(dcabs1wrp, DCABS1WRP)"(d *out, npy_complex128 *z) nogil
  195. cdef d dcabs1(z *z) nogil:
  196. cdef d out
  197. _fortran_dcabs1(&out, <npy_complex128*>z)
  198. return out
  199. cdef extern from "_blas_subroutines.h":
  200. void _fortran_ddot "F_FUNC(ddotwrp, DDOTWRP)"(d *out, int *n, d *dx, int *incx, d *dy, int *incy) nogil
  201. cdef d ddot(int *n, d *dx, int *incx, d *dy, int *incy) nogil:
  202. cdef d out
  203. _fortran_ddot(&out, n, dx, incx, dy, incy)
  204. return out
  205. cdef extern from "_blas_subroutines.h":
  206. void _fortran_dnrm2 "F_FUNC(dnrm2wrp, DNRM2WRP)"(d *out, int *n, d *x, int *incx) nogil
  207. cdef d dnrm2(int *n, d *x, int *incx) nogil:
  208. cdef d out
  209. _fortran_dnrm2(&out, n, x, incx)
  210. return out
  211. cdef extern from "_blas_subroutines.h":
  212. void _fortran_dsdot "F_FUNC(dsdotwrp, DSDOTWRP)"(d *out, int *n, s *sx, int *incx, s *sy, int *incy) nogil
  213. cdef d dsdot(int *n, s *sx, int *incx, s *sy, int *incy) nogil:
  214. cdef d out
  215. _fortran_dsdot(&out, n, sx, incx, sy, incy)
  216. return out
  217. cdef extern from "_blas_subroutines.h":
  218. void _fortran_dzasum "F_FUNC(dzasumwrp, DZASUMWRP)"(d *out, int *n, npy_complex128 *zx, int *incx) nogil
  219. cdef d dzasum(int *n, z *zx, int *incx) nogil:
  220. cdef d out
  221. _fortran_dzasum(&out, n, <npy_complex128*>zx, incx)
  222. return out
  223. cdef extern from "_blas_subroutines.h":
  224. void _fortran_dznrm2 "F_FUNC(dznrm2wrp, DZNRM2WRP)"(d *out, int *n, npy_complex128 *x, int *incx) nogil
  225. cdef d dznrm2(int *n, z *x, int *incx) nogil:
  226. cdef d out
  227. _fortran_dznrm2(&out, n, <npy_complex128*>x, incx)
  228. return out
  229. cdef extern from "_blas_subroutines.h":
  230. void _fortran_icamax "F_FUNC(icamaxwrp, ICAMAXWRP)"(int *out, int *n, npy_complex64 *cx, int *incx) nogil
  231. cdef int icamax(int *n, c *cx, int *incx) nogil:
  232. cdef int out
  233. _fortran_icamax(&out, n, <npy_complex64*>cx, incx)
  234. return out
  235. cdef extern from "_blas_subroutines.h":
  236. void _fortran_idamax "F_FUNC(idamaxwrp, IDAMAXWRP)"(int *out, int *n, d *dx, int *incx) nogil
  237. cdef int idamax(int *n, d *dx, int *incx) nogil:
  238. cdef int out
  239. _fortran_idamax(&out, n, dx, incx)
  240. return out
  241. cdef extern from "_blas_subroutines.h":
  242. void _fortran_isamax "F_FUNC(isamaxwrp, ISAMAXWRP)"(int *out, int *n, s *sx, int *incx) nogil
  243. cdef int isamax(int *n, s *sx, int *incx) nogil:
  244. cdef int out
  245. _fortran_isamax(&out, n, sx, incx)
  246. return out
  247. cdef extern from "_blas_subroutines.h":
  248. void _fortran_izamax "F_FUNC(izamaxwrp, IZAMAXWRP)"(int *out, int *n, npy_complex128 *zx, int *incx) nogil
  249. cdef int izamax(int *n, z *zx, int *incx) nogil:
  250. cdef int out
  251. _fortran_izamax(&out, n, <npy_complex128*>zx, incx)
  252. return out
  253. cdef extern from "_blas_subroutines.h":
  254. void _fortran_lsame "F_FUNC(lsamewrp, LSAMEWRP)"(bint *out, char *ca, char *cb) nogil
  255. cdef bint lsame(char *ca, char *cb) nogil:
  256. cdef bint out
  257. _fortran_lsame(&out, ca, cb)
  258. return out
  259. cdef extern from "_blas_subroutines.h":
  260. void _fortran_sasum "F_FUNC(sasumwrp, SASUMWRP)"(s *out, int *n, s *sx, int *incx) nogil
  261. cdef s sasum(int *n, s *sx, int *incx) nogil:
  262. cdef s out
  263. _fortran_sasum(&out, n, sx, incx)
  264. return out
  265. cdef extern from "_blas_subroutines.h":
  266. void _fortran_scasum "F_FUNC(scasumwrp, SCASUMWRP)"(s *out, int *n, npy_complex64 *cx, int *incx) nogil
  267. cdef s scasum(int *n, c *cx, int *incx) nogil:
  268. cdef s out
  269. _fortran_scasum(&out, n, <npy_complex64*>cx, incx)
  270. return out
  271. cdef extern from "_blas_subroutines.h":
  272. void _fortran_scnrm2 "F_FUNC(scnrm2wrp, SCNRM2WRP)"(s *out, int *n, npy_complex64 *x, int *incx) nogil
  273. cdef s scnrm2(int *n, c *x, int *incx) nogil:
  274. cdef s out
  275. _fortran_scnrm2(&out, n, <npy_complex64*>x, incx)
  276. return out
  277. cdef extern from "_blas_subroutines.h":
  278. void _fortran_sdot "F_FUNC(sdotwrp, SDOTWRP)"(s *out, int *n, s *sx, int *incx, s *sy, int *incy) nogil
  279. cdef s sdot(int *n, s *sx, int *incx, s *sy, int *incy) nogil:
  280. cdef s out
  281. _fortran_sdot(&out, n, sx, incx, sy, incy)
  282. return out
  283. cdef extern from "_blas_subroutines.h":
  284. void _fortran_sdsdot "F_FUNC(sdsdotwrp, SDSDOTWRP)"(s *out, int *n, s *sb, s *sx, int *incx, s *sy, int *incy) nogil
  285. cdef s sdsdot(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) nogil:
  286. cdef s out
  287. _fortran_sdsdot(&out, n, sb, sx, incx, sy, incy)
  288. return out
  289. cdef extern from "_blas_subroutines.h":
  290. void _fortran_snrm2 "F_FUNC(snrm2wrp, SNRM2WRP)"(s *out, int *n, s *x, int *incx) nogil
  291. cdef s snrm2(int *n, s *x, int *incx) nogil:
  292. cdef s out
  293. _fortran_snrm2(&out, n, x, incx)
  294. return out
  295. cdef extern from "_blas_subroutines.h":
  296. void _fortran_zdotc "F_FUNC(zdotcwrp, ZDOTCWRP)"(z *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
  297. cdef z zdotc(int *n, z *zx, int *incx, z *zy, int *incy) nogil:
  298. cdef z out
  299. _fortran_zdotc(&out, n, <npy_complex128*>zx, incx, <npy_complex128*>zy, incy)
  300. return out
  301. cdef extern from "_blas_subroutines.h":
  302. void _fortran_zdotu "F_FUNC(zdotuwrp, ZDOTUWRP)"(z *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
  303. cdef z zdotu(int *n, z *zx, int *incx, z *zy, int *incy) nogil:
  304. cdef z out
  305. _fortran_zdotu(&out, n, <npy_complex128*>zx, incx, <npy_complex128*>zy, incy)
  306. return out
  307. cdef extern from "_blas_subroutines.h":
  308. void _fortran_caxpy "F_FUNC(caxpy,CAXPY)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
  309. cdef void caxpy(int *n, c *ca, c *cx, int *incx, c *cy, int *incy) nogil:
  310. _fortran_caxpy(n, <npy_complex64*>ca, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy)
  311. cdef extern from "_blas_subroutines.h":
  312. void _fortran_ccopy "F_FUNC(ccopy,CCOPY)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
  313. cdef void ccopy(int *n, c *cx, int *incx, c *cy, int *incy) nogil:
  314. _fortran_ccopy(n, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy)
  315. cdef extern from "_blas_subroutines.h":
  316. void _fortran_cgbmv "F_FUNC(cgbmv,CGBMV)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
  317. cdef void cgbmv(char *trans, int *m, int *n, int *kl, int *ku, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) nogil:
  318. _fortran_cgbmv(trans, m, n, kl, ku, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>x, incx, <npy_complex64*>beta, <npy_complex64*>y, incy)
  319. cdef extern from "_blas_subroutines.h":
  320. void _fortran_cgemm "F_FUNC(cgemm,CGEMM)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
  321. cdef void cgemm(char *transa, char *transb, int *m, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) nogil:
  322. _fortran_cgemm(transa, transb, m, n, k, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb, <npy_complex64*>beta, <npy_complex64*>c, ldc)
  323. cdef extern from "_blas_subroutines.h":
  324. void _fortran_cgemv "F_FUNC(cgemv,CGEMV)"(char *trans, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
  325. cdef void cgemv(char *trans, int *m, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) nogil:
  326. _fortran_cgemv(trans, m, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>x, incx, <npy_complex64*>beta, <npy_complex64*>y, incy)
  327. cdef extern from "_blas_subroutines.h":
  328. void _fortran_cgerc "F_FUNC(cgerc,CGERC)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
  329. cdef void cgerc(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) nogil:
  330. _fortran_cgerc(m, n, <npy_complex64*>alpha, <npy_complex64*>x, incx, <npy_complex64*>y, incy, <npy_complex64*>a, lda)
  331. cdef extern from "_blas_subroutines.h":
  332. void _fortran_cgeru "F_FUNC(cgeru,CGERU)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
  333. cdef void cgeru(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) nogil:
  334. _fortran_cgeru(m, n, <npy_complex64*>alpha, <npy_complex64*>x, incx, <npy_complex64*>y, incy, <npy_complex64*>a, lda)
  335. cdef extern from "_blas_subroutines.h":
  336. void _fortran_chbmv "F_FUNC(chbmv,CHBMV)"(char *uplo, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
  337. cdef void chbmv(char *uplo, int *n, int *k, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) nogil:
  338. _fortran_chbmv(uplo, n, k, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>x, incx, <npy_complex64*>beta, <npy_complex64*>y, incy)
  339. cdef extern from "_blas_subroutines.h":
  340. void _fortran_chemm "F_FUNC(chemm,CHEMM)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
  341. cdef void chemm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) nogil:
  342. _fortran_chemm(side, uplo, m, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb, <npy_complex64*>beta, <npy_complex64*>c, ldc)
  343. cdef extern from "_blas_subroutines.h":
  344. void _fortran_chemv "F_FUNC(chemv,CHEMV)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
  345. cdef void chemv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) nogil:
  346. _fortran_chemv(uplo, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>x, incx, <npy_complex64*>beta, <npy_complex64*>y, incy)
  347. cdef extern from "_blas_subroutines.h":
  348. void _fortran_cher "F_FUNC(cher,CHER)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda) nogil
  349. cdef void cher(char *uplo, int *n, s *alpha, c *x, int *incx, c *a, int *lda) nogil:
  350. _fortran_cher(uplo, n, alpha, <npy_complex64*>x, incx, <npy_complex64*>a, lda)
  351. cdef extern from "_blas_subroutines.h":
  352. void _fortran_cher2 "F_FUNC(cher2,CHER2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
  353. cdef void cher2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) nogil:
  354. _fortran_cher2(uplo, n, <npy_complex64*>alpha, <npy_complex64*>x, incx, <npy_complex64*>y, incy, <npy_complex64*>a, lda)
  355. cdef extern from "_blas_subroutines.h":
  356. void _fortran_cher2k "F_FUNC(cher2k,CHER2K)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *beta, npy_complex64 *c, int *ldc) nogil
  357. cdef void cher2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, s *beta, c *c, int *ldc) nogil:
  358. _fortran_cher2k(uplo, trans, n, k, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb, beta, <npy_complex64*>c, ldc)
  359. cdef extern from "_blas_subroutines.h":
  360. void _fortran_cherk "F_FUNC(cherk,CHERK)"(char *uplo, char *trans, int *n, int *k, s *alpha, npy_complex64 *a, int *lda, s *beta, npy_complex64 *c, int *ldc) nogil
  361. cdef void cherk(char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c, int *ldc) nogil:
  362. _fortran_cherk(uplo, trans, n, k, alpha, <npy_complex64*>a, lda, beta, <npy_complex64*>c, ldc)
  363. cdef extern from "_blas_subroutines.h":
  364. void _fortran_chpmv "F_FUNC(chpmv,CHPMV)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
  365. cdef void chpmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) nogil:
  366. _fortran_chpmv(uplo, n, <npy_complex64*>alpha, <npy_complex64*>ap, <npy_complex64*>x, incx, <npy_complex64*>beta, <npy_complex64*>y, incy)
  367. cdef extern from "_blas_subroutines.h":
  368. void _fortran_chpr "F_FUNC(chpr,CHPR)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap) nogil
  369. cdef void chpr(char *uplo, int *n, s *alpha, c *x, int *incx, c *ap) nogil:
  370. _fortran_chpr(uplo, n, alpha, <npy_complex64*>x, incx, <npy_complex64*>ap)
  371. cdef extern from "_blas_subroutines.h":
  372. void _fortran_chpr2 "F_FUNC(chpr2,CHPR2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *ap) nogil
  373. cdef void chpr2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *ap) nogil:
  374. _fortran_chpr2(uplo, n, <npy_complex64*>alpha, <npy_complex64*>x, incx, <npy_complex64*>y, incy, <npy_complex64*>ap)
  375. cdef extern from "_blas_subroutines.h":
  376. void _fortran_crotg "F_FUNC(crotg,CROTG)"(npy_complex64 *ca, npy_complex64 *cb, s *c, npy_complex64 *s) nogil
  377. cdef void crotg(c *ca, c *cb, s *c, c *s) nogil:
  378. _fortran_crotg(<npy_complex64*>ca, <npy_complex64*>cb, c, <npy_complex64*>s)
  379. cdef extern from "_blas_subroutines.h":
  380. void _fortran_cscal "F_FUNC(cscal,CSCAL)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx) nogil
  381. cdef void cscal(int *n, c *ca, c *cx, int *incx) nogil:
  382. _fortran_cscal(n, <npy_complex64*>ca, <npy_complex64*>cx, incx)
  383. cdef extern from "_blas_subroutines.h":
  384. void _fortran_csrot "F_FUNC(csrot,CSROT)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, s *c, s *s) nogil
  385. cdef void csrot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, s *s) nogil:
  386. _fortran_csrot(n, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy, c, s)
  387. cdef extern from "_blas_subroutines.h":
  388. void _fortran_csscal "F_FUNC(csscal,CSSCAL)"(int *n, s *sa, npy_complex64 *cx, int *incx) nogil
  389. cdef void csscal(int *n, s *sa, c *cx, int *incx) nogil:
  390. _fortran_csscal(n, sa, <npy_complex64*>cx, incx)
  391. cdef extern from "_blas_subroutines.h":
  392. void _fortran_cswap "F_FUNC(cswap,CSWAP)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
  393. cdef void cswap(int *n, c *cx, int *incx, c *cy, int *incy) nogil:
  394. _fortran_cswap(n, <npy_complex64*>cx, incx, <npy_complex64*>cy, incy)
  395. cdef extern from "_blas_subroutines.h":
  396. void _fortran_csymm "F_FUNC(csymm,CSYMM)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
  397. cdef void csymm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) nogil:
  398. _fortran_csymm(side, uplo, m, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb, <npy_complex64*>beta, <npy_complex64*>c, ldc)
  399. cdef extern from "_blas_subroutines.h":
  400. void _fortran_csyr2k "F_FUNC(csyr2k,CSYR2K)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
  401. cdef void csyr2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) nogil:
  402. _fortran_csyr2k(uplo, trans, n, k, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb, <npy_complex64*>beta, <npy_complex64*>c, ldc)
  403. cdef extern from "_blas_subroutines.h":
  404. void _fortran_csyrk "F_FUNC(csyrk,CSYRK)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
  405. cdef void csyrk(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *beta, c *c, int *ldc) nogil:
  406. _fortran_csyrk(uplo, trans, n, k, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>beta, <npy_complex64*>c, ldc)
  407. cdef extern from "_blas_subroutines.h":
  408. void _fortran_ctbmv "F_FUNC(ctbmv,CTBMV)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
  409. cdef void ctbmv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) nogil:
  410. _fortran_ctbmv(uplo, trans, diag, n, k, <npy_complex64*>a, lda, <npy_complex64*>x, incx)
  411. cdef extern from "_blas_subroutines.h":
  412. void _fortran_ctbsv "F_FUNC(ctbsv,CTBSV)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
  413. cdef void ctbsv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) nogil:
  414. _fortran_ctbsv(uplo, trans, diag, n, k, <npy_complex64*>a, lda, <npy_complex64*>x, incx)
  415. cdef extern from "_blas_subroutines.h":
  416. void _fortran_ctpmv "F_FUNC(ctpmv,CTPMV)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil
  417. cdef void ctpmv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) nogil:
  418. _fortran_ctpmv(uplo, trans, diag, n, <npy_complex64*>ap, <npy_complex64*>x, incx)
  419. cdef extern from "_blas_subroutines.h":
  420. void _fortran_ctpsv "F_FUNC(ctpsv,CTPSV)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil
  421. cdef void ctpsv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) nogil:
  422. _fortran_ctpsv(uplo, trans, diag, n, <npy_complex64*>ap, <npy_complex64*>x, incx)
  423. cdef extern from "_blas_subroutines.h":
  424. void _fortran_ctrmm "F_FUNC(ctrmm,CTRMM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil
  425. cdef void ctrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) nogil:
  426. _fortran_ctrmm(side, uplo, transa, diag, m, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb)
  427. cdef extern from "_blas_subroutines.h":
  428. void _fortran_ctrmv "F_FUNC(ctrmv,CTRMV)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
  429. cdef void ctrmv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) nogil:
  430. _fortran_ctrmv(uplo, trans, diag, n, <npy_complex64*>a, lda, <npy_complex64*>x, incx)
  431. cdef extern from "_blas_subroutines.h":
  432. void _fortran_ctrsm "F_FUNC(ctrsm,CTRSM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil
  433. cdef void ctrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) nogil:
  434. _fortran_ctrsm(side, uplo, transa, diag, m, n, <npy_complex64*>alpha, <npy_complex64*>a, lda, <npy_complex64*>b, ldb)
  435. cdef extern from "_blas_subroutines.h":
  436. void _fortran_ctrsv "F_FUNC(ctrsv,CTRSV)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
  437. cdef void ctrsv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) nogil:
  438. _fortran_ctrsv(uplo, trans, diag, n, <npy_complex64*>a, lda, <npy_complex64*>x, incx)
  439. cdef extern from "_blas_subroutines.h":
  440. void _fortran_daxpy "F_FUNC(daxpy,DAXPY)"(int *n, d *da, d *dx, int *incx, d *dy, int *incy) nogil
  441. cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) nogil:
  442. _fortran_daxpy(n, da, dx, incx, dy, incy)
  443. cdef extern from "_blas_subroutines.h":
  444. void _fortran_dcopy "F_FUNC(dcopy,DCOPY)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil
  445. cdef void dcopy(int *n, d *dx, int *incx, d *dy, int *incy) nogil:
  446. _fortran_dcopy(n, dx, incx, dy, incy)
  447. cdef extern from "_blas_subroutines.h":
  448. void _fortran_dgbmv "F_FUNC(dgbmv,DGBMV)"(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
  449. cdef void dgbmv(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil:
  450. _fortran_dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
  451. cdef extern from "_blas_subroutines.h":
  452. void _fortran_dgemm "F_FUNC(dgemm,DGEMM)"(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
  453. cdef void dgemm(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil:
  454. _fortran_dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
  455. cdef extern from "_blas_subroutines.h":
  456. void _fortran_dgemv "F_FUNC(dgemv,DGEMV)"(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
  457. cdef void dgemv(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil:
  458. _fortran_dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
  459. cdef extern from "_blas_subroutines.h":
  460. void _fortran_dger "F_FUNC(dger,DGER)"(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil
  461. cdef void dger(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil:
  462. _fortran_dger(m, n, alpha, x, incx, y, incy, a, lda)
  463. cdef extern from "_blas_subroutines.h":
  464. void _fortran_drot "F_FUNC(drot,DROT)"(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) nogil
  465. cdef void drot(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) nogil:
  466. _fortran_drot(n, dx, incx, dy, incy, c, s)
  467. cdef extern from "_blas_subroutines.h":
  468. void _fortran_drotg "F_FUNC(drotg,DROTG)"(d *da, d *db, d *c, d *s) nogil
  469. cdef void drotg(d *da, d *db, d *c, d *s) nogil:
  470. _fortran_drotg(da, db, c, s)
  471. cdef extern from "_blas_subroutines.h":
  472. void _fortran_drotm "F_FUNC(drotm,DROTM)"(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) nogil
  473. cdef void drotm(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) nogil:
  474. _fortran_drotm(n, dx, incx, dy, incy, dparam)
  475. cdef extern from "_blas_subroutines.h":
  476. void _fortran_drotmg "F_FUNC(drotmg,DROTMG)"(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) nogil
  477. cdef void drotmg(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) nogil:
  478. _fortran_drotmg(dd1, dd2, dx1, dy1, dparam)
  479. cdef extern from "_blas_subroutines.h":
  480. void _fortran_dsbmv "F_FUNC(dsbmv,DSBMV)"(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
  481. cdef void dsbmv(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil:
  482. _fortran_dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
  483. cdef extern from "_blas_subroutines.h":
  484. void _fortran_dscal "F_FUNC(dscal,DSCAL)"(int *n, d *da, d *dx, int *incx) nogil
  485. cdef void dscal(int *n, d *da, d *dx, int *incx) nogil:
  486. _fortran_dscal(n, da, dx, incx)
  487. cdef extern from "_blas_subroutines.h":
  488. void _fortran_dspmv "F_FUNC(dspmv,DSPMV)"(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) nogil
  489. cdef void dspmv(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) nogil:
  490. _fortran_dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
  491. cdef extern from "_blas_subroutines.h":
  492. void _fortran_dspr "F_FUNC(dspr,DSPR)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) nogil
  493. cdef void dspr(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) nogil:
  494. _fortran_dspr(uplo, n, alpha, x, incx, ap)
  495. cdef extern from "_blas_subroutines.h":
  496. void _fortran_dspr2 "F_FUNC(dspr2,DSPR2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) nogil
  497. cdef void dspr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) nogil:
  498. _fortran_dspr2(uplo, n, alpha, x, incx, y, incy, ap)
  499. cdef extern from "_blas_subroutines.h":
  500. void _fortran_dswap "F_FUNC(dswap,DSWAP)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil
  501. cdef void dswap(int *n, d *dx, int *incx, d *dy, int *incy) nogil:
  502. _fortran_dswap(n, dx, incx, dy, incy)
  503. cdef extern from "_blas_subroutines.h":
  504. void _fortran_dsymm "F_FUNC(dsymm,DSYMM)"(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
  505. cdef void dsymm(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil:
  506. _fortran_dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
  507. cdef extern from "_blas_subroutines.h":
  508. void _fortran_dsymv "F_FUNC(dsymv,DSYMV)"(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
  509. cdef void dsymv(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil:
  510. _fortran_dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
  511. cdef extern from "_blas_subroutines.h":
  512. void _fortran_dsyr "F_FUNC(dsyr,DSYR)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) nogil
  513. cdef void dsyr(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) nogil:
  514. _fortran_dsyr(uplo, n, alpha, x, incx, a, lda)
  515. cdef extern from "_blas_subroutines.h":
  516. void _fortran_dsyr2 "F_FUNC(dsyr2,DSYR2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil
  517. cdef void dsyr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil:
  518. _fortran_dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
  519. cdef extern from "_blas_subroutines.h":
  520. void _fortran_dsyr2k "F_FUNC(dsyr2k,DSYR2K)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
  521. cdef void dsyr2k(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil:
  522. _fortran_dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
  523. cdef extern from "_blas_subroutines.h":
  524. void _fortran_dsyrk "F_FUNC(dsyrk,DSYRK)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) nogil
  525. cdef void dsyrk(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) nogil:
  526. _fortran_dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
  527. cdef extern from "_blas_subroutines.h":
  528. void _fortran_dtbmv "F_FUNC(dtbmv,DTBMV)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil
  529. cdef void dtbmv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil:
  530. _fortran_dtbmv(uplo, trans, diag, n, k, a, lda, x, incx)
  531. cdef extern from "_blas_subroutines.h":
  532. void _fortran_dtbsv "F_FUNC(dtbsv,DTBSV)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil
  533. cdef void dtbsv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil:
  534. _fortran_dtbsv(uplo, trans, diag, n, k, a, lda, x, incx)
  535. cdef extern from "_blas_subroutines.h":
  536. void _fortran_dtpmv "F_FUNC(dtpmv,DTPMV)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil
  537. cdef void dtpmv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil:
  538. _fortran_dtpmv(uplo, trans, diag, n, ap, x, incx)
  539. cdef extern from "_blas_subroutines.h":
  540. void _fortran_dtpsv "F_FUNC(dtpsv,DTPSV)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil
  541. cdef void dtpsv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil:
  542. _fortran_dtpsv(uplo, trans, diag, n, ap, x, incx)
  543. cdef extern from "_blas_subroutines.h":
  544. void _fortran_dtrmm "F_FUNC(dtrmm,DTRMM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil
  545. cdef void dtrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil:
  546. _fortran_dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
  547. cdef extern from "_blas_subroutines.h":
  548. void _fortran_dtrmv "F_FUNC(dtrmv,DTRMV)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil
  549. cdef void dtrmv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil:
  550. _fortran_dtrmv(uplo, trans, diag, n, a, lda, x, incx)
  551. cdef extern from "_blas_subroutines.h":
  552. void _fortran_dtrsm "F_FUNC(dtrsm,DTRSM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil
  553. cdef void dtrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil:
  554. _fortran_dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
  555. cdef extern from "_blas_subroutines.h":
  556. void _fortran_dtrsv "F_FUNC(dtrsv,DTRSV)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil
  557. cdef void dtrsv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil:
  558. _fortran_dtrsv(uplo, trans, diag, n, a, lda, x, incx)
  559. cdef extern from "_blas_subroutines.h":
  560. void _fortran_saxpy "F_FUNC(saxpy,SAXPY)"(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) nogil
  561. cdef void saxpy(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) nogil:
  562. _fortran_saxpy(n, sa, sx, incx, sy, incy)
  563. cdef extern from "_blas_subroutines.h":
  564. void _fortran_scopy "F_FUNC(scopy,SCOPY)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
  565. cdef void scopy(int *n, s *sx, int *incx, s *sy, int *incy) nogil:
  566. _fortran_scopy(n, sx, incx, sy, incy)
  567. cdef extern from "_blas_subroutines.h":
  568. void _fortran_sgbmv "F_FUNC(sgbmv,SGBMV)"(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
  569. cdef void sgbmv(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil:
  570. _fortran_sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
  571. cdef extern from "_blas_subroutines.h":
  572. void _fortran_sgemm "F_FUNC(sgemm,SGEMM)"(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
  573. cdef void sgemm(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil:
  574. _fortran_sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
  575. cdef extern from "_blas_subroutines.h":
  576. void _fortran_sgemv "F_FUNC(sgemv,SGEMV)"(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
  577. cdef void sgemv(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil:
  578. _fortran_sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
  579. cdef extern from "_blas_subroutines.h":
  580. void _fortran_sger "F_FUNC(sger,SGER)"(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil
  581. cdef void sger(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil:
  582. _fortran_sger(m, n, alpha, x, incx, y, incy, a, lda)
  583. cdef extern from "_blas_subroutines.h":
  584. void _fortran_srot "F_FUNC(srot,SROT)"(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) nogil
  585. cdef void srot(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) nogil:
  586. _fortran_srot(n, sx, incx, sy, incy, c, s)
  587. cdef extern from "_blas_subroutines.h":
  588. void _fortran_srotg "F_FUNC(srotg,SROTG)"(s *sa, s *sb, s *c, s *s) nogil
  589. cdef void srotg(s *sa, s *sb, s *c, s *s) nogil:
  590. _fortran_srotg(sa, sb, c, s)
  591. cdef extern from "_blas_subroutines.h":
  592. void _fortran_srotm "F_FUNC(srotm,SROTM)"(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) nogil
  593. cdef void srotm(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) nogil:
  594. _fortran_srotm(n, sx, incx, sy, incy, sparam)
  595. cdef extern from "_blas_subroutines.h":
  596. void _fortran_srotmg "F_FUNC(srotmg,SROTMG)"(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) nogil
  597. cdef void srotmg(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) nogil:
  598. _fortran_srotmg(sd1, sd2, sx1, sy1, sparam)
  599. cdef extern from "_blas_subroutines.h":
  600. void _fortran_ssbmv "F_FUNC(ssbmv,SSBMV)"(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
  601. cdef void ssbmv(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil:
  602. _fortran_ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
  603. cdef extern from "_blas_subroutines.h":
  604. void _fortran_sscal "F_FUNC(sscal,SSCAL)"(int *n, s *sa, s *sx, int *incx) nogil
  605. cdef void sscal(int *n, s *sa, s *sx, int *incx) nogil:
  606. _fortran_sscal(n, sa, sx, incx)
  607. cdef extern from "_blas_subroutines.h":
  608. void _fortran_sspmv "F_FUNC(sspmv,SSPMV)"(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) nogil
  609. cdef void sspmv(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) nogil:
  610. _fortran_sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
  611. cdef extern from "_blas_subroutines.h":
  612. void _fortran_sspr "F_FUNC(sspr,SSPR)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) nogil
  613. cdef void sspr(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) nogil:
  614. _fortran_sspr(uplo, n, alpha, x, incx, ap)
  615. cdef extern from "_blas_subroutines.h":
  616. void _fortran_sspr2 "F_FUNC(sspr2,SSPR2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) nogil
  617. cdef void sspr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) nogil:
  618. _fortran_sspr2(uplo, n, alpha, x, incx, y, incy, ap)
  619. cdef extern from "_blas_subroutines.h":
  620. void _fortran_sswap "F_FUNC(sswap,SSWAP)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
  621. cdef void sswap(int *n, s *sx, int *incx, s *sy, int *incy) nogil:
  622. _fortran_sswap(n, sx, incx, sy, incy)
  623. cdef extern from "_blas_subroutines.h":
  624. void _fortran_ssymm "F_FUNC(ssymm,SSYMM)"(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
  625. cdef void ssymm(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil:
  626. _fortran_ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
  627. cdef extern from "_blas_subroutines.h":
  628. void _fortran_ssymv "F_FUNC(ssymv,SSYMV)"(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
  629. cdef void ssymv(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil:
  630. _fortran_ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
  631. cdef extern from "_blas_subroutines.h":
  632. void _fortran_ssyr "F_FUNC(ssyr,SSYR)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) nogil
  633. cdef void ssyr(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) nogil:
  634. _fortran_ssyr(uplo, n, alpha, x, incx, a, lda)
  635. cdef extern from "_blas_subroutines.h":
  636. void _fortran_ssyr2 "F_FUNC(ssyr2,SSYR2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil
  637. cdef void ssyr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil:
  638. _fortran_ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
  639. cdef extern from "_blas_subroutines.h":
  640. void _fortran_ssyr2k "F_FUNC(ssyr2k,SSYR2K)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
  641. cdef void ssyr2k(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil:
  642. _fortran_ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
  643. cdef extern from "_blas_subroutines.h":
  644. void _fortran_ssyrk "F_FUNC(ssyrk,SSYRK)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) nogil
  645. cdef void ssyrk(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) nogil:
  646. _fortran_ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
  647. cdef extern from "_blas_subroutines.h":
  648. void _fortran_stbmv "F_FUNC(stbmv,STBMV)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil
  649. cdef void stbmv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil:
  650. _fortran_stbmv(uplo, trans, diag, n, k, a, lda, x, incx)
  651. cdef extern from "_blas_subroutines.h":
  652. void _fortran_stbsv "F_FUNC(stbsv,STBSV)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil
  653. cdef void stbsv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil:
  654. _fortran_stbsv(uplo, trans, diag, n, k, a, lda, x, incx)
  655. cdef extern from "_blas_subroutines.h":
  656. void _fortran_stpmv "F_FUNC(stpmv,STPMV)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil
  657. cdef void stpmv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil:
  658. _fortran_stpmv(uplo, trans, diag, n, ap, x, incx)
  659. cdef extern from "_blas_subroutines.h":
  660. void _fortran_stpsv "F_FUNC(stpsv,STPSV)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil
  661. cdef void stpsv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil:
  662. _fortran_stpsv(uplo, trans, diag, n, ap, x, incx)
  663. cdef extern from "_blas_subroutines.h":
  664. void _fortran_strmm "F_FUNC(strmm,STRMM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil
  665. cdef void strmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil:
  666. _fortran_strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
  667. cdef extern from "_blas_subroutines.h":
  668. void _fortran_strmv "F_FUNC(strmv,STRMV)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil
  669. cdef void strmv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil:
  670. _fortran_strmv(uplo, trans, diag, n, a, lda, x, incx)
  671. cdef extern from "_blas_subroutines.h":
  672. void _fortran_strsm "F_FUNC(strsm,STRSM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil
  673. cdef void strsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil:
  674. _fortran_strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
  675. cdef extern from "_blas_subroutines.h":
  676. void _fortran_strsv "F_FUNC(strsv,STRSV)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil
  677. cdef void strsv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil:
  678. _fortran_strsv(uplo, trans, diag, n, a, lda, x, incx)
  679. cdef extern from "_blas_subroutines.h":
  680. void _fortran_zaxpy "F_FUNC(zaxpy,ZAXPY)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
  681. cdef void zaxpy(int *n, z *za, z *zx, int *incx, z *zy, int *incy) nogil:
  682. _fortran_zaxpy(n, <npy_complex128*>za, <npy_complex128*>zx, incx, <npy_complex128*>zy, incy)
  683. cdef extern from "_blas_subroutines.h":
  684. void _fortran_zcopy "F_FUNC(zcopy,ZCOPY)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
  685. cdef void zcopy(int *n, z *zx, int *incx, z *zy, int *incy) nogil:
  686. _fortran_zcopy(n, <npy_complex128*>zx, incx, <npy_complex128*>zy, incy)
  687. cdef extern from "_blas_subroutines.h":
  688. void _fortran_zdrot "F_FUNC(zdrot,ZDROT)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, d *c, d *s) nogil
  689. cdef void zdrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, d *s) nogil:
  690. _fortran_zdrot(n, <npy_complex128*>cx, incx, <npy_complex128*>cy, incy, c, s)
  691. cdef extern from "_blas_subroutines.h":
  692. void _fortran_zdscal "F_FUNC(zdscal,ZDSCAL)"(int *n, d *da, npy_complex128 *zx, int *incx) nogil
  693. cdef void zdscal(int *n, d *da, z *zx, int *incx) nogil:
  694. _fortran_zdscal(n, da, <npy_complex128*>zx, incx)
  695. cdef extern from "_blas_subroutines.h":
  696. void _fortran_zgbmv "F_FUNC(zgbmv,ZGBMV)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
  697. cdef void zgbmv(char *trans, int *m, int *n, int *kl, int *ku, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) nogil:
  698. _fortran_zgbmv(trans, m, n, kl, ku, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>x, incx, <npy_complex128*>beta, <npy_complex128*>y, incy)
  699. cdef extern from "_blas_subroutines.h":
  700. void _fortran_zgemm "F_FUNC(zgemm,ZGEMM)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
  701. cdef void zgemm(char *transa, char *transb, int *m, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) nogil:
  702. _fortran_zgemm(transa, transb, m, n, k, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb, <npy_complex128*>beta, <npy_complex128*>c, ldc)
  703. cdef extern from "_blas_subroutines.h":
  704. void _fortran_zgemv "F_FUNC(zgemv,ZGEMV)"(char *trans, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
  705. cdef void zgemv(char *trans, int *m, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) nogil:
  706. _fortran_zgemv(trans, m, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>x, incx, <npy_complex128*>beta, <npy_complex128*>y, incy)
  707. cdef extern from "_blas_subroutines.h":
  708. void _fortran_zgerc "F_FUNC(zgerc,ZGERC)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
  709. cdef void zgerc(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) nogil:
  710. _fortran_zgerc(m, n, <npy_complex128*>alpha, <npy_complex128*>x, incx, <npy_complex128*>y, incy, <npy_complex128*>a, lda)
  711. cdef extern from "_blas_subroutines.h":
  712. void _fortran_zgeru "F_FUNC(zgeru,ZGERU)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
  713. cdef void zgeru(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) nogil:
  714. _fortran_zgeru(m, n, <npy_complex128*>alpha, <npy_complex128*>x, incx, <npy_complex128*>y, incy, <npy_complex128*>a, lda)
  715. cdef extern from "_blas_subroutines.h":
  716. void _fortran_zhbmv "F_FUNC(zhbmv,ZHBMV)"(char *uplo, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
  717. cdef void zhbmv(char *uplo, int *n, int *k, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) nogil:
  718. _fortran_zhbmv(uplo, n, k, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>x, incx, <npy_complex128*>beta, <npy_complex128*>y, incy)
  719. cdef extern from "_blas_subroutines.h":
  720. void _fortran_zhemm "F_FUNC(zhemm,ZHEMM)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
  721. cdef void zhemm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) nogil:
  722. _fortran_zhemm(side, uplo, m, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb, <npy_complex128*>beta, <npy_complex128*>c, ldc)
  723. cdef extern from "_blas_subroutines.h":
  724. void _fortran_zhemv "F_FUNC(zhemv,ZHEMV)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
  725. cdef void zhemv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) nogil:
  726. _fortran_zhemv(uplo, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>x, incx, <npy_complex128*>beta, <npy_complex128*>y, incy)
  727. cdef extern from "_blas_subroutines.h":
  728. void _fortran_zher "F_FUNC(zher,ZHER)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda) nogil
  729. cdef void zher(char *uplo, int *n, d *alpha, z *x, int *incx, z *a, int *lda) nogil:
  730. _fortran_zher(uplo, n, alpha, <npy_complex128*>x, incx, <npy_complex128*>a, lda)
  731. cdef extern from "_blas_subroutines.h":
  732. void _fortran_zher2 "F_FUNC(zher2,ZHER2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
  733. cdef void zher2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) nogil:
  734. _fortran_zher2(uplo, n, <npy_complex128*>alpha, <npy_complex128*>x, incx, <npy_complex128*>y, incy, <npy_complex128*>a, lda)
  735. cdef extern from "_blas_subroutines.h":
  736. void _fortran_zher2k "F_FUNC(zher2k,ZHER2K)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *beta, npy_complex128 *c, int *ldc) nogil
  737. cdef void zher2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, d *beta, z *c, int *ldc) nogil:
  738. _fortran_zher2k(uplo, trans, n, k, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb, beta, <npy_complex128*>c, ldc)
  739. cdef extern from "_blas_subroutines.h":
  740. void _fortran_zherk "F_FUNC(zherk,ZHERK)"(char *uplo, char *trans, int *n, int *k, d *alpha, npy_complex128 *a, int *lda, d *beta, npy_complex128 *c, int *ldc) nogil
  741. cdef void zherk(char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c, int *ldc) nogil:
  742. _fortran_zherk(uplo, trans, n, k, alpha, <npy_complex128*>a, lda, beta, <npy_complex128*>c, ldc)
  743. cdef extern from "_blas_subroutines.h":
  744. void _fortran_zhpmv "F_FUNC(zhpmv,ZHPMV)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
  745. cdef void zhpmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) nogil:
  746. _fortran_zhpmv(uplo, n, <npy_complex128*>alpha, <npy_complex128*>ap, <npy_complex128*>x, incx, <npy_complex128*>beta, <npy_complex128*>y, incy)
  747. cdef extern from "_blas_subroutines.h":
  748. void _fortran_zhpr "F_FUNC(zhpr,ZHPR)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap) nogil
  749. cdef void zhpr(char *uplo, int *n, d *alpha, z *x, int *incx, z *ap) nogil:
  750. _fortran_zhpr(uplo, n, alpha, <npy_complex128*>x, incx, <npy_complex128*>ap)
  751. cdef extern from "_blas_subroutines.h":
  752. void _fortran_zhpr2 "F_FUNC(zhpr2,ZHPR2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *ap) nogil
  753. cdef void zhpr2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *ap) nogil:
  754. _fortran_zhpr2(uplo, n, <npy_complex128*>alpha, <npy_complex128*>x, incx, <npy_complex128*>y, incy, <npy_complex128*>ap)
  755. cdef extern from "_blas_subroutines.h":
  756. void _fortran_zrotg "F_FUNC(zrotg,ZROTG)"(npy_complex128 *ca, npy_complex128 *cb, d *c, npy_complex128 *s) nogil
  757. cdef void zrotg(z *ca, z *cb, d *c, z *s) nogil:
  758. _fortran_zrotg(<npy_complex128*>ca, <npy_complex128*>cb, c, <npy_complex128*>s)
  759. cdef extern from "_blas_subroutines.h":
  760. void _fortran_zscal "F_FUNC(zscal,ZSCAL)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx) nogil
  761. cdef void zscal(int *n, z *za, z *zx, int *incx) nogil:
  762. _fortran_zscal(n, <npy_complex128*>za, <npy_complex128*>zx, incx)
  763. cdef extern from "_blas_subroutines.h":
  764. void _fortran_zswap "F_FUNC(zswap,ZSWAP)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
  765. cdef void zswap(int *n, z *zx, int *incx, z *zy, int *incy) nogil:
  766. _fortran_zswap(n, <npy_complex128*>zx, incx, <npy_complex128*>zy, incy)
  767. cdef extern from "_blas_subroutines.h":
  768. void _fortran_zsymm "F_FUNC(zsymm,ZSYMM)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
  769. cdef void zsymm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) nogil:
  770. _fortran_zsymm(side, uplo, m, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb, <npy_complex128*>beta, <npy_complex128*>c, ldc)
  771. cdef extern from "_blas_subroutines.h":
  772. void _fortran_zsyr2k "F_FUNC(zsyr2k,ZSYR2K)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
  773. cdef void zsyr2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) nogil:
  774. _fortran_zsyr2k(uplo, trans, n, k, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb, <npy_complex128*>beta, <npy_complex128*>c, ldc)
  775. cdef extern from "_blas_subroutines.h":
  776. void _fortran_zsyrk "F_FUNC(zsyrk,ZSYRK)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
  777. cdef void zsyrk(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *beta, z *c, int *ldc) nogil:
  778. _fortran_zsyrk(uplo, trans, n, k, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>beta, <npy_complex128*>c, ldc)
  779. cdef extern from "_blas_subroutines.h":
  780. void _fortran_ztbmv "F_FUNC(ztbmv,ZTBMV)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
  781. cdef void ztbmv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) nogil:
  782. _fortran_ztbmv(uplo, trans, diag, n, k, <npy_complex128*>a, lda, <npy_complex128*>x, incx)
  783. cdef extern from "_blas_subroutines.h":
  784. void _fortran_ztbsv "F_FUNC(ztbsv,ZTBSV)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
  785. cdef void ztbsv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) nogil:
  786. _fortran_ztbsv(uplo, trans, diag, n, k, <npy_complex128*>a, lda, <npy_complex128*>x, incx)
  787. cdef extern from "_blas_subroutines.h":
  788. void _fortran_ztpmv "F_FUNC(ztpmv,ZTPMV)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil
  789. cdef void ztpmv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) nogil:
  790. _fortran_ztpmv(uplo, trans, diag, n, <npy_complex128*>ap, <npy_complex128*>x, incx)
  791. cdef extern from "_blas_subroutines.h":
  792. void _fortran_ztpsv "F_FUNC(ztpsv,ZTPSV)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil
  793. cdef void ztpsv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) nogil:
  794. _fortran_ztpsv(uplo, trans, diag, n, <npy_complex128*>ap, <npy_complex128*>x, incx)
  795. cdef extern from "_blas_subroutines.h":
  796. void _fortran_ztrmm "F_FUNC(ztrmm,ZTRMM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil
  797. cdef void ztrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) nogil:
  798. _fortran_ztrmm(side, uplo, transa, diag, m, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb)
  799. cdef extern from "_blas_subroutines.h":
  800. void _fortran_ztrmv "F_FUNC(ztrmv,ZTRMV)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
  801. cdef void ztrmv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) nogil:
  802. _fortran_ztrmv(uplo, trans, diag, n, <npy_complex128*>a, lda, <npy_complex128*>x, incx)
  803. cdef extern from "_blas_subroutines.h":
  804. void _fortran_ztrsm "F_FUNC(ztrsm,ZTRSM)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil
  805. cdef void ztrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) nogil:
  806. _fortran_ztrsm(side, uplo, transa, diag, m, n, <npy_complex128*>alpha, <npy_complex128*>a, lda, <npy_complex128*>b, ldb)
  807. cdef extern from "_blas_subroutines.h":
  808. void _fortran_ztrsv "F_FUNC(ztrsv,ZTRSV)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
  809. cdef void ztrsv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) nogil:
  810. _fortran_ztrsv(uplo, trans, diag, n, <npy_complex128*>a, lda, <npy_complex128*>x, incx)
  811. # Python-accessible wrappers for testing:
  812. cdef inline bint _is_contiguous(double[:,:] a, int axis) nogil:
  813. return (a.strides[axis] == sizeof(a[0,0]) or a.shape[axis] == 1)
  814. cpdef float complex _test_cdotc(float complex[:] cx, float complex[:] cy) nogil:
  815. cdef:
  816. int n = cx.shape[0]
  817. int incx = cx.strides[0] // sizeof(cx[0])
  818. int incy = cy.strides[0] // sizeof(cy[0])
  819. return cdotc(&n, &cx[0], &incx, &cy[0], &incy)
  820. cpdef float complex _test_cdotu(float complex[:] cx, float complex[:] cy) nogil:
  821. cdef:
  822. int n = cx.shape[0]
  823. int incx = cx.strides[0] // sizeof(cx[0])
  824. int incy = cy.strides[0] // sizeof(cy[0])
  825. return cdotu(&n, &cx[0], &incx, &cy[0], &incy)
  826. cpdef double _test_dasum(double[:] dx) nogil:
  827. cdef:
  828. int n = dx.shape[0]
  829. int incx = dx.strides[0] // sizeof(dx[0])
  830. return dasum(&n, &dx[0], &incx)
  831. cpdef double _test_ddot(double[:] dx, double[:] dy) nogil:
  832. cdef:
  833. int n = dx.shape[0]
  834. int incx = dx.strides[0] // sizeof(dx[0])
  835. int incy = dy.strides[0] // sizeof(dy[0])
  836. return ddot(&n, &dx[0], &incx, &dy[0], &incy)
  837. cpdef int _test_dgemm(double alpha, double[:,:] a, double[:,:] b, double beta,
  838. double[:,:] c) nogil except -1:
  839. cdef:
  840. char *transa
  841. char *transb
  842. int m, n, k, lda, ldb, ldc
  843. double *a0=&a[0,0]
  844. double *b0=&b[0,0]
  845. double *c0=&c[0,0]
  846. # In the case that c is C contiguous, swap a and b and
  847. # swap whether or not each of them is transposed.
  848. # This can be done because a.dot(b) = b.T.dot(a.T).T.
  849. if _is_contiguous(c, 1):
  850. if _is_contiguous(a, 1):
  851. transb = 'n'
  852. ldb = (&a[1,0]) - a0 if a.shape[0] > 1 else 1
  853. elif _is_contiguous(a, 0):
  854. transb = 't'
  855. ldb = (&a[0,1]) - a0 if a.shape[1] > 1 else 1
  856. else:
  857. with gil:
  858. raise ValueError("Input 'a' is neither C nor Fortran contiguous.")
  859. if _is_contiguous(b, 1):
  860. transa = 'n'
  861. lda = (&b[1,0]) - b0 if b.shape[0] > 1 else 1
  862. elif _is_contiguous(b, 0):
  863. transa = 't'
  864. lda = (&b[0,1]) - b0 if b.shape[1] > 1 else 1
  865. else:
  866. with gil:
  867. raise ValueError("Input 'b' is neither C nor Fortran contiguous.")
  868. k = b.shape[0]
  869. if k != a.shape[1]:
  870. with gil:
  871. raise ValueError("Shape mismatch in input arrays.")
  872. m = b.shape[1]
  873. n = a.shape[0]
  874. if n != c.shape[0] or m != c.shape[1]:
  875. with gil:
  876. raise ValueError("Output array does not have the correct shape.")
  877. ldc = (&c[1,0]) - c0 if c.shape[0] > 1 else 1
  878. dgemm(transa, transb, &m, &n, &k, &alpha, b0, &lda, a0,
  879. &ldb, &beta, c0, &ldc)
  880. elif _is_contiguous(c, 0):
  881. if _is_contiguous(a, 1):
  882. transa = 't'
  883. lda = (&a[1,0]) - a0 if a.shape[0] > 1 else 1
  884. elif _is_contiguous(a, 0):
  885. transa = 'n'
  886. lda = (&a[0,1]) - a0 if a.shape[1] > 1 else 1
  887. else:
  888. with gil:
  889. raise ValueError("Input 'a' is neither C nor Fortran contiguous.")
  890. if _is_contiguous(b, 1):
  891. transb = 't'
  892. ldb = (&b[1,0]) - b0 if b.shape[0] > 1 else 1
  893. elif _is_contiguous(b, 0):
  894. transb = 'n'
  895. ldb = (&b[0,1]) - b0 if b.shape[1] > 1 else 1
  896. else:
  897. with gil:
  898. raise ValueError("Input 'b' is neither C nor Fortran contiguous.")
  899. m = a.shape[0]
  900. k = a.shape[1]
  901. if k != b.shape[0]:
  902. with gil:
  903. raise ValueError("Shape mismatch in input arrays.")
  904. n = b.shape[1]
  905. if m != c.shape[0] or n != c.shape[1]:
  906. with gil:
  907. raise ValueError("Output array does not have the correct shape.")
  908. ldc = (&c[0,1]) - c0 if c.shape[1] > 1 else 1
  909. dgemm(transa, transb, &m, &n, &k, &alpha, a0, &lda, b0,
  910. &ldb, &beta, c0, &ldc)
  911. else:
  912. with gil:
  913. raise ValueError("Input 'c' is neither C nor Fortran contiguous.")
  914. return 0
  915. cpdef double _test_dnrm2(double[:] x) nogil:
  916. cdef:
  917. int n = x.shape[0]
  918. int incx = x.strides[0] // sizeof(x[0])
  919. return dnrm2(&n, &x[0], &incx)
  920. cpdef double _test_dzasum(double complex[:] zx) nogil:
  921. cdef:
  922. int n = zx.shape[0]
  923. int incx = zx.strides[0] // sizeof(zx[0])
  924. return dzasum(&n, &zx[0], &incx)
  925. cpdef double _test_dznrm2(double complex[:] x) nogil:
  926. cdef:
  927. int n = x.shape[0]
  928. int incx = x.strides[0] // sizeof(x[0])
  929. return dznrm2(&n, &x[0], &incx)
  930. cpdef int _test_icamax(float complex[:] cx) nogil:
  931. cdef:
  932. int n = cx.shape[0]
  933. int incx = cx.strides[0] // sizeof(cx[0])
  934. return icamax(&n, &cx[0], &incx)
  935. cpdef int _test_idamax(double[:] dx) nogil:
  936. cdef:
  937. int n = dx.shape[0]
  938. int incx = dx.strides[0] // sizeof(dx[0])
  939. return idamax(&n, &dx[0], &incx)
  940. cpdef int _test_isamax(float[:] sx) nogil:
  941. cdef:
  942. int n = sx.shape[0]
  943. int incx = sx.strides[0] // sizeof(sx[0])
  944. return isamax(&n, &sx[0], &incx)
  945. cpdef int _test_izamax(double complex[:] zx) nogil:
  946. cdef:
  947. int n = zx.shape[0]
  948. int incx = zx.strides[0] // sizeof(zx[0])
  949. return izamax(&n, &zx[0], &incx)
  950. cpdef float _test_sasum(float[:] sx) nogil:
  951. cdef:
  952. int n = sx.shape[0]
  953. int incx = sx.shape[0] // sizeof(sx[0])
  954. return sasum(&n, &sx[0], &incx)
  955. cpdef float _test_scasum(float complex[:] cx) nogil:
  956. cdef:
  957. int n = cx.shape[0]
  958. int incx = cx.strides[0] // sizeof(cx[0])
  959. return scasum(&n, &cx[0], &incx)
  960. cpdef float _test_scnrm2(float complex[:] x) nogil:
  961. cdef:
  962. int n = x.shape[0]
  963. int incx = x.strides[0] // sizeof(x[0])
  964. return scnrm2(&n, &x[0], &incx)
  965. cpdef float _test_sdot(float[:] sx, float[:] sy) nogil:
  966. cdef:
  967. int n = sx.shape[0]
  968. int incx = sx.strides[0] // sizeof(sx[0])
  969. int incy = sy.strides[0] // sizeof(sy[0])
  970. return sdot(&n, &sx[0], &incx, &sy[0], &incy)
  971. cpdef float _test_snrm2(float[:] x) nogil:
  972. cdef:
  973. int n = x.shape[0]
  974. int incx = x.shape[0] // sizeof(x[0])
  975. return snrm2(&n, &x[0], &incx)
  976. cpdef double complex _test_zdotc(double complex[:] zx, double complex[:] zy) nogil:
  977. cdef:
  978. int n = zx.shape[0]
  979. int incx = zx.strides[0] // sizeof(zx[0])
  980. int incy = zy.strides[0] // sizeof(zy[0])
  981. return zdotc(&n, &zx[0], &incx, &zy[0], &incy)
  982. cpdef double complex _test_zdotu(double complex[:] zx, double complex[:] zy) nogil:
  983. cdef:
  984. int n = zx.shape[0]
  985. int incx = zx.strides[0] // sizeof(zx[0])
  986. int incy = zy.strides[0] // sizeof(zy[0])
  987. return zdotu(&n, &zx[0], &incx, &zy[0], &incy)