Mentions légales du service

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

Add the capability to do an optimized copy of factors to another Faust::Transform's constructor.

It's an optional argument (default value is false)
parent 3730fd3f
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,7 @@ namespace Faust
/** \brief Constructor
* \param facts : Vector including dense matrix*/
Transform(const std::vector<Faust::MatDense<FPP,Cpu> >&facts);
Transform(const std::vector<Faust::MatDense<FPP,Cpu> >&facts, const bool optimizedCopy=false);
//void get_facts(std::vector<Faust::MatSparse<FPP,Cpu> >& sparse_facts)const{sparse_facts = data;}
//void get_facts(std::vector<Faust::MatDense<FPP,Cpu> >& facts)const;
......
......@@ -211,13 +211,13 @@ Faust::Transform<FPP,Cpu>::Transform(const std::vector<Faust::MatGeneric<FPP,Cpu
}
template<typename FPP>
Faust::Transform<FPP,Cpu>::Transform(const std::vector<Faust::MatDense<FPP,Cpu> >&facts): data(std::vector<Faust::MatGeneric<FPP,Cpu>*>()),
Faust::Transform<FPP,Cpu>::Transform(const std::vector<Faust::MatDense<FPP,Cpu> >&facts, const bool optimizedCopy /*default value = false*/ ): data(std::vector<Faust::MatGeneric<FPP,Cpu>*>()),
totalNonZeros(0)
{
data.resize(facts.size());
for (int i=0 ; i<data.size() ; i++)
{
data[i]=facts[i].Clone();
data[i]=facts[i].Clone(optimizedCopy);
totalNonZeros += data[i]->getNonZeros();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment