Go to the source code of this file.
dgrmatrix*dcovector operator
Definition at line 3 of file dgrmatrix-dcovector.hpp.
References _(), dgrmatrix::a, dcovector::array, i(), dgrmatrix::ia, dgrmatrix::ja, dcovector::l, dgrmatrix::m, and dgrmatrix::n.
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
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)
_dcovector _(dcovector &vec)