Mentions légales du service

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

Update MatGeneric::to_string for MatPerm and MatButterfly compatibility.

parent 6cd0367d
Branches
Tags
No related merge requests found
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
// useful for optimize with multiplication // useful for optimize with multiplication
#include "faust_Timer.h" #include "faust_Timer.h"
#include "faust_MatBSR.h" #include "faust_MatBSR.h"
#include "faust_MatPerm.h"
#include "faust_MatButterfly.h"
template<typename FPP,FDevice DEVICE> template<typename FPP,FDevice DEVICE>
...@@ -151,6 +153,10 @@ std::string Faust::MatGeneric<FPP,DEVICE>::to_string(const bool transpose /* set ...@@ -151,6 +153,10 @@ std::string Faust::MatGeneric<FPP,DEVICE>::to_string(const bool transpose /* set
type = Diag; type = Diag;
else if (dynamic_cast<const MatBSR<FPP, DEVICE>*>(this)) else if (dynamic_cast<const MatBSR<FPP, DEVICE>*>(this))
type = BSR; type = BSR;
else if (dynamic_cast<const MatPerm<FPP, DEVICE>*>(this))
type = Perm;
else if (dynamic_cast<const MatButterfly<FPP, DEVICE>*>(this))
type = Butterfly;
else else
throw std::runtime_error("Unhandled matrix type in MatGeneric::to_string()"); // shouldn't happen throw std::runtime_error("Unhandled matrix type in MatGeneric::to_string()"); // shouldn't happen
return this->to_string(getNbRow(), getNbCol(), transpose, this->density(), this->getNonZeros(), this->is_identity, type); return this->to_string(getNbRow(), getNbCol(), transpose, this->density(), this->getNonZeros(), this->is_identity, type);
...@@ -186,6 +192,10 @@ std::string Faust::MatGeneric<FPP,DEVICE>::to_string(int32_t nrows, int32_t ncol ...@@ -186,6 +192,10 @@ std::string Faust::MatGeneric<FPP,DEVICE>::to_string(int32_t nrows, int32_t ncol
str << "DIAG,"; str << "DIAG,";
else if(type == BSR) else if(type == BSR)
str << "BSR,"; str << "BSR,";
else if(type == Perm)
str << "PERM,";
else if(type == Butterfly)
str << "Butterfly,";
else if(type == None) else if(type == None)
str << "UNKNOWN MATRIX TYPE,"; str << "UNKNOWN MATRIX TYPE,";
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment