Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2f3e20e5 authored by hhakim's avatar hhakim
Browse files

Handle adjoint case in MatDiag::multiply.

parent a09027b7
No related branches found
No related tags found
No related merge requests found
...@@ -43,23 +43,19 @@ Faust::Vect<FPP,Cpu> Faust::MatDiag<FPP>::multiply(const Vect<FPP,Cpu> &v) const ...@@ -43,23 +43,19 @@ Faust::Vect<FPP,Cpu> Faust::MatDiag<FPP>::multiply(const Vect<FPP,Cpu> &v) const
template<typename FPP> template<typename FPP>
void Faust::MatDiag<FPP>::multiply(Faust::Vect<FPP,Cpu> & vec, char opThis) const void Faust::MatDiag<FPP>::multiply(Faust::Vect<FPP,Cpu> & vec, char opThis) const
{ {
if(opThis == 'T') if(opThis = 'H')
{ vec.vec = mat.conjugate() * vec.vec;
Faust::MatDiag<FPP> tmat(this->getNbCol(), this->getNbRow(), this->getData()); else //if (opThis == 'N' || opThis == 'T')
vec.vec = tmat.mat * vec.vec; vec.vec = mat * vec.vec;
}
else vec.vec = mat * vec.vec;
} }
template<typename FPP> template<typename FPP>
void Faust::MatDiag<FPP>::multiply(MatDense<FPP,Cpu> & M, char opThis) const void Faust::MatDiag<FPP>::multiply(MatDense<FPP,Cpu> & M, char opThis) const
{ {
if (opThis == 'N') if(opThis = 'H')
M.mat = this->mat * M.mat; M.mat = mat.conjugate() * M.mat;
else { else //if (opThis == 'N' || opThis == 'T')
Faust::MatDiag<FPP> tmat(this->getNbCol(), this->getNbRow(), this->getData()); M.mat = mat * M.mat;
M.mat = tmat.mat * M.mat;
}
} }
template<typename FPP> template<typename FPP>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment