8 std::cerr <<
"These matrix and vector can not make a product." << std::endl
9 <<
"Your input was (" << mat.
m <<
"x" << mat.
n <<
") * (" << vec.
l <<
")." << std::endl;
14 #ifdef __INTEL_COMPILER
17 MKL_INT m =MKL_INT(mat.
m);
18 double* a =
const_cast<double*
>(&mat.
a[0]);
19 MKL_INT* ia =
const_cast<MKL_INT*
>(&mat.
ia[0]);
20 MKL_INT* ja =
const_cast<MKL_INT*
>(&mat.
ja[0]);
21 MKL_DCSRGEMV(&transa, &m, a, ia, ja, vec.
array, newvec.
array);
25 #else //__INTEL_COMPILER is not defined
27 #pragma omp parallel for
28 for(CPPL_INT
i=0;
i<mat.
m;
i++){
30 int k_beg =mat.
ia[
i]-1;
31 int k_end =mat.
ia[
i+1]-1;
32 for(
int k=k_beg; k<k_end; k++){
34 sum += mat.
a[k] * vec(j);
39 #endif//__INTEL_COMPILER
std::vector< double > a
matrix component values
std::vector< CPPL_INT > ia
rowIndex (NOT zero-based BUT one-based indexing)
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
double * array
1D array to store vector data
_dcovector operator*(const dgrmatrix &mat, const dcovector &vec)
Real Double-precision Column Vector Class.
CPPL_INT m
matrix row size
std::vector< CPPL_INT > ja
columns (NOT zero-based BUT one-based indexing)
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
_dcovector _(dcovector &vec)
Real Double-precision General Compressed Sparse Row (CSR) Matrix Class.