Mentions légales du service

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

Fix Transform<FPP,GPU2> is_fact_sparse/dense (copy is useless) and...

Fix Transform<FPP,GPU2> is_fact_sparse/dense (copy is useless) and iterator::operator++ (recursive infinite call).
parent 1e3a3b27
Branches
Tags
No related merge requests found
...@@ -329,14 +329,13 @@ namespace Faust ...@@ -329,14 +329,13 @@ namespace Faust
template<> template<>
bool Faust::Transform<@FAUST_SCALAR_FOR_GM@, GPU2>::is_fact_sparse(int id) const bool Faust::Transform<@FAUST_SCALAR_FOR_GM@, GPU2>::is_fact_sparse(int id) const
{ {
return get_fact(id)->getType() == Sparse; return get_fact(id, /*cloning*/ false)->getType() == Sparse;
} }
template<> template<>
bool Faust::Transform<@FAUST_SCALAR_FOR_GM@, GPU2>::is_fact_dense(int id) const bool Faust::Transform<@FAUST_SCALAR_FOR_GM@, GPU2>::is_fact_dense(int id) const
{ {
return get_fact(id)->getType() == Dense; return get_fact(id, /*cloning*/ false)->getType() == Dense;
} }
template<> template<>
...@@ -399,7 +398,7 @@ namespace Faust ...@@ -399,7 +398,7 @@ namespace Faust
Transform<@FAUST_SCALAR_FOR_GM@,GPU2>::iterator Transform<@FAUST_SCALAR_FOR_GM@,GPU2>::iterator::operator++(int) Transform<@FAUST_SCALAR_FOR_GM@,GPU2>::iterator Transform<@FAUST_SCALAR_FOR_GM@,GPU2>::iterator::operator++(int)
{ {
iterator copy(*this); iterator copy(*this);
(*this)++; this->index++;
return copy; return copy;
} }
......
...@@ -41,12 +41,12 @@ namespace Faust ...@@ -41,12 +41,12 @@ namespace Faust
void scalarMultiply(const FPP& alpha); void scalarMultiply(const FPP& alpha);
MatDense<FPP,GPU2> get_product(const char opThis='N', const bool isConj=false) const; MatDense<FPP,GPU2> get_product(const char opThis='N', const bool isConj=false) const;
void get_product(MatDense<FPP,GPU2>& M, const char opThis='N', const bool isConj=false) const; void get_product(MatDense<FPP,GPU2>& M, const char opThis='N', const bool isConj=false) const;
MatDense<FPP,GPU2> multiply(const Faust::MatDense<FPP,GPU2> &A, const char opThis); MatDense<FPP,GPU2> multiply(const MatDense<FPP,GPU2> &A, const char opThis);
void multiply(const Transform<FPP,GPU2> & A); void multiply(const Transform<FPP,GPU2> & A);
void multiplyLeft(const Transform<FPP,GPU2> & A); void multiplyLeft(const Transform<FPP,GPU2> & A);
void multiply(const FPP& a); void multiply(const FPP& a);
Real<FPP> spectralNorm(int32_t nb_iter_max, float threshold, int& flag); Real<FPP> spectralNorm(int32_t nb_iter_max, float threshold, int& flag);
// using transf_iterator = typename std::vector<Faust::MatGeneric<FPP,Cpu>*>::const_iterator; // using transf_iterator = typename std::vector<MatGeneric<FPP,Cpu>*>::const_iterator;
// //
// transf_iterator begin() const; // transf_iterator begin() const;
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment