riscv64: Add RISC-V target
[platform/upstream/openblas.git] / common_reference.h
1 /*****************************************************************************
2 Copyright (c) 2011-2014, The OpenBLAS Project
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8
9    1. Redistributions of source code must retain the above copyright
10       notice, this list of conditions and the following disclaimer.
11
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in
14       the documentation and/or other materials provided with the
15       distribution.
16    3. Neither the name of the OpenBLAS project nor the names of 
17       its contributors may be used to endorse or promote products 
18       derived from this software without specific prior written 
19       permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30 USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 **********************************************************************************/
33 #ifndef ASSEMBLER
34
35 #define REF_BU f
36 #define BLASFUNC_REF_2(x,y) BLASFUNC(x## y)
37 #define BLASFUNC_REF_1(x,y) BLASFUNC_REF_2(x,y)
38 #define BLASFUNC_REF(x) BLASFUNC_REF_1(x,REF_BU)
39
40 void  BLASFUNC_REF(srot)  (blasint *, float  *, blasint *, float  *, blasint *, float  *, float  *);
41 void  BLASFUNC_REF(drot)  (blasint *, double *, blasint *, double *, blasint *, double *, double *);
42 void  BLASFUNC_REF(qrot)  (blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *);
43 void  BLASFUNC_REF(csrot) (blasint *, float  *, blasint *, float  *, blasint *, float  *, float  *);
44 void  BLASFUNC_REF(zdrot) (blasint *, double *, blasint *, double *, blasint *, double *, double *);
45 void  BLASFUNC_REF(xqrot) (blasint *, xdouble *, blasint *, xdouble *, blasint *, xdouble *, xdouble *);
46
47 void BLASFUNC_REF(sswap) (blasint *, float  *, blasint *, float  *, blasint *);
48 void BLASFUNC_REF(dswap) (blasint *, double *, blasint *, double *, blasint *);
49 void BLASFUNC_REF(qswap) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
50 void BLASFUNC_REF(cswap) (blasint *, float  *, blasint *, float  *, blasint *);
51 void BLASFUNC_REF(zswap) (blasint *, double *, blasint *, double *, blasint *);
52 void BLASFUNC_REF(xswap) (blasint *, xdouble *, blasint *, xdouble *, blasint *);
53
54 void BLASFUNC_REF(saxpy) (blasint *, float  *, float  *, blasint *, float  *, blasint *);
55 void BLASFUNC_REF(daxpy) (blasint *, double *, double *, blasint *, double *, blasint *);
56 void BLASFUNC_REF(caxpy) (blasint *, float  *, float  *, blasint *, float  *, blasint *);
57 void BLASFUNC_REF(zaxpy) (blasint *, double *, double *, blasint *, double *, blasint *);
58
59 float   _Complex BLASFUNC_REF(cdotu)  (blasint *, float  *, blasint *, float  *, blasint *);
60 float   _Complex BLASFUNC_REF(cdotc)  (blasint *, float  *, blasint *, float  *, blasint *);
61 double  _Complex BLASFUNC_REF(zdotu)  (blasint *, double  *, blasint *, double  *, blasint *);
62 double  _Complex BLASFUNC_REF(zdotc)  (blasint *, double  *, blasint *, double  *, blasint *);
63
64 void BLASFUNC_REF(drotmg)(double *, double *, double *, double *, double *);
65
66 double BLASFUNC_REF(dsdot)(blasint *, float *, blasint *, float *, blasint*);
67
68 FLOATRET  BLASFUNC_REF(samax) (blasint *, float  *, blasint *);
69
70 #endif