Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9266ea7b authored by hhakim's avatar hhakim
Browse files

Update Vect::multiplyLeft to handle adjoint matrix case.

parent 95ad86dc
Branches
Tags
No related merge requests found
......@@ -100,6 +100,7 @@ namespace Faust
template<typename FPP,FDevice DEVICE> class Transform;
template<typename FPP> class TransformHelperPoly;
template<typename FPP, FDevice DEVICE> class TransformHelper;
......@@ -117,6 +118,7 @@ namespace Faust
friend class MatBSR<FPP, Cpu>;
friend TransformHelperPoly<FPP>; // TODO: limit to needed member functions only
friend TransformHelper<FPP,Cpu>; // TODO: limit to needed member functions only (sliceMultiply at least)
public :
Vect() : dim(0), vec() {}
......
......@@ -297,10 +297,9 @@ void Faust::Vect<FPP,Cpu>::multiplyLeft(Faust::MatDense<FPP,Cpu> const& A)
template<typename FPP>
void Faust::Vect<FPP,Cpu>::multiplyLeft(Faust::MatSparse<FPP,Cpu> const& S,const char transS)
{
faust_unsigned_int nbColOpS,nbRowOpS;
faust_unsigned_int nbColOpS,nbRowOpS;
S.setOp(transS,nbRowOpS,nbColOpS);
if(nbColOpS != vec.size())
{
handleError(m_className,"multiplyLeft : incorrect dimensions");
......@@ -312,8 +311,13 @@ void Faust::Vect<FPP,Cpu>::multiplyLeft(Faust::MatSparse<FPP,Cpu> const& S,cons
#endif
if (transS == 'N')
vec = S.mat * vec;
else if(transS == 'T')
vec = S.mat.transpose() * vec;
else if(transS == 'H')
vec = S.mat.adjoint() * vec;
else
vec = S.mat.transpose() * vec;
throw std::runtime_error("Unknown op transS");
#ifdef __COMPILE_TIMERS__
t_local_multiplyLeft.stop();
//std::cout <<"0 "<<setprecision(10)<<t_local_multiplyLeft.get_time()<<std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment