monolish  0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
matrix_vml.cpp
Go to the documentation of this file.
1 // this code is generated by gen_matrix_vml.sh
2 #include "../../../include/monolish_vml.hpp"
3 #include "../../internal/monolish_internal.hpp"
10 #include "./math_1_3op/matpow.hpp"
11 #include "./math_2op/matasin.hpp"
12 #include "./math_2op/matasinh.hpp"
13 #include "./math_2op/matatan.hpp"
14 #include "./math_2op/matatanh.hpp"
15 #include "./math_2op/matceil.hpp"
16 #include "./math_2op/matfloor.hpp"
18 #include "./math_2op/matsign.hpp"
19 #include "./math_2op/matsin.hpp"
20 #include "./math_2op/matsinh.hpp"
21 #include "./math_2op/matsqrt.hpp"
22 #include "./math_2op/mattan.hpp"
23 #include "./math_2op/mattanh.hpp"
24 
25 namespace monolish {
26 namespace vml {
27 
30  mmadd_core(A, B, C);
31 }
34  mmadd_core(A, B, C);
35 }
38  mmsub_core(A, B, C);
39 }
42  mmsub_core(A, B, C);
43 }
46  mmmul_core(A, B, C);
47 }
50  mmmul_core(A, B, C);
51 }
54  mmdiv_core(A, B, C);
55 }
58  mmdiv_core(A, B, C);
59 }
60 
61 void add(const matrix::Dense<double> &A, const double alpha,
63  smadd_core(A, alpha, C);
64 }
65 void add(const matrix::Dense<float> &A, const float alpha,
67  smadd_core(A, alpha, C);
68 }
69 void sub(const matrix::Dense<double> &A, const double alpha,
71  smsub_core(A, alpha, C);
72 }
73 void sub(const matrix::Dense<float> &A, const float alpha,
75  smsub_core(A, alpha, C);
76 }
77 void mul(const matrix::Dense<double> &A, const double alpha,
79  smmul_core(A, alpha, C);
80 }
81 void mul(const matrix::Dense<float> &A, const float alpha,
83  smmul_core(A, alpha, C);
84 }
85 void div(const matrix::Dense<double> &A, const double alpha,
87  smdiv_core(A, alpha, C);
88 }
89 void div(const matrix::Dense<float> &A, const float alpha,
91  smdiv_core(A, alpha, C);
92 }
93 
96  mmpow_core(A, B, C);
97 }
100  mmpow_core(A, B, C);
101 }
102 void pow(const matrix::Dense<double> &A, const double alpha,
104  smpow_core(A, alpha, C);
105 }
106 void pow(const matrix::Dense<float> &A, const float alpha,
108  smpow_core(A, alpha, C);
109 }
110 
112  msin_core(A, C);
113 }
115  msin_core(A, C);
116 }
118  msqrt_core(A, C);
119 }
121  msqrt_core(A, C);
122 }
124  msinh_core(A, C);
125 }
127  msinh_core(A, C);
128 }
130  masin_core(A, C);
131 }
133  masin_core(A, C);
134 }
136  masinh_core(A, C);
137 }
139  masinh_core(A, C);
140 }
142  mtan_core(A, C);
143 }
145  mtan_core(A, C);
146 }
148  mtanh_core(A, C);
149 }
151  mtanh_core(A, C);
152 }
154  matan_core(A, C);
155 }
157  matan_core(A, C);
158 }
160  matanh_core(A, C);
161 }
163  matanh_core(A, C);
164 }
166  mceil_core(A, C);
167 }
169  mceil_core(A, C);
170 }
172  mfloor_core(A, C);
173 }
175  mfloor_core(A, C);
176 }
178  msign_core(A, C);
179 }
181  msign_core(A, C);
182 }
184  mreciprocal_core(A, C);
185 }
187  mreciprocal_core(A, C);
188 }
189 
192  mmmax_core(A, B, C);
193 }
196  mmmax_core(A, B, C);
197 }
200  mmmin_core(A, B, C);
201 }
204  mmmin_core(A, B, C);
205 }
206 
207 double max(const matrix::Dense<double> &C) {
208  return mmax_core<matrix::Dense<double>, double>(C);
209 }
210 float max(const matrix::Dense<float> &C) {
211  return mmax_core<matrix::Dense<float>, float>(C);
212 }
213 double min(const matrix::Dense<double> &C) {
214  return mmin_core<matrix::Dense<double>, double>(C);
215 }
216 float min(const matrix::Dense<float> &C) {
217  return mmin_core<matrix::Dense<float>, float>(C);
218 }
219 
221  matrix::CRS<double> &C) {
222  mmadd_core(A, B, C);
223 }
224 void add(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
225  matrix::CRS<float> &C) {
226  mmadd_core(A, B, C);
227 }
229  matrix::CRS<double> &C) {
230  mmsub_core(A, B, C);
231 }
232 void sub(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
233  matrix::CRS<float> &C) {
234  mmsub_core(A, B, C);
235 }
237  matrix::CRS<double> &C) {
238  mmmul_core(A, B, C);
239 }
240 void mul(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
241  matrix::CRS<float> &C) {
242  mmmul_core(A, B, C);
243 }
245  matrix::CRS<double> &C) {
246  mmdiv_core(A, B, C);
247 }
248 void div(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
249  matrix::CRS<float> &C) {
250  mmdiv_core(A, B, C);
251 }
252 
253 void add(const matrix::CRS<double> &A, const double alpha,
254  matrix::CRS<double> &C) {
255  smadd_core(A, alpha, C);
256 }
257 void add(const matrix::CRS<float> &A, const float alpha,
258  matrix::CRS<float> &C) {
259  smadd_core(A, alpha, C);
260 }
261 void sub(const matrix::CRS<double> &A, const double alpha,
262  matrix::CRS<double> &C) {
263  smsub_core(A, alpha, C);
264 }
265 void sub(const matrix::CRS<float> &A, const float alpha,
266  matrix::CRS<float> &C) {
267  smsub_core(A, alpha, C);
268 }
269 void mul(const matrix::CRS<double> &A, const double alpha,
270  matrix::CRS<double> &C) {
271  smmul_core(A, alpha, C);
272 }
273 void mul(const matrix::CRS<float> &A, const float alpha,
274  matrix::CRS<float> &C) {
275  smmul_core(A, alpha, C);
276 }
277 void div(const matrix::CRS<double> &A, const double alpha,
278  matrix::CRS<double> &C) {
279  smdiv_core(A, alpha, C);
280 }
281 void div(const matrix::CRS<float> &A, const float alpha,
282  matrix::CRS<float> &C) {
283  smdiv_core(A, alpha, C);
284 }
285 
287  matrix::CRS<double> &C) {
288  mmpow_core(A, B, C);
289 }
290 void pow(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
291  matrix::CRS<float> &C) {
292  mmpow_core(A, B, C);
293 }
294 void pow(const matrix::CRS<double> &A, const double alpha,
295  matrix::CRS<double> &C) {
296  smpow_core(A, alpha, C);
297 }
298 void pow(const matrix::CRS<float> &A, const float alpha,
299  matrix::CRS<float> &C) {
300  smpow_core(A, alpha, C);
301 }
302 
304  msin_core(A, C);
305 }
307  msin_core(A, C);
308 }
310  msqrt_core(A, C);
311 }
313  msqrt_core(A, C);
314 }
316  msinh_core(A, C);
317 }
319  msinh_core(A, C);
320 }
322  masin_core(A, C);
323 }
325  masin_core(A, C);
326 }
328  masinh_core(A, C);
329 }
331  masinh_core(A, C);
332 }
334  mtan_core(A, C);
335 }
337  mtan_core(A, C);
338 }
340  mtanh_core(A, C);
341 }
343  mtanh_core(A, C);
344 }
346  matan_core(A, C);
347 }
349  matan_core(A, C);
350 }
352  matanh_core(A, C);
353 }
355  matanh_core(A, C);
356 }
358  mceil_core(A, C);
359 }
361  mceil_core(A, C);
362 }
364  mfloor_core(A, C);
365 }
367  mfloor_core(A, C);
368 }
370  msign_core(A, C);
371 }
373  msign_core(A, C);
374 }
376  mreciprocal_core(A, C);
377 }
379  mreciprocal_core(A, C);
380 }
381 
383  matrix::CRS<double> &C) {
384  mmmax_core(A, B, C);
385 }
386 void max(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
387  matrix::CRS<float> &C) {
388  mmmax_core(A, B, C);
389 }
391  matrix::CRS<double> &C) {
392  mmmin_core(A, B, C);
393 }
394 void min(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
395  matrix::CRS<float> &C) {
396  mmmin_core(A, B, C);
397 }
398 
399 double max(const matrix::CRS<double> &C) {
400  return mmax_core<matrix::CRS<double>, double>(C);
401 }
402 float max(const matrix::CRS<float> &C) {
403  return mmax_core<matrix::CRS<float>, float>(C);
404 }
405 double min(const matrix::CRS<double> &C) {
406  return mmin_core<matrix::CRS<double>, double>(C);
407 }
408 float min(const matrix::CRS<float> &C) {
409  return mmin_core<matrix::CRS<float>, float>(C);
410 }
411 
412 } // namespace vml
413 } // namespace monolish
matsqrt.hpp
matatanh.hpp
monolish::vml::ceil
void ceil(const matrix::CRS< double > &A, matrix::CRS< double > &C)
ceil to CRS matrix elements (C[0:nnz] = ceil(A[0:nnz]))
Definition: matrix_vml.cpp:357
monolish::vml::min
void min(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
Create a new CRS matrix with smallest elements of two matrices (C[0:nnz] = min(A[0:nnz],...
Definition: matrix_vml.cpp:390
monolish::vml::asinh
void asinh(const matrix::CRS< double > &A, matrix::CRS< double > &C)
asinh to CRS matrix elements (C[0:nnz] = asinh(A[0:nnz]))
Definition: matrix_vml.cpp:327
matceil.hpp
monolish::vml::max
void max(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
Create a new CRS matrix with greatest elements of two matrices (C[0:nnz] = max(A[0:nnz],...
Definition: matrix_vml.cpp:382
monolish::vml::sub
void sub(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
element by element subtract CRS matrix A and CRS matrix B.
Definition: matrix_vml.cpp:228
matsin.hpp
monolish::vml::sinh
void sinh(const matrix::CRS< double > &A, matrix::CRS< double > &C)
sinh to CRS matrix elements (C[0:nnz] = sinh(A[0:nnz]))
Definition: matrix_vml.cpp:315
monolish::matrix::Dense
Dense format Matrix.
Definition: monolish_coo.hpp:28
monolish::vml::sqrt
void sqrt(const matrix::CRS< double > &A, matrix::CRS< double > &C)
sqrt to CRS matrix elements (C[0:nnz] = sqrt(A[0:nnz]))
Definition: matrix_vml.cpp:309
monolish::vml::reciprocal
void reciprocal(const matrix::CRS< double > &a, matrix::CRS< double > &y)
reciprocal to CRS matrix elements (C[0:nnz] = 1 / A[0:nnz])
Definition: matrix_vml.cpp:375
matmax.hpp
matdiv.hpp
matsub.hpp
matmul.hpp
mattan.hpp
matasinh.hpp
matsign.hpp
monolish::vml::sign
void sign(const matrix::CRS< double > &A, matrix::CRS< double > &C)
sign to CRS matrix elements (C[0:nnz] = sign(A[0:nnz]))
Definition: matrix_vml.cpp:369
mattanh.hpp
monolish
Definition: monolish_matrix_blas.hpp:9
monolish::vml::floor
void floor(const matrix::CRS< double > &A, matrix::CRS< double > &C)
floor to CRS matrix elements (C[0:nnz] = floor(A[0:nnz]))
Definition: matrix_vml.cpp:363
monolish::vml::div
void div(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
element by element division CRS matrix A and CRS matrix B.
Definition: matrix_vml.cpp:244
monolish::vml::tan
void tan(const matrix::CRS< double > &A, matrix::CRS< double > &C)
tan to CRS matrix elements (C[0:nnz] = tan(A[0:nnz]))
Definition: matrix_vml.cpp:333
monolish::vml::add
void add(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
element by element addition CRS matrix A and CRS matrix B.
Definition: matrix_vml.cpp:220
monolish::vml::tanh
void tanh(const matrix::CRS< double > &A, matrix::CRS< double > &C)
tanh to CRS matrix elements (C[0:nnz] = tanh(A[0:nnz]))
Definition: matrix_vml.cpp:339
monolish::vml::pow
void pow(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
power to CRS matrix elements CRS matrix (C[0:N] = pow(A[0:N], B[0:N]))
Definition: matrix_vml.cpp:286
matmin.hpp
matadd.hpp
matpow.hpp
monolish::vml::mul
void mul(const matrix::CRS< double > &A, const matrix::CRS< double > &B, matrix::CRS< double > &C)
element by element multiplication CRS matrix A and CRS matrix B.
Definition: matrix_vml.cpp:236
matatan.hpp
monolish::vml::sin
void sin(const matrix::CRS< double > &A, matrix::CRS< double > &C)
sin to CRS matrix elements (C[0:nnz] = sin(A[0:nnz]))
Definition: matrix_vml.cpp:303
monolish::vml::atanh
void atanh(const matrix::CRS< double > &A, matrix::CRS< double > &C)
atanh to CRS matrix elements (C[0:nnz] = atanh(A[0:nnz]))
Definition: matrix_vml.cpp:351
matsinh.hpp
matreciprocal.hpp
monolish::matrix::CRS
Compressed Row Storage (CRS) format Matrix.
Definition: monolish_coo.hpp:29
matfloor.hpp
monolish::vml::asin
void asin(const matrix::CRS< double > &A, matrix::CRS< double > &C)
asin to CRS matrix elements (C[0:nnz] = asin(A[0:nnz]))
Definition: matrix_vml.cpp:321
monolish::vml::atan
void atan(const matrix::CRS< double > &A, matrix::CRS< double > &C)
atan to CRS matrix elements (C[0:nnz] = atan(A[0:nnz]))
Definition: matrix_vml.cpp:345
matasin.hpp