/root/doris/contrib/openblas/kernel/generic/rotm.c
Line | Count | Source |
1 | | /*************************************************************************** |
2 | | Copyright (c) 2013, The OpenBLAS Project |
3 | | All rights reserved. |
4 | | Redistribution and use in source and binary forms, with or without |
5 | | modification, are permitted provided that the following conditions are |
6 | | met: |
7 | | 1. Redistributions of source code must retain the above copyright |
8 | | notice, this list of conditions and the following disclaimer. |
9 | | 2. Redistributions in binary form must reproduce the above copyright |
10 | | notice, this list of conditions and the following disclaimer in |
11 | | the documentation and/or other materials provided with the |
12 | | distribution. |
13 | | 3. Neither the name of the OpenBLAS project nor the names of |
14 | | its contributors may be used to endorse or promote products |
15 | | derived from this software without specific prior written permission. |
16 | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
17 | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
18 | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
19 | | ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE |
20 | | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
21 | | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
22 | | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
23 | | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
24 | | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE |
25 | | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | | *****************************************************************************/ |
27 | | |
28 | | #include "common.h" |
29 | | |
30 | | int CNAME(BLASLONG n, FLOAT *dx, BLASLONG incx, FLOAT *dy, BLASLONG incy, FLOAT *dparam) |
31 | 0 | { |
32 | 0 | BLASLONG i__1, i__2; |
33 | 0 | BLASLONG i__; |
34 | 0 | FLOAT w, z__; |
35 | 0 | BLASLONG kx, ky; |
36 | 0 | FLOAT dh11, dh12, dh22, dh21, dflag; |
37 | 0 | BLASLONG nsteps; |
38 | |
|
39 | 0 | --dparam; |
40 | 0 | --dy; |
41 | 0 | --dx; |
42 | |
|
43 | 0 | dflag = dparam[1]; |
44 | 0 | if (n <= 0 || dflag == - 2.0) goto L140; |
45 | | |
46 | 0 | if (! (incx == incy && incx > 0)) goto L70; |
47 | | |
48 | 0 | nsteps = n * incx; |
49 | 0 | if (dflag < 0.) { |
50 | 0 | goto L50; |
51 | 0 | } else if (dflag == 0) { |
52 | 0 | goto L10; |
53 | 0 | } else { |
54 | 0 | goto L30; |
55 | 0 | } |
56 | 0 | L10: |
57 | 0 | dh12 = dparam[4]; |
58 | 0 | dh21 = dparam[3]; |
59 | 0 | i__1 = nsteps; |
60 | 0 | i__2 = incx; |
61 | 0 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
62 | 0 | w = dx[i__]; |
63 | 0 | z__ = dy[i__]; |
64 | 0 | dx[i__] = w + z__ * dh12; |
65 | 0 | dy[i__] = w * dh21 + z__; |
66 | | /* L20: */ |
67 | 0 | } |
68 | 0 | goto L140; |
69 | 0 | L30: |
70 | 0 | dh11 = dparam[2]; |
71 | 0 | dh22 = dparam[5]; |
72 | 0 | i__2 = nsteps; |
73 | 0 | i__1 = incx; |
74 | 0 | for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) { |
75 | 0 | w = dx[i__]; |
76 | 0 | z__ = dy[i__]; |
77 | 0 | dx[i__] = w * dh11 + z__; |
78 | 0 | dy[i__] = -w + dh22 * z__; |
79 | | /* L40: */ |
80 | 0 | } |
81 | 0 | goto L140; |
82 | 0 | L50: |
83 | 0 | dh11 = dparam[2]; |
84 | 0 | dh12 = dparam[4]; |
85 | 0 | dh21 = dparam[3]; |
86 | 0 | dh22 = dparam[5]; |
87 | 0 | i__1 = nsteps; |
88 | 0 | i__2 = incx; |
89 | 0 | for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { |
90 | 0 | w = dx[i__]; |
91 | 0 | z__ = dy[i__]; |
92 | 0 | dx[i__] = w * dh11 + z__ * dh12; |
93 | 0 | dy[i__] = w * dh21 + z__ * dh22; |
94 | | /* L60: */ |
95 | 0 | } |
96 | 0 | goto L140; |
97 | 0 | L70: |
98 | 0 | kx = 1; |
99 | 0 | ky = 1; |
100 | 0 | if (incx < 0) { |
101 | 0 | kx = (1 - n) * incx + 1; |
102 | 0 | } |
103 | 0 | if (incy < 0) { |
104 | 0 | ky = (1 - n) * incy + 1; |
105 | 0 | } |
106 | |
|
107 | 0 | if (dflag < 0.) { |
108 | 0 | goto L120; |
109 | 0 | } else if (dflag == 0) { |
110 | 0 | goto L80; |
111 | 0 | } else { |
112 | 0 | goto L100; |
113 | 0 | } |
114 | 0 | L80: |
115 | 0 | dh12 = dparam[4]; |
116 | 0 | dh21 = dparam[3]; |
117 | 0 | i__2 = n; |
118 | 0 | for (i__ = 1; i__ <= i__2; ++i__) { |
119 | 0 | w = dx[kx]; |
120 | 0 | z__ = dy[ky]; |
121 | 0 | dx[kx] = w + z__ * dh12; |
122 | 0 | dy[ky] = w * dh21 + z__; |
123 | 0 | kx += incx; |
124 | 0 | ky += incy; |
125 | | /* L90: */ |
126 | 0 | } |
127 | 0 | goto L140; |
128 | 0 | L100: |
129 | 0 | dh11 = dparam[2]; |
130 | 0 | dh22 = dparam[5]; |
131 | 0 | i__2 = n; |
132 | 0 | for (i__ = 1; i__ <= i__2; ++i__) { |
133 | 0 | w = dx[kx]; |
134 | 0 | z__ = dy[ky]; |
135 | 0 | dx[kx] = w * dh11 + z__; |
136 | 0 | dy[ky] = -w + dh22 * z__; |
137 | 0 | kx += incx; |
138 | 0 | ky += incy; |
139 | | /* L110: */ |
140 | 0 | } |
141 | 0 | goto L140; |
142 | 0 | L120: |
143 | 0 | dh11 = dparam[2]; |
144 | 0 | dh12 = dparam[4]; |
145 | 0 | dh21 = dparam[3]; |
146 | 0 | dh22 = dparam[5]; |
147 | 0 | i__2 = n; |
148 | 0 | for (i__ = 1; i__ <= i__2; ++i__) { |
149 | 0 | w = dx[kx]; |
150 | 0 | z__ = dy[ky]; |
151 | 0 | dx[kx] = w * dh11 + z__ * dh12; |
152 | 0 | dy[ky] = w * dh21 + z__ * dh22; |
153 | 0 | kx += incx; |
154 | 0 | ky += incy; |
155 | | /* L130: */ |
156 | 0 | } |
157 | 0 | L140: |
158 | 0 | return(0); |
159 | 0 | } Unexecuted instantiation: srotm_k_PRESCOTT Unexecuted instantiation: drotm_k_PRESCOTT Unexecuted instantiation: srotm_k_CORE2 Unexecuted instantiation: drotm_k_CORE2 Unexecuted instantiation: srotm_k_NEHALEM Unexecuted instantiation: drotm_k_NEHALEM Unexecuted instantiation: srotm_k_BARCELONA Unexecuted instantiation: drotm_k_BARCELONA Unexecuted instantiation: srotm_k_SANDYBRIDGE Unexecuted instantiation: drotm_k_SANDYBRIDGE Unexecuted instantiation: srotm_k_BULLDOZER Unexecuted instantiation: drotm_k_BULLDOZER Unexecuted instantiation: srotm_k_PILEDRIVER Unexecuted instantiation: drotm_k_PILEDRIVER Unexecuted instantiation: srotm_k_STEAMROLLER Unexecuted instantiation: drotm_k_STEAMROLLER Unexecuted instantiation: srotm_k_EXCAVATOR Unexecuted instantiation: drotm_k_EXCAVATOR Unexecuted instantiation: srotm_k_HASWELL Unexecuted instantiation: drotm_k_HASWELL Unexecuted instantiation: srotm_k_ZEN Unexecuted instantiation: drotm_k_ZEN |