Mentions légales du service

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

Add missing prototypes and fix constness in multiply(Vect) of MatButterfly.

parent 756540a9
Branches
Tags
No related merge requests found
...@@ -60,6 +60,7 @@ namespace Faust ...@@ -60,6 +60,7 @@ namespace Faust
MatGeneric<FPP,Cpu>* Clone(const bool isOptimize=false) const; MatGeneric<FPP,Cpu>* Clone(const bool isOptimize=false) const;
void multiply(Vect<FPP,Cpu> & vec, char opThis='N') const; void multiply(Vect<FPP,Cpu> & vec, char opThis='N') const;
Vect<FPP,Cpu> multiply(const Vect<FPP,Cpu> &v) const; // from LinearOperator
void multiply(MatDense<FPP,Cpu> & M, char opThis) const; void multiply(MatDense<FPP,Cpu> & M, char opThis) const;
void multiply(MatSparse<FPP, Cpu>& M, char opThis) const; void multiply(MatSparse<FPP, Cpu>& M, char opThis) const;
void multiplyRight(MatSparse<FPP, Cpu> const& M) ; void multiplyRight(MatSparse<FPP, Cpu> const& M) ;
...@@ -83,6 +84,8 @@ namespace Faust ...@@ -83,6 +84,8 @@ namespace Faust
void setZeros(); void setZeros();
bool containsNaN()const; bool containsNaN()const;
const FPP& operator()(faust_unsigned_int i, faust_unsigned_int j)const ; const FPP& operator()(faust_unsigned_int i, faust_unsigned_int j)const ;
void faust_gemm(const MatDense<FPP,Cpu> & B, MatDense<FPP,Cpu> & C,const FPP & alpha, const FPP & beta, char typeA, char typeB)const; //from LinearOperator
}; };
} }
......
...@@ -98,13 +98,22 @@ namespace Faust ...@@ -98,13 +98,22 @@ namespace Faust
} }
template<typename FPP> template<typename FPP>
void MatButterfly<FPP, Cpu>::multiply(Vect<FPP,Cpu> & x, char opThis) const Vect<FPP, Cpu> MatButterfly<FPP, Cpu>::multiply(const Vect<FPP,Cpu> & x) const
{ {
Vect<FPP, Cpu> z(x.size()); Vect<FPP, Cpu> z(x.size());
multiply(x.getData(), z.getData(), x.size(), opThis != 'N'); //TODO: conjugate const_cast<MatButterfly<FPP, Cpu>*>(this)->multiply(x.getData(), z.getData(), x.size(), false); //TODO: conjugate
return z; return z;
} }
template<typename FPP>
void MatButterfly<FPP, Cpu>::multiply(Vect<FPP,Cpu> & x, char opThis) const
{
Vect<FPP, Cpu> z(x.size());
const_cast<MatButterfly<FPP, Cpu>*>(this)->multiply(x.getData(), z.getData(), x.size(), opThis != 'N'); //TODO: conjugate
x = z;
}
template<typename FPP> template<typename FPP>
void MatButterfly<FPP, Cpu>::multiply(MatDense<FPP,Cpu> & M, char opThis) const void MatButterfly<FPP, Cpu>::multiply(MatDense<FPP,Cpu> & M, char opThis) const
{ {
...@@ -190,6 +199,14 @@ namespace Faust ...@@ -190,6 +199,14 @@ namespace Faust
#endif #endif
} }
template<typename FPP>
void MatButterfly<FPP, Cpu>::faust_gemm(const MatDense<FPP,Cpu> & B, MatDense<FPP,Cpu> & C,const FPP & alpha, const FPP & beta, char typeA, char typeB)const
{
//TODO
}
template<typename FPP> template<typename FPP>
void MatButterfly<FPP, Cpu>::transpose() void MatButterfly<FPP, Cpu>::transpose()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment