You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

common_level1.h 12 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*********************************************************************/
  2. /* Copyright 2009, 2010 The University of Texas at Austin. */
  3. /* All rights reserved. */
  4. /* */
  5. /* Redistribution and use in source and binary forms, with or */
  6. /* without modification, are permitted provided that the following */
  7. /* conditions are met: */
  8. /* */
  9. /* 1. Redistributions of source code must retain the above */
  10. /* copyright notice, this list of conditions and the following */
  11. /* disclaimer. */
  12. /* */
  13. /* 2. Redistributions in binary form must reproduce the above */
  14. /* copyright notice, this list of conditions and the following */
  15. /* disclaimer in the documentation and/or other materials */
  16. /* provided with the distribution. */
  17. /* */
  18. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  19. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  20. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  21. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  22. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  23. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  24. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  25. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  26. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  27. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  28. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  29. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  30. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  31. /* POSSIBILITY OF SUCH DAMAGE. */
  32. /* */
  33. /* The views and conclusions contained in the software and */
  34. /* documentation are those of the authors and should not be */
  35. /* interpreted as representing official policies, either expressed */
  36. /* or implied, of The University of Texas at Austin. */
  37. /*********************************************************************/
  38. #ifndef ASSEMBLER
  39. #ifdef __CUDACC__
  40. extern "C" {
  41. #endif
  42. float sdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
  43. double dsdot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
  44. double ddot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
  45. xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  46. float sbdot_k(BLASLONG, bfloat16 *, BLASLONG, bfloat16 *, BLASLONG);
  47. void sbstobf16_k(BLASLONG, float *, BLASLONG, bfloat16 *, BLASLONG);
  48. void sbdtobf16_k(BLASLONG, double *, BLASLONG, bfloat16 *, BLASLONG);
  49. void sbf16tos_k (BLASLONG, bfloat16 *, BLASLONG, float *, BLASLONG);
  50. void dbf16tod_k (BLASLONG, bfloat16 *, BLASLONG, double *, BLASLONG);
  51. openblas_complex_float cdotc_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);
  52. openblas_complex_float cdotu_k (BLASLONG, float *, BLASLONG, float *, BLASLONG);
  53. openblas_complex_double zdotc_k (BLASLONG, double *, BLASLONG, double *, BLASLONG);
  54. openblas_complex_double zdotu_k (BLASLONG, double *, BLASLONG, double *, BLASLONG);
  55. openblas_complex_xdouble xdotc_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  56. openblas_complex_xdouble xdotu_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  57. int saxpy_k (BLASLONG, BLASLONG, BLASLONG, float,
  58. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  59. int daxpy_k (BLASLONG, BLASLONG, BLASLONG, double,
  60. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  61. int qaxpy_k (BLASLONG, BLASLONG, BLASLONG, xdouble,
  62. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  63. int caxpy_k (BLASLONG, BLASLONG, BLASLONG, float, float,
  64. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  65. int zaxpy_k (BLASLONG, BLASLONG, BLASLONG, double, double,
  66. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  67. int xaxpy_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
  68. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  69. int caxpyc_k (BLASLONG, BLASLONG, BLASLONG, float, float,
  70. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  71. int zaxpyc_k (BLASLONG, BLASLONG, BLASLONG, double, double,
  72. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  73. int xaxpyc_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
  74. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  75. int scopy_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
  76. int dcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
  77. int qcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  78. int ccopy_k(BLASLONG, float *, BLASLONG, float *, BLASLONG);
  79. int zcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
  80. int xcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  81. int sswap_k (BLASLONG, BLASLONG, BLASLONG, float,
  82. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  83. int dswap_k (BLASLONG, BLASLONG, BLASLONG, double,
  84. double *, BLASLONG, double *, BLASLONG, double*, BLASLONG);
  85. int qswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble,
  86. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG);
  87. int cswap_k (BLASLONG, BLASLONG, BLASLONG, float, float,
  88. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  89. int zswap_k (BLASLONG, BLASLONG, BLASLONG, double, double,
  90. double *, BLASLONG, double *, BLASLONG, double*, BLASLONG);
  91. int xswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
  92. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG);
  93. float sasum_k (BLASLONG, float *, BLASLONG);
  94. double dasum_k (BLASLONG, double *, BLASLONG);
  95. xdouble qasum_k (BLASLONG, xdouble *, BLASLONG);
  96. float casum_k (BLASLONG, float *, BLASLONG);
  97. double zasum_k (BLASLONG, double *, BLASLONG);
  98. xdouble xasum_k (BLASLONG, xdouble *, BLASLONG);
  99. float ssum_k (BLASLONG, float *, BLASLONG);
  100. double dsum_k (BLASLONG, double *, BLASLONG);
  101. xdouble qsum_k (BLASLONG, xdouble *, BLASLONG);
  102. float csum_k (BLASLONG, float *, BLASLONG);
  103. double zsum_k (BLASLONG, double *, BLASLONG);
  104. xdouble xsum_k (BLASLONG, xdouble *, BLASLONG);
  105. float samax_k (BLASLONG, float *, BLASLONG);
  106. double damax_k (BLASLONG, double *, BLASLONG);
  107. xdouble qamax_k (BLASLONG, xdouble *, BLASLONG);
  108. float camax_k (BLASLONG, float *, BLASLONG);
  109. double zamax_k (BLASLONG, double *, BLASLONG);
  110. xdouble xamax_k (BLASLONG, xdouble *, BLASLONG);
  111. float samin_k (BLASLONG, float *, BLASLONG);
  112. double damin_k (BLASLONG, double *, BLASLONG);
  113. xdouble qamin_k (BLASLONG, xdouble *, BLASLONG);
  114. float camin_k (BLASLONG, float *, BLASLONG);
  115. double zamin_k (BLASLONG, double *, BLASLONG);
  116. xdouble xamin_k (BLASLONG, xdouble *, BLASLONG);
  117. BLASLONG isamax_k(BLASLONG, float *, BLASLONG);
  118. BLASLONG idamax_k(BLASLONG, double *, BLASLONG);
  119. BLASLONG iqamax_k(BLASLONG, xdouble *, BLASLONG);
  120. BLASLONG icamax_k(BLASLONG, float *, BLASLONG);
  121. BLASLONG izamax_k(BLASLONG, double *, BLASLONG);
  122. BLASLONG ixamax_k(BLASLONG, xdouble *, BLASLONG);
  123. BLASLONG isamin_k(BLASLONG, float *, BLASLONG);
  124. BLASLONG idamin_k(BLASLONG, double *, BLASLONG);
  125. BLASLONG iqamin_k(BLASLONG, xdouble *, BLASLONG);
  126. BLASLONG icamin_k(BLASLONG, float *, BLASLONG);
  127. BLASLONG izamin_k(BLASLONG, double *, BLASLONG);
  128. BLASLONG ixamin_k(BLASLONG, xdouble *, BLASLONG);
  129. float smax_k (BLASLONG, float *, BLASLONG);
  130. double dmax_k (BLASLONG, double *, BLASLONG);
  131. xdouble qmax_k (BLASLONG, xdouble *, BLASLONG);
  132. float cmax_k (BLASLONG, float *, BLASLONG);
  133. double zmax_k (BLASLONG, double *, BLASLONG);
  134. xdouble xmax_k (BLASLONG, xdouble *, BLASLONG);
  135. float smin_k (BLASLONG, float *, BLASLONG);
  136. double dmin_k (BLASLONG, double *, BLASLONG);
  137. xdouble qmin_k (BLASLONG, xdouble *, BLASLONG);
  138. float cmin_k (BLASLONG, float *, BLASLONG);
  139. double zmin_k (BLASLONG, double *, BLASLONG);
  140. xdouble xmin_k (BLASLONG, xdouble *, BLASLONG);
  141. BLASLONG ismax_k(BLASLONG, float *, BLASLONG);
  142. BLASLONG idmax_k(BLASLONG, double *, BLASLONG);
  143. BLASLONG iqmax_k(BLASLONG, xdouble *, BLASLONG);
  144. BLASLONG icmax_k(BLASLONG, float *, BLASLONG);
  145. BLASLONG izmax_k(BLASLONG, double *, BLASLONG);
  146. BLASLONG ixmax_k(BLASLONG, xdouble *, BLASLONG);
  147. BLASLONG ismin_k(BLASLONG, float *, BLASLONG);
  148. BLASLONG idmin_k(BLASLONG, double *, BLASLONG);
  149. BLASLONG iqmin_k(BLASLONG, xdouble *, BLASLONG);
  150. BLASLONG icmin_k(BLASLONG, float *, BLASLONG);
  151. BLASLONG izmin_k(BLASLONG, double *, BLASLONG);
  152. BLASLONG ixmin_k(BLASLONG, xdouble *, BLASLONG);
  153. int sscal_k(BLASLONG, BLASLONG, BLASLONG, float,
  154. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  155. int dscal_k(BLASLONG, BLASLONG, BLASLONG, double,
  156. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  157. int qscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble,
  158. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  159. int cscal_k(BLASLONG, BLASLONG, BLASLONG, float, float,
  160. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  161. int zscal_k(BLASLONG, BLASLONG, BLASLONG, double, double,
  162. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  163. int xscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
  164. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  165. int csscal_k(BLASLONG, BLASLONG, BLASLONG, float, float,
  166. float *, BLASLONG, float *, BLASLONG, float *, BLASLONG);
  167. int zdscal_k(BLASLONG, BLASLONG, BLASLONG, double, double,
  168. double *, BLASLONG, double *, BLASLONG, double *, BLASLONG);
  169. int xqscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
  170. xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
  171. float snrm2_k(BLASLONG, float *, BLASLONG);
  172. double dnrm2_k(BLASLONG, double *, BLASLONG);
  173. xdouble qnrm2_k(BLASLONG, xdouble *, BLASLONG);
  174. float cnrm2_k(BLASLONG, float *, BLASLONG);
  175. double znrm2_k(BLASLONG, double *, BLASLONG);
  176. xdouble xnrm2_k(BLASLONG, xdouble *, BLASLONG);
  177. int srot_k (BLASLONG, float *, BLASLONG, float *, BLASLONG, float , float );
  178. int drot_k (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
  179. int qrot_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
  180. int csrot_k(BLASLONG, float *, BLASLONG, float *, BLASLONG, float , float );
  181. int zdrot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
  182. int xqrot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
  183. int srotg_k(float *, float *, float *, float *);
  184. int drotg_k(double *, double *, double *, double *);
  185. int qrotg_k(xdouble *, xdouble *, xdouble *, xdouble *);
  186. int csrotg_k(float *, float *, float *, float *);
  187. int zdrotg_k(double *, double *, double *, double *);
  188. int xqrotg_k(xdouble *, xdouble *, xdouble *, xdouble *);
  189. int srotmg_k(float *, float *, float *, float *, float *);
  190. int drotmg_k(double *, double *, double *, double *, double *);
  191. int qrotmg_k(xdouble *, xdouble *, xdouble *, xdouble *, xdouble *);
  192. int srotm_k (BLASLONG, float, BLASLONG, float, BLASLONG, float);
  193. int drotm_k (BLASLONG, double, BLASLONG, double, BLASLONG, double);
  194. int qrotm_k (BLASLONG, xdouble, BLASLONG, xdouble, BLASLONG, xdouble);
  195. int saxpby_k (BLASLONG, float, float *, BLASLONG, float, float *, BLASLONG);
  196. int daxpby_k (BLASLONG, double, double *, BLASLONG, double, double *, BLASLONG);
  197. int caxpby_k (BLASLONG, float, float, float *, BLASLONG, float, float, float *, BLASLONG);
  198. int zaxpby_k (BLASLONG, double, double, double *, BLASLONG, double, double, double *, BLASLONG);
  199. #ifdef __CUDACC__
  200. }
  201. #endif
  202. #endif