fix build error
[platform/upstream/openblas.git] / common_level1.h
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
39 #ifndef ASSEMBLER
40
41 #ifdef __CUDACC__
42 extern "C" {
43 #endif
44
45 float   sdot_k(BLASLONG, float   *, BLASLONG, float   *, BLASLONG);
46 double dsdot_k(BLASLONG, float   *, BLASLONG, float *, BLASLONG);
47 double  ddot_k(BLASLONG, double  *, BLASLONG, double  *, BLASLONG);
48 xdouble qdot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
49
50 openblas_complex_float cdotc_k (BLASLONG, float  *, BLASLONG, float  *, BLASLONG);
51 openblas_complex_float cdotu_k (BLASLONG, float  *, BLASLONG, float  *, BLASLONG);
52 openblas_complex_double zdotc_k (BLASLONG, double *, BLASLONG, double *, BLASLONG);
53 openblas_complex_double zdotu_k (BLASLONG, double *, BLASLONG, double *, BLASLONG);
54 openblas_complex_xdouble xdotc_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
55 openblas_complex_xdouble xdotu_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
56
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
76 int    scopy_k(BLASLONG, float  *, BLASLONG, float  *, BLASLONG);
77 int    dcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
78 int    qcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
79 int    ccopy_k(BLASLONG, float  *, BLASLONG, float  *, BLASLONG);
80 int    zcopy_k(BLASLONG, double *, BLASLONG, double *, BLASLONG);
81 int    xcopy_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG);
82
83 int    sswap_k (BLASLONG, BLASLONG, BLASLONG, float,
84                float  *, BLASLONG, float  *, BLASLONG, float *, BLASLONG);
85 int    dswap_k (BLASLONG, BLASLONG, BLASLONG, double,
86                double *, BLASLONG, double *, BLASLONG, double*, BLASLONG);
87 int    qswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble,
88                xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG);
89 int    cswap_k (BLASLONG, BLASLONG, BLASLONG, float,  float,
90                float  *, BLASLONG, float  *, BLASLONG, float *, BLASLONG);
91 int    zswap_k (BLASLONG, BLASLONG, BLASLONG, double, double,
92                double *, BLASLONG, double *, BLASLONG, double*, BLASLONG);
93 int    xswap_k (BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
94                xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble*, BLASLONG);
95
96 float   sasum_k (BLASLONG, float  *, BLASLONG);
97 double  dasum_k (BLASLONG, double *, BLASLONG);
98 xdouble qasum_k (BLASLONG, xdouble *, BLASLONG);
99 float   casum_k (BLASLONG, float  *, BLASLONG);
100 double  zasum_k (BLASLONG, double *, BLASLONG);
101 xdouble xasum_k (BLASLONG, xdouble *, BLASLONG);
102
103 float   ssum_k (BLASLONG, float  *, BLASLONG);
104 double  dsum_k (BLASLONG, double *, BLASLONG);
105 xdouble qsum_k (BLASLONG, xdouble *, BLASLONG);
106 float   csum_k (BLASLONG, float  *, BLASLONG);
107 double  zsum_k (BLASLONG, double *, BLASLONG);
108 xdouble xsum_k (BLASLONG, xdouble *, BLASLONG);
109
110 float   samax_k (BLASLONG, float  *, BLASLONG);
111 double  damax_k (BLASLONG, double *, BLASLONG);
112 xdouble qamax_k (BLASLONG, xdouble *, BLASLONG);
113 float   camax_k (BLASLONG, float  *, BLASLONG);
114 double  zamax_k (BLASLONG, double *, BLASLONG);
115 xdouble xamax_k (BLASLONG, xdouble *, BLASLONG);
116
117 float   samin_k (BLASLONG, float  *, BLASLONG);
118 double  damin_k (BLASLONG, double *, BLASLONG);
119 xdouble qamin_k (BLASLONG, xdouble *, BLASLONG);
120 float   camin_k (BLASLONG, float  *, BLASLONG);
121 double  zamin_k (BLASLONG, double *, BLASLONG);
122 xdouble xamin_k (BLASLONG, xdouble *, BLASLONG);
123
124 BLASLONG   isamax_k(BLASLONG, float  *, BLASLONG);
125 BLASLONG   idamax_k(BLASLONG, double *, BLASLONG);
126 BLASLONG   iqamax_k(BLASLONG, xdouble *, BLASLONG);
127 BLASLONG   icamax_k(BLASLONG, float  *, BLASLONG);
128 BLASLONG   izamax_k(BLASLONG, double *, BLASLONG);
129 BLASLONG   ixamax_k(BLASLONG, xdouble *, BLASLONG);
130
131 BLASLONG   isamin_k(BLASLONG, float  *, BLASLONG);
132 BLASLONG   idamin_k(BLASLONG, double *, BLASLONG);
133 BLASLONG   iqamin_k(BLASLONG, xdouble *, BLASLONG);
134 BLASLONG   icamin_k(BLASLONG, float  *, BLASLONG);
135 BLASLONG   izamin_k(BLASLONG, double *, BLASLONG);
136 BLASLONG   ixamin_k(BLASLONG, xdouble *, BLASLONG);
137
138 float   smax_k (BLASLONG, float  *, BLASLONG);
139 double  dmax_k (BLASLONG, double *, BLASLONG);
140 xdouble qmax_k (BLASLONG, xdouble *, BLASLONG);
141 float   cmax_k (BLASLONG, float  *, BLASLONG);
142 double  zmax_k (BLASLONG, double *, BLASLONG);
143 xdouble xmax_k (BLASLONG, xdouble *, BLASLONG);
144
145 float   smin_k (BLASLONG, float  *, BLASLONG);
146 double  dmin_k (BLASLONG, double *, BLASLONG);
147 xdouble qmin_k (BLASLONG, xdouble *, BLASLONG);
148 float   cmin_k (BLASLONG, float  *, BLASLONG);
149 double  zmin_k (BLASLONG, double *, BLASLONG);
150 xdouble xmin_k (BLASLONG, xdouble *, BLASLONG);
151
152 BLASLONG   ismax_k(BLASLONG, float  *, BLASLONG);
153 BLASLONG   idmax_k(BLASLONG, double *, BLASLONG);
154 BLASLONG   iqmax_k(BLASLONG, xdouble *, BLASLONG);
155 BLASLONG   icmax_k(BLASLONG, float  *, BLASLONG);
156 BLASLONG   izmax_k(BLASLONG, double *, BLASLONG);
157 BLASLONG   ixmax_k(BLASLONG, xdouble *, BLASLONG);
158
159 BLASLONG   ismin_k(BLASLONG, float  *, BLASLONG);
160 BLASLONG   idmin_k(BLASLONG, double *, BLASLONG);
161 BLASLONG   iqmin_k(BLASLONG, xdouble *, BLASLONG);
162 BLASLONG   icmin_k(BLASLONG, float  *, BLASLONG);
163 BLASLONG   izmin_k(BLASLONG, double *, BLASLONG);
164 BLASLONG   ixmin_k(BLASLONG, xdouble *, BLASLONG);
165
166 int    sscal_k(BLASLONG, BLASLONG, BLASLONG, float,
167               float *, BLASLONG, float *, BLASLONG,  float  *, BLASLONG);
168 int    dscal_k(BLASLONG, BLASLONG, BLASLONG, double,
169               double *, BLASLONG, double *, BLASLONG,  double  *, BLASLONG);
170 int    qscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble,
171               xdouble *, BLASLONG, xdouble *, BLASLONG,  xdouble  *, BLASLONG);
172 int    cscal_k(BLASLONG, BLASLONG, BLASLONG, float, float,
173               float *, BLASLONG, float *, BLASLONG,  float  *, BLASLONG);
174 int    zscal_k(BLASLONG, BLASLONG, BLASLONG, double, double,
175               double *, BLASLONG, double *, BLASLONG,  double  *, BLASLONG);
176 int    xscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
177               xdouble *, BLASLONG, xdouble *, BLASLONG,  xdouble  *, BLASLONG);
178 int    csscal_k(BLASLONG, BLASLONG, BLASLONG, float, float,
179                float *, BLASLONG, float *, BLASLONG,  float  *, BLASLONG);
180 int    zdscal_k(BLASLONG, BLASLONG, BLASLONG, double, double,
181                double *, BLASLONG, double *, BLASLONG,  double  *, BLASLONG);
182 int    xqscal_k(BLASLONG, BLASLONG, BLASLONG, xdouble, xdouble,
183                xdouble *, BLASLONG, xdouble *, BLASLONG,  xdouble  *, BLASLONG);
184
185 float   snrm2_k(BLASLONG, float   *, BLASLONG);
186 double  dnrm2_k(BLASLONG, double  *, BLASLONG);
187 xdouble qnrm2_k(BLASLONG, xdouble *, BLASLONG);
188 float   cnrm2_k(BLASLONG, float   *, BLASLONG);
189 double  znrm2_k(BLASLONG, double  *, BLASLONG);
190 xdouble xnrm2_k(BLASLONG, xdouble *, BLASLONG);
191
192 int    srot_k (BLASLONG, float  *, BLASLONG, float  *, BLASLONG, float , float );
193 int    drot_k (BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
194 int    qrot_k (BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
195 int    csrot_k(BLASLONG, float  *, BLASLONG, float  *, BLASLONG, float , float );
196 int    zdrot_k(BLASLONG, double *, BLASLONG, double *, BLASLONG, double, double);
197 int    xqrot_k(BLASLONG, xdouble *, BLASLONG, xdouble *, BLASLONG, xdouble, xdouble);
198
199 int    srotg_k(float  *, float  *, float  *, float  *);
200 int    drotg_k(double *, double *, double *, double *);
201 int    qrotg_k(xdouble *, xdouble *, xdouble *, xdouble *);
202 int    csrotg_k(float  *, float  *, float  *, float  *);
203 int    zdrotg_k(double *, double *, double *, double *);
204 int    xqrotg_k(xdouble *, xdouble *, xdouble *, xdouble *);
205
206 int    srotmg_k(float  *, float  *, float  *, float  *, float  *);
207 int    drotmg_k(double *, double *, double *, double *, double *);
208 int    qrotmg_k(xdouble *, xdouble *, xdouble *, xdouble *, xdouble *);
209
210 int    srotm_k (BLASLONG, float,  BLASLONG, float,  BLASLONG, float);
211 int    drotm_k (BLASLONG, double, BLASLONG, double, BLASLONG, double);
212 int    qrotm_k (BLASLONG, xdouble, BLASLONG, xdouble, BLASLONG, xdouble);
213
214
215 int    saxpby_k (BLASLONG, float,  float  *, BLASLONG, float,  float  *, BLASLONG);
216 int    daxpby_k (BLASLONG, double, double *, BLASLONG, double, double *, BLASLONG);
217 int    caxpby_k (BLASLONG, float,  float,  float  *, BLASLONG, float,  float,  float  *, BLASLONG);
218 int    zaxpby_k (BLASLONG, double, double, double *, BLASLONG, double, double, double *, BLASLONG);
219
220
221 #ifdef __CUDACC__
222 }
223 #endif
224
225 #endif
226