libflame revision_anchor
bl1_apdiagmv.c File Reference

(r)

Functions

void bl1_sapdiagmv (side1_t side, conj1_t conj, int m, int n, float *x, int incx, float *a, int a_rs, int a_cs)
 
void bl1_dapdiagmv (side1_t side, conj1_t conj, int m, int n, double *x, int incx, double *a, int a_rs, int a_cs)
 
void bl1_csapdiagmv (side1_t side, conj1_t conj, int m, int n, float *x, int incx, scomplex *a, int a_rs, int a_cs)
 
void bl1_capdiagmv (side1_t side, conj1_t conj, int m, int n, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
 
void bl1_zdapdiagmv (side1_t side, conj1_t conj, int m, int n, double *x, int incx, dcomplex *a, int a_rs, int a_cs)
 
void bl1_zapdiagmv (side1_t side, conj1_t conj, int m, int n, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
 

Function Documentation

◆ bl1_capdiagmv()

void bl1_capdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
scomplex * x,
int incx,
scomplex * a,
int a_rs,
int a_cs )
179{
180 scomplex* chi;
181 scomplex* a_begin;
182 int inca, lda;
183 int n_iter;
184 int n_elem;
185 int j;
186
187 // Return early if possible.
188 if ( bl1_zero_dim2( m, n ) ) return;
189
190 // Initialize with optimal values for column-major storage.
191 inca = a_rs;
192 lda = a_cs;
193 n_iter = n;
194 n_elem = m;
195
196 // An optimization: if A is row-major, then we can proceed as if the
197 // operation were transposed (applying the diagonal values in x from the
198 // opposite side) for increased spatial locality.
199 if ( bl1_is_row_storage( a_rs, a_cs ) )
200 {
201 bl1_swap_ints( n_iter, n_elem );
202 bl1_swap_ints( lda, inca );
203 bl1_toggle_side( side );
204 }
205
206 if ( bl1_is_left( side ) )
207 {
208 for ( j = 0; j < n_iter; j++ )
209 {
210 a_begin = a + j*lda;
211
212 bl1_cewscalv( conj,
213 n_elem,
214 x, incx,
215 a_begin, inca );
216 }
217 }
218 else
219 {
220 for ( j = 0; j < n_iter; j++ )
221 {
222 a_begin = a + j*lda;
223 chi = x + j*incx;
224
225 bl1_cscalv( conj,
226 n_elem,
227 chi,
228 a_begin, inca );
229 }
230 }
231}
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition bl1_scalv.c:46
int bl1_is_row_storage(int rs, int cs)
Definition bl1_is.c:95
int bl1_is_left(side1_t side)
Definition bl1_is.c:61
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
void bl1_cewscalv(conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_ewscalv.c:58
Definition blis_type_defs.h:133

References bl1_cewscalv(), bl1_cscalv(), bl1_is_left(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Apply_diag_matrix().

◆ bl1_csapdiagmv()

void bl1_csapdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
float * x,
int incx,
scomplex * a,
int a_rs,
int a_cs )
124{
125 float* chi;
126 scomplex* a_begin;
127 int inca, lda;
128 int n_iter;
129 int n_elem;
130 int j;
131
132 // Return early if possible.
133 if ( bl1_zero_dim2( m, n ) ) return;
134
135 // Initialize with optimal values for column-major storage.
136 inca = a_rs;
137 lda = a_cs;
138 n_iter = n;
139 n_elem = m;
140
141 // An optimization: if A is row-major, then we can proceed as if the
142 // operation were transposed (applying the diagonal values in x from the
143 // opposite side) for increased spatial locality.
144 if ( bl1_is_row_storage( a_rs, a_cs ) )
145 {
146 bl1_swap_ints( n_iter, n_elem );
147 bl1_swap_ints( lda, inca );
148 bl1_toggle_side( side );
149 }
150
151 if ( bl1_is_left( side ) )
152 {
153 for ( j = 0; j < n_iter; j++ )
154 {
155 a_begin = a + j*lda;
156
157 bl1_csewscalv( conj,
158 n_elem,
159 x, incx,
160 a_begin, inca );
161 }
162 }
163 else
164 {
165 for ( j = 0; j < n_iter; j++ )
166 {
167 a_begin = a + j*lda;
168 chi = x + j*incx;
169
170 bl1_csscalv( conj,
171 n_elem,
172 chi,
173 a_begin, inca );
174 }
175 }
176}
void bl1_csscalv(conj1_t conj, int n, float *alpha, scomplex *x, int incx)
Definition bl1_scalv.c:35
void bl1_csewscalv(conj1_t conj, int n, float *x, int incx, scomplex *y, int incy)
Definition bl1_ewscalv.c:43

References bl1_csewscalv(), bl1_csscalv(), bl1_is_left(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Apply_diag_matrix().

◆ bl1_dapdiagmv()

void bl1_dapdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
double * x,
int incx,
double * a,
int a_rs,
int a_cs )
69{
70 double* chi;
71 double* a_begin;
72 int inca, lda;
73 int n_iter;
74 int n_elem;
75 int j;
76
77 // Return early if possible.
78 if ( bl1_zero_dim2( m, n ) ) return;
79
80 // Initialize with optimal values for column-major storage.
81 inca = a_rs;
82 lda = a_cs;
83 n_iter = n;
84 n_elem = m;
85
86 // An optimization: if A is row-major, then we can proceed as if the
87 // operation were transposed (applying the diagonal values in x from the
88 // opposite side) for increased spatial locality.
89 if ( bl1_is_row_storage( a_rs, a_cs ) )
90 {
91 bl1_swap_ints( n_iter, n_elem );
92 bl1_swap_ints( lda, inca );
93 bl1_toggle_side( side );
94 }
95
96 if ( bl1_is_left( side ) )
97 {
98 for ( j = 0; j < n_iter; j++ )
99 {
100 a_begin = a + j*lda;
101
102 bl1_dewscalv( conj,
103 n_elem,
104 x, incx,
105 a_begin, inca );
106 }
107 }
108 else
109 {
110 for ( j = 0; j < n_iter; j++ )
111 {
112 a_begin = a + j*lda;
113 chi = x + j*incx;
114
115 bl1_dscalv( conj,
116 n_elem,
117 chi,
118 a_begin, inca );
119 }
120 }
121}
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition bl1_scalv.c:24
void bl1_dewscalv(conj1_t conj, int n, double *x, int incx, double *y, int incy)
Definition bl1_ewscalv.c:28

References bl1_dewscalv(), bl1_dscalv(), bl1_is_left(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Apply_diag_matrix().

◆ bl1_sapdiagmv()

void bl1_sapdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
float * x,
int incx,
float * a,
int a_rs,
int a_cs )
14{
15 float* chi;
16 float* a_begin;
17 int inca, lda;
18 int n_iter;
19 int n_elem;
20 int j;
21
22 // Return early if possible.
23 if ( bl1_zero_dim2( m, n ) ) return;
24
25 // Initialize with optimal values for column-major storage.
26 inca = a_rs;
27 lda = a_cs;
28 n_iter = n;
29 n_elem = m;
30
31 // An optimization: if A is row-major, then we can proceed as if the
32 // operation were transposed (applying the diagonal values in x from the
33 // opposite side) for increased spatial locality.
34 if ( bl1_is_row_storage( a_rs, a_cs ) )
35 {
36 bl1_swap_ints( n_iter, n_elem );
37 bl1_swap_ints( lda, inca );
38 bl1_toggle_side( side );
39 }
40
41 if ( bl1_is_left( side ) )
42 {
43 for ( j = 0; j < n_iter; j++ )
44 {
45 a_begin = a + j*lda;
46
47 bl1_sewscalv( conj,
48 n_elem,
49 x, incx,
50 a_begin, inca );
51 }
52 }
53 else
54 {
55 for ( j = 0; j < n_iter; j++ )
56 {
57 a_begin = a + j*lda;
58 chi = x + j*incx;
59
60 bl1_sscalv( conj,
61 n_elem,
62 chi,
63 a_begin, inca );
64 }
65 }
66}
void bl1_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition bl1_scalv.c:13
void bl1_sewscalv(conj1_t conj, int n, float *x, int incx, float *y, int incy)
Definition bl1_ewscalv.c:13

References bl1_is_left(), bl1_is_row_storage(), bl1_sewscalv(), bl1_sscalv(), and bl1_zero_dim2().

Referenced by FLA_Apply_diag_matrix().

◆ bl1_zapdiagmv()

void bl1_zapdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
dcomplex * x,
int incx,
dcomplex * a,
int a_rs,
int a_cs )
289{
290 dcomplex* chi;
291 dcomplex* a_begin;
292 int inca, lda;
293 int n_iter;
294 int n_elem;
295 int j;
296
297 // Return early if possible.
298 if ( bl1_zero_dim2( m, n ) ) return;
299
300 // Initialize with optimal values for column-major storage.
301 inca = a_rs;
302 lda = a_cs;
303 n_iter = n;
304 n_elem = m;
305
306 // An optimization: if A is row-major, then we can proceed as if the
307 // operation were transposed (applying the diagonal values in x from the
308 // opposite side) for increased spatial locality.
309 if ( bl1_is_row_storage( a_rs, a_cs ) )
310 {
311 bl1_swap_ints( n_iter, n_elem );
312 bl1_swap_ints( lda, inca );
313 bl1_toggle_side( side );
314 }
315
316 if ( bl1_is_left( side ) )
317 {
318 for ( j = 0; j < n_iter; j++ )
319 {
320 a_begin = a + j*lda;
321
322 bl1_zewscalv( conj,
323 n_elem,
324 x, incx,
325 a_begin, inca );
326 }
327 }
328 else
329 {
330 for ( j = 0; j < n_iter; j++ )
331 {
332 a_begin = a + j*lda;
333 chi = x + j*incx;
334
335 bl1_zscalv( conj,
336 n_elem,
337 chi,
338 a_begin, inca );
339 }
340 }
341}
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition bl1_scalv.c:72
void bl1_zewscalv(conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_ewscalv.c:103
Definition blis_type_defs.h:138

References bl1_is_left(), bl1_is_row_storage(), bl1_zero_dim2(), bl1_zewscalv(), and bl1_zscalv().

Referenced by FLA_Apply_diag_matrix().

◆ bl1_zdapdiagmv()

void bl1_zdapdiagmv ( side1_t side,
conj1_t conj,
int m,
int n,
double * x,
int incx,
dcomplex * a,
int a_rs,
int a_cs )
234{
235 double* chi;
236 dcomplex* a_begin;
237 int inca, lda;
238 int n_iter;
239 int n_elem;
240 int j;
241
242 // Return early if possible.
243 if ( bl1_zero_dim2( m, n ) ) return;
244
245 // Initialize with optimal values for column-major storage.
246 inca = a_rs;
247 lda = a_cs;
248 n_iter = n;
249 n_elem = m;
250
251 // An optimization: if A is row-major, then we can proceed as if the
252 // operation were transposed (applying the diagonal values in x from the
253 // opposite side) for increased spatial locality.
254 if ( bl1_is_row_storage( a_rs, a_cs ) )
255 {
256 bl1_swap_ints( n_iter, n_elem );
257 bl1_swap_ints( lda, inca );
258 bl1_toggle_side( side );
259 }
260
261 if ( bl1_is_left( side ) )
262 {
263 for ( j = 0; j < n_iter; j++ )
264 {
265 a_begin = a + j*lda;
266
267 bl1_zdewscalv( conj,
268 n_elem,
269 x, incx,
270 a_begin, inca );
271 }
272 }
273 else
274 {
275 for ( j = 0; j < n_iter; j++ )
276 {
277 a_begin = a + j*lda;
278 chi = x + j*incx;
279
280 bl1_zdscalv( conj,
281 n_elem,
282 chi,
283 a_begin, inca );
284 }
285 }
286}
void bl1_zdscalv(conj1_t conj, int n, double *alpha, dcomplex *x, int incx)
Definition bl1_scalv.c:61
void bl1_zdewscalv(conj1_t conj, int n, double *x, int incx, dcomplex *y, int incy)
Definition bl1_ewscalv.c:88

References bl1_is_left(), bl1_is_row_storage(), bl1_zdewscalv(), bl1_zdscalv(), and bl1_zero_dim2().

Referenced by FLA_Apply_diag_matrix().