Mentions légales du service

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

Fix unit test on TransformHelper::pack_factors by deleting useless overload of...

Fix unit test on TransformHelper::pack_factors by deleting useless overload of this function in TransformHelperGen.
parent 69267e7f
Branches
Tags
No related merge requests found
...@@ -100,7 +100,7 @@ int main(int argc, char* argv[]) ...@@ -100,7 +100,7 @@ int main(int argc, char* argv[])
assert(th.size() == facts.size()); assert(th.size() == facts.size());
// pack factors on the right of factor index 2 // pack factors on the right of factor index 2
th.pack_factors(3, PackDir::PACK_RIGHT); th.pack_factors(3, th.size()-1);
//test it's done properly //test it's done properly
//1 number of factors //1 number of factors
...@@ -126,7 +126,7 @@ int main(int argc, char* argv[]) ...@@ -126,7 +126,7 @@ int main(int argc, char* argv[])
assert(th2.size() == facts.size()); assert(th2.size() == facts.size());
// pack factors on the left of factor index 4 // pack factors on the left of factor index 4
th2.pack_factors(3, PackDir::PACK_LEFT); th2.pack_factors(0, 3);
//test it's done properly //test it's done properly
//1 number of factors //1 number of factors
......
...@@ -91,7 +91,6 @@ namespace Faust ...@@ -91,7 +91,6 @@ namespace Faust
bool is_fact_dense(const faust_unsigned_int id) const; bool is_fact_dense(const faust_unsigned_int id) const;
void pack_factors(faust_unsigned_int start_id, faust_unsigned_int end_id, const int mul_order_opt_mode=DEFAULT); void pack_factors(faust_unsigned_int start_id, faust_unsigned_int end_id, const int mul_order_opt_mode=DEFAULT);
void pack_factors(const faust_unsigned_int id, const PackDir dir, const int mul_order_opt_mode=DEFAULT);
void pack_factors(const int mul_order_opt_mode=DEFAULT); void pack_factors(const int mul_order_opt_mode=DEFAULT);
TransformHelper<FPP,Cpu>* left(const faust_unsigned_int id, const bool copy=false) const; TransformHelper<FPP,Cpu>* left(const faust_unsigned_int id, const bool copy=false) const;
TransformHelper<FPP,Cpu>* right(const faust_unsigned_int id, const bool copy=false) const; TransformHelper<FPP,Cpu>* right(const faust_unsigned_int id, const bool copy=false) const;
......
...@@ -984,12 +984,6 @@ namespace Faust ...@@ -984,12 +984,6 @@ namespace Faust
} }
template<typename FPP>
void TransformHelperPoly<FPP>::pack_factors(const faust_unsigned_int id, const PackDir dir, const int mul_order_opt_mode/*=DEFAULT*/)
{
ERROR_ON_FAC_NUM_CHANGE();
}
template<typename FPP> template<typename FPP>
void TransformHelperPoly<FPP>::pack_factors(const int mul_order_opt_mode/*=DEFAULT*/) void TransformHelperPoly<FPP>::pack_factors(const int mul_order_opt_mode/*=DEFAULT*/)
{ {
......
...@@ -13,11 +13,6 @@ namespace Faust ...@@ -13,11 +13,6 @@ namespace Faust
template<typename FPP,FDevice DEVICE> class MatDense; template<typename FPP,FDevice DEVICE> class MatDense;
template<typename FPP,FDevice DEVICE> class MatGeneric; template<typename FPP,FDevice DEVICE> class MatGeneric;
enum PackDir {
PACK_LEFT,
PACK_RIGHT
};
enum RandFaustType { enum RandFaustType {
DENSE, DENSE,
SPARSE, SPARSE,
...@@ -69,7 +64,6 @@ namespace Faust ...@@ -69,7 +64,6 @@ namespace Faust
virtual void pack_factors(faust_unsigned_int start_id, faust_unsigned_int end_id, const int mul_order_opt_mode=DEFAULT)=0; virtual void pack_factors(faust_unsigned_int start_id, faust_unsigned_int end_id, const int mul_order_opt_mode=DEFAULT)=0;
virtual void pack_factors(const faust_unsigned_int id, const PackDir dir, const int mul_order_opt_mode=DEFAULT);
virtual void pack_factors(const int mul_order_opt_mode=DEFAULT); virtual void pack_factors(const int mul_order_opt_mode=DEFAULT);
/** /**
\brief Returns the left hand side factors of this from index 0 to id included (as a new TransformHelper obj). \brief Returns the left hand side factors of this from index 0 to id included (as a new TransformHelper obj).
......
...@@ -72,15 +72,6 @@ namespace Faust ...@@ -72,15 +72,6 @@ namespace Faust
return this->is_transposed; return this->is_transposed;
} }
template <typename FPP, FDevice DEV>
void TransformHelperGen<FPP,DEV>::pack_factors(const faust_unsigned_int id, const PackDir dir, const int mul_order_opt_mode/*=DEFAULT*/)
{
if(dir == PACK_RIGHT)
this->pack_factors(id, size()-1, mul_order_opt_mode);
else // dir == PACK_LEFT
this->pack_factors(0, id, mul_order_opt_mode);
}
template <typename FPP, FDevice DEV> template <typename FPP, FDevice DEV>
void TransformHelperGen<FPP,DEV>::pack_factors(const int mul_order_opt_mode/*=DEFAULT*/) void TransformHelperGen<FPP,DEV>::pack_factors(const int mul_order_opt_mode/*=DEFAULT*/)
{ {
...@@ -472,4 +463,6 @@ namespace Faust ...@@ -472,4 +463,6 @@ namespace Faust
{ {
return typeid(FPP) == typeid(double) || typeid(FPP) == typeid(float); return typeid(FPP) == typeid(double) || typeid(FPP) == typeid(float);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment