Main Page | Class List | File List | Class Members | File Members | Related Pages

_drovector-_dgematrix.hpp File Reference

Go to the source code of this file.

Functions

_drovector operator * (const _drovector &vec, const _dgematrix &mat)


Function Documentation

_drovector operator * const _drovector vec,
const _dgematrix mat
[inline]
 

_drovector*_dgematrix operator

Definition at line 3 of file _drovector-_dgematrix.hpp.

References _drovector::Array, _dgematrix::Array, _drovector::Desc, _dgematrix::Desc, _dgematrix::destroy(), _drovector::destroy(), _drovector::L, _dgematrix::M, and _dgematrix::N.

00004 {
00005 #ifdef  CPPSL_DEBUG
00006   if( vec.L!=mat.M ){
00007     std::cerr << "[ERROR] operator*(const _drovector&, const _dgematrix&)"
00008               << std::endl
00009               << "These vector and matrix can not make a product." << std::endl
00010               << "Your input was (" << vec.L << ") * ("
00011               << mat.M << "x" << mat.N << ")." << std::endl;
00012     exit(1);
00013   }
00014 #endif//CPPSL_DEBUG
00015   
00016   _drovector newvec(mat.N);
00017   pdgemv_( 'T', mat.M, mat.N, 1.0, mat.Array, 1, 1, mat.Desc,
00018            vec.Array, 1, 1, vec.Desc, 1, 0.0,
00019            newvec.Array, 1, 1, newvec.Desc, 1 );
00020   
00021   vec.destroy();
00022   mat.destroy();
00023   return newvec;
00024 }


Generated on Sat Jan 31 19:25:44 2004 for CPPScaLapack by doxygen 1.3.5