monolish  0.14.2
MONOlithic LIner equation Solvers for Highly-parallel architecture
monolish_crs_vml.hpp
Go to the documentation of this file.
1 // this code is generated by gen_crs_vml.sh
2 #pragma once
3 
4 #include "../common/monolish_common.hpp"
5 
10 namespace monolish::vml {
11 
26 void add(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
28 void add(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
30 
45 void sub(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
47 void sub(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
49 
64 void mul(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
66 void mul(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
68 
83 void div(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
85 void div(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
87 
102 void add(const matrix::CRS<double> &A, const double alpha,
104 void add(const matrix::CRS<float> &A, const float alpha, matrix::CRS<float> &C);
105 
120 void sub(const matrix::CRS<double> &A, const double alpha,
122 void sub(const matrix::CRS<float> &A, const float alpha, matrix::CRS<float> &C);
123 
138 void mul(const matrix::CRS<double> &A, const double alpha,
140 void mul(const matrix::CRS<float> &A, const float alpha, matrix::CRS<float> &C);
141 
156 void div(const matrix::CRS<double> &A, const double alpha,
158 void div(const matrix::CRS<float> &A, const float alpha, matrix::CRS<float> &C);
159 
172 void pow(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
174 void pow(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
175  matrix::CRS<float> &C);
176 
190 void pow(const matrix::CRS<double> &A, const double alpha,
192 void pow(const matrix::CRS<float> &A, const float alpha, matrix::CRS<float> &C);
193 
205 void sin(const matrix::CRS<double> &A, matrix::CRS<double> &C);
206 void sin(const matrix::CRS<float> &A, matrix::CRS<float> &C);
207 
219 void sqrt(const matrix::CRS<double> &A, matrix::CRS<double> &C);
220 void sqrt(const matrix::CRS<float> &A, matrix::CRS<float> &C);
221 
233 void sinh(const matrix::CRS<double> &A, matrix::CRS<double> &C);
234 void sinh(const matrix::CRS<float> &A, matrix::CRS<float> &C);
235 
247 void asin(const matrix::CRS<double> &A, matrix::CRS<double> &C);
248 void asin(const matrix::CRS<float> &A, matrix::CRS<float> &C);
249 
262 void asinh(const matrix::CRS<float> &A, matrix::CRS<float> &C);
263 
275 void tan(const matrix::CRS<double> &A, matrix::CRS<double> &C);
276 void tan(const matrix::CRS<float> &A, matrix::CRS<float> &C);
277 
289 void tanh(const matrix::CRS<double> &A, matrix::CRS<double> &C);
290 void tanh(const matrix::CRS<float> &A, matrix::CRS<float> &C);
291 
303 void atan(const matrix::CRS<double> &A, matrix::CRS<double> &C);
304 void atan(const matrix::CRS<float> &A, matrix::CRS<float> &C);
305 
318 void atanh(const matrix::CRS<float> &A, matrix::CRS<float> &C);
319 
331 void ceil(const matrix::CRS<double> &A, matrix::CRS<double> &C);
332 void ceil(const matrix::CRS<float> &A, matrix::CRS<float> &C);
333 
346 void floor(const matrix::CRS<float> &A, matrix::CRS<float> &C);
347 
359 void sign(const matrix::CRS<double> &A, matrix::CRS<double> &C);
360 void sign(const matrix::CRS<float> &A, matrix::CRS<float> &C);
361 
376 void max(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
378 void max(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
379  matrix::CRS<float> &C);
380 
395 void min(const matrix::CRS<double> &A, const matrix::CRS<double> &B,
397 void min(const matrix::CRS<float> &A, const matrix::CRS<float> &B,
398  matrix::CRS<float> &C);
399 
411 [[nodiscard]] double max(const matrix::CRS<double> &C);
412 [[nodiscard]] float max(const matrix::CRS<float> &C);
413 
425 [[nodiscard]] double min(const matrix::CRS<double> &C);
426 [[nodiscard]] float min(const matrix::CRS<float> &C);
427 
441 } // namespace monolish::vml
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
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
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::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
monolish::vml
Vector and Matrix element-wise math library.
Definition: monolish_crs_vml.hpp:10
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
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
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
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
monolish::matrix::CRS
Compressed Row Storage (CRS) format Matrix.
Definition: monolish_coo.hpp:36
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