Mentions légales du service

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

Rename Device type to FDevice to avoid conflicts with torchlib (both Faust and...

Rename Device type to FDevice to avoid conflicts with torchlib (both Faust and libtorch use this name type out of namespace), remove also 'using namespace ...' in some headers (where they shouldn't be).
parent 5bd062b1
No related branches found
No related tags found
No related merge requests found
Showing
with 129 additions and 129 deletions
......@@ -68,9 +68,9 @@ namespace Faust
{
class ConstraintGeneric;
template<typename FPP,Device DEVICE> class MatDense;
template<typename FPP,FDevice DEVICE> class MatDense;
template<typename FPP,Device DEVICE, typename FPP2 = double>
template<typename FPP,FDevice DEVICE, typename FPP2 = double>
class ConstraintFPP : public Faust::ConstraintGeneric
{
......
......@@ -45,17 +45,17 @@
#include <cstdlib>
#include "faust_exception.h"
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
const char * Faust::ConstraintFPP<FPP,DEVICE,FPP2>::m_className ="Faust::ConstraintFPP<FPP,DEVICE,FPP2>::";
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP() :
Faust::ConstraintGeneric()
{
set_default_parameter();
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
const faust_constraint_name& constraintName_,
const int nbRows_,
......@@ -68,7 +68,7 @@ Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
set_default_parameter();
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
const faust_constraint_name& constraintName_,
const FPP2 defaultParameter_,
......@@ -83,7 +83,7 @@ Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
check_constraint_name();
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
const Faust::ConstraintFPP<FPP,DEVICE,FPP2>& constraint_) :
Faust::ConstraintGeneric(
......@@ -97,7 +97,7 @@ Faust::ConstraintFPP<FPP,DEVICE,FPP2>::ConstraintFPP(
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::check_constraint_name()const
{
switch (this->m_constraintName)
......@@ -112,7 +112,7 @@ void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::check_constraint_name()const
}
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::set_default_parameter()
{
......@@ -130,7 +130,7 @@ void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::set_default_parameter()
}
}
template<typename FPP,Device DEVICE,typename FPP2>
template<typename FPP,FDevice DEVICE,typename FPP2>
void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::project(Faust::MatDense<FPP,DEVICE> & mat)const
{
switch (this->m_constraintName)
......@@ -147,7 +147,7 @@ void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::project(Faust::MatDense<FPP,DEVICE>
}
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
void Faust::ConstraintFPP<FPP,DEVICE,FPP2>::Display() const
{
Faust::ConstraintGeneric::Display();
......
......@@ -62,14 +62,14 @@ enum faust_constraint_name
CONSTRAINT_NAME_HANKEL
};
template<typename FPP,Device DEVICE> class MatDense;
template<typename FPP,FDevice DEVICE> class MatDense;
//! \namespace Faust
//! \brief Faust namespace contains the principal class of the project.
namespace Faust {
// modif AL AL
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
class MatDense;
//! \class ConstraintGeneric
......@@ -95,15 +95,15 @@ namespace Faust {
template<typename FPP,Device DEVICE, typename FPP2=double>
template<typename FPP,FDevice DEVICE, typename FPP2=double>
const char* get_type() const;
const char* get_constraint_name()const;
const faust_constraint_name get_constraint_type() const;
template<typename FPP,Device DEVICE, typename FPP2=double>
template<typename FPP,FDevice DEVICE, typename FPP2=double>
bool is_constraint_parameter_int()const;
template<typename FPP,Device DEVICE, typename FPP2=double>
template<typename FPP,FDevice DEVICE, typename FPP2=double>
bool is_constraint_parameter_real()const;
template<typename FPP,Device DEVICE, typename FPP2=double>
template<typename FPP,FDevice DEVICE, typename FPP2=double>
bool is_constraint_parameter_mat()const;
......@@ -113,9 +113,9 @@ namespace Faust {
virtual void Display() const;
virtual void set_default_parameter()=0;
virtual void check_constraint_name()const=0;
template<typename FPP, Device DEVICE>
template<typename FPP, FDevice DEVICE>
/*virtual*/ void project(MatDense<FPP,DEVICE> & mat)const;//=0; //template with (pure) virtual not authorized (otherwise it must be templates from class, not function)
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
/*virtual*/ void project(Faust::MatDense<FPP, DEVICE>&) const /*=0*/;
~ConstraintGeneric(){};
......
......@@ -48,14 +48,14 @@
#include "faust_ConstraintType.h"
//modif AL AL
//template<typename FPP,Device DEVICE> class ConstraintInt;
//template<typename FPP,FDevice DEVICE> class ConstraintInt;
template<typename FPP,Device DEVICE,typename FPP2> class ConstraintFPP;
template<typename FPP,Device DEVICE> class ConstraintMat;
template<typename FPP,Device DEVICE,typename FPP2> class faust_ConstraintType;
template<typename FPP,FDevice DEVICE,typename FPP2> class ConstraintFPP;
template<typename FPP,FDevice DEVICE> class ConstraintMat;
template<typename FPP,FDevice DEVICE,typename FPP2> class faust_ConstraintType;
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
const char* Faust::ConstraintGeneric::get_type() const
{
switch(m_constraintName)
......@@ -170,7 +170,7 @@ const char* Faust::ConstraintGeneric::get_type() const
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
bool Faust::ConstraintGeneric::is_constraint_parameter_int()const
{
switch(m_constraintName)
......@@ -216,7 +216,7 @@ bool Faust::ConstraintGeneric::is_constraint_parameter_int()const
return false;
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
bool Faust::ConstraintGeneric::is_constraint_parameter_real()const
{
switch(m_constraintName)
......@@ -262,7 +262,7 @@ bool Faust::ConstraintGeneric::is_constraint_parameter_real()const
return false;
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
bool Faust::ConstraintGeneric::is_constraint_parameter_mat()const
{
switch(m_constraintName)
......@@ -308,7 +308,7 @@ bool Faust::ConstraintGeneric::is_constraint_parameter_mat()const
return false;
}
template<typename FPP,Device DEVICE, typename FPP2>
template<typename FPP,FDevice DEVICE, typename FPP2>
void Faust::ConstraintGeneric::project(Faust::MatDense<FPP, DEVICE>& mat) const {
//unfortunately it's not possible to do template with virtual (pure or not) function
// (it needs to be a template class with virtual function using template types to be possible)
......
......@@ -55,7 +55,7 @@
#endif
template<typename FPP,Device DEVICE> class MatDense;
template<typename FPP,FDevice DEVICE> class MatDense;
//! \class ConstraintInt
//! \brief Contains the integer constraint parameters for the hierarchical factorization. <br>
......@@ -69,7 +69,7 @@ namespace Faust
class ConstraintGeneric;
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
class ConstraintInt : public Faust::ConstraintGeneric
{
......
......@@ -45,17 +45,17 @@
#include "faust_exception.h"
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
const char * Faust::ConstraintInt<FPP,DEVICE>::m_className="Faust::ConstraintInt";
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt() :
Faust::ConstraintGeneric()
{
set_default_parameter();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
const faust_constraint_name& constraintName_,
const faust_unsigned_int nbRows_,
......@@ -70,7 +70,7 @@ Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
set_default_parameter();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
const faust_constraint_name& constraintName_,
const faust_unsigned_int defaultParameter_,
......@@ -85,7 +85,7 @@ Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
check_constraint_name();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
const Faust::ConstraintInt<FPP,DEVICE>& constraint_) :
Faust::ConstraintGeneric(
......@@ -98,7 +98,7 @@ Faust::ConstraintInt<FPP,DEVICE>::ConstraintInt(
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintInt<FPP,DEVICE>::check_constraint_name()const
{
switch (this->m_constraintName)
......@@ -121,7 +121,7 @@ void Faust::ConstraintInt<FPP,DEVICE>::check_constraint_name()const
}
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintInt<FPP,DEVICE>::set_default_parameter()
{
switch (this->m_constraintName)
......@@ -150,7 +150,7 @@ void Faust::ConstraintInt<FPP,DEVICE>::set_default_parameter()
}
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintInt<FPP,DEVICE>::project(Faust::MatDense<FPP,DEVICE> & mat) const
{
switch (this->m_constraintName)
......@@ -176,7 +176,7 @@ void Faust::ConstraintInt<FPP,DEVICE>::project(Faust::MatDense<FPP,DEVICE> & mat
}
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintInt<FPP,DEVICE>::Display() const
{
Faust::ConstraintGeneric::Display();
......
......@@ -62,9 +62,9 @@ namespace Faust
{
class ConstraintGeneric;
template<typename FPP,Device DEVICE> class MatDense;
template<typename FPP,FDevice DEVICE> class MatDense;
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
class ConstraintMat : public Faust::ConstraintGeneric
{
......
......@@ -47,17 +47,17 @@
#include "faust_MatDense.h"
#include "faust_exception.h"
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
const char * Faust::ConstraintMat<FPP,DEVICE>::m_className="Faust::ConstraintMat<FPP,DEVICE>::";
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat() :
Faust::ConstraintGeneric()
{
set_default_parameter();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
const faust_constraint_name& constraintName_,
const faust_unsigned_int nbRows_,
......@@ -70,7 +70,7 @@ Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
set_default_parameter();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
const faust_constraint_name& constraintName_,
const Faust::MatDense<FPP,DEVICE> defaultParameter_,
......@@ -85,7 +85,7 @@ Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
check_constraint_name();
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
const Faust::ConstraintMat<FPP,DEVICE>& constraint_) :
Faust::ConstraintGeneric(
......@@ -99,7 +99,7 @@ Faust::ConstraintMat<FPP,DEVICE>::ConstraintMat(
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintMat<FPP,DEVICE>::check_constraint_name()const
{
switch (this->m_constraintName)
......@@ -122,7 +122,7 @@ void Faust::ConstraintMat<FPP,DEVICE>::check_constraint_name()const
}
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintMat<FPP,DEVICE>::set_default_parameter()
{
switch (this->m_constraintName)
......@@ -140,7 +140,7 @@ void Faust::ConstraintMat<FPP,DEVICE>::set_default_parameter()
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintMat<FPP,DEVICE>::project(Faust::MatDense<FPP,DEVICE> & mat) const
{
switch (this->m_constraintName)
......@@ -169,7 +169,7 @@ void Faust::ConstraintMat<FPP,DEVICE>::project(Faust::MatDense<FPP,DEVICE> & mat
break;
}
}
template<typename FPP,Device DEVICE>
template<typename FPP,FDevice DEVICE>
void Faust::ConstraintMat<FPP,DEVICE>::Display() const
{
Faust::ConstraintGeneric::Display();
......
......@@ -42,15 +42,15 @@
#define __FAUST_CONSTRAINT_TYPE_H__
template<typename FPP,Device DEVICE> class ConstraintInt;
template<typename FPP,Device DEVICE,typename FPP2> class ConstraintFPP;
template<typename FPP,Device DEVICE> class ConstraintMat;
template<typename FPP,FDevice DEVICE> class ConstraintInt;
template<typename FPP,FDevice DEVICE,typename FPP2> class ConstraintFPP;
template<typename FPP,FDevice DEVICE> class ConstraintMat;
//! \struct ConstraintType
//! \brief This structure defined the type of constraint. See following table for more precision about the type of constraint. <br>
//! <img src="../../doc/html/constraint.png" alt="constraint parameters" width=800px />
template<typename FPP,Device DEVICE, typename FPP2=double>
template<typename FPP,FDevice DEVICE, typename FPP2=double>
struct ConstraintType
{
......
......@@ -13,7 +13,7 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2 = float>
template<typename FPP, FDevice DEVICE, typename FPP2 = float>
class GivensFGFT : public GivensFGFTGen<FPP, DEVICE, FPP2> {
/**
* \class Faust::GivensFGFT
......
using namespace Faust;
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::next_step()
{
......@@ -22,7 +22,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::next_step()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::choose_pivot()
{
//Matlab ref. code:
......@@ -38,7 +38,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::choose_pivot()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::max_L()
{
// Matlab ref. code:
......@@ -117,7 +117,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::max_L()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::calc_theta()
{
// Matlab ref. code:
......@@ -146,7 +146,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::calc_theta()
theta = theta2;
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_fact()
{
// Matlab ref. code:
......@@ -190,7 +190,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_fact()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
{
// L = S'*L*S
......@@ -213,7 +213,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L(Faust::MatSparse<FPP,Cpu> & L)
{
//#define OPT_UPDATE_SPARSE_L
......@@ -233,7 +233,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L(Faust::MatSparse<FPP,Cpu> & L)
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L()
{
MatSparse<FPP, DEVICE>* sL = dynamic_cast<MatSparse<FPP, DEVICE>*>(this->L);
......@@ -241,7 +241,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L()
else update_L(*dynamic_cast<MatDense<FPP, DEVICE>*>(this->L));
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L_first(Faust::Vect<FPP,DEVICE>& L_vec_p, Faust::Vect<FPP,DEVICE>& L_vec_q, const FPP2& c, const FPP2& s, int p, int q, Faust::MatDense<FPP,DEVICE> & L)
{
#define copy_vec2Lrow(vec,rowi) \
......@@ -267,7 +267,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L_first(Faust::Vect<FPP,DEVICE>& L_vec_
copy_vec2Lrow(tmp, q);
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L_second(Faust::Vect<FPP,DEVICE>& L_vec_p, Faust::Vect<FPP,DEVICE>& L_vec_q, const FPP2& c, const FPP2& s, int p, int q, Faust::MatDense<FPP,DEVICE> & L)
{
Faust::Vect<FPP,DEVICE> tmp, tmp2;
......@@ -290,7 +290,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L_second(Faust::Vect<FPP,DEVICE>& L_vec
memcpy(L.getData()+L.getNbRow()*q, tmp.getData(), sizeof(FPP)*L.getNbRow());
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L_second(Eigen::SparseMatrix<FPP,Eigen::RowMajor > & L_vec_p, Eigen::SparseMatrix<FPP, Eigen::RowMajor>& L_vec_q, const FPP2& c, const FPP2& s, int p, int q, Faust::MatSparse<FPP,DEVICE> & L)
{
Eigen::SparseMatrix<FPP, Eigen::RowMajor> tmp, tmp2;
......@@ -315,7 +315,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L_second(Eigen::SparseMatrix<FPP,Eigen:
L.mat.col(q) = tmp;
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_L_first(Eigen::SparseMatrix<FPP, Eigen::RowMajor> & L_vec_p, Eigen::SparseMatrix<FPP, Eigen::RowMajor>& L_vec_q, const FPP2& c, const FPP2& s, int p, int q, Faust::MatSparse<FPP,DEVICE> & L)
{
Eigen::SparseMatrix<FPP, Eigen::RowMajor> tmp, tmp2, tmp3;
......@@ -341,7 +341,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_L_first(Eigen::SparseMatrix<FPP, Eigen:
L.mat.innerVector(q) = tmp;
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFT<FPP,DEVICE,FPP2>::update_err()
{
// Matlab ref. code:
......@@ -378,7 +378,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_err()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatSparse<FPP,DEVICE>& Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError /* default to 0.0 */, const bool errIsRel, const bool enable_large_Faust/* deft to false */) : GivensFGFTGen<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), C(Lap.getNbRow(), Lap.getNbCol()), always_theta2(false)
{
//see parent ctor
......@@ -386,7 +386,7 @@ GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatSparse<FPP,DEVICE>& Lap, int J
C.scalarMultiply(15); // purely abitrary
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatDense<FPP,DEVICE>& Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError, const bool errIsRel, const bool enable_large_Faust/* deft to false */) : GivensFGFTGen<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), C(Lap.getNbRow(), Lap.getNbCol()), always_theta2(false)
{
// see parent ctor
......@@ -394,7 +394,7 @@ GivensFGFT<FPP,DEVICE,FPP2>::GivensFGFT(Faust::MatDense<FPP,DEVICE>& Lap, int J,
C.scalarMultiply(15); // purely abitrary
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
const Faust::MatSparse<FPP,DEVICE> GivensFGFT<FPP,DEVICE,FPP2>::get_Dspm(const bool ord /* default to false */)
{
MatSparse <FPP,DEVICE> spD;
......
......@@ -12,7 +12,7 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2 = float>
template<typename FPP, FDevice DEVICE, typename FPP2 = float>
class GivensFGFTComplex : public Faust::GivensFGFTGen<typename FPP::value_type, DEVICE, FPP2, FPP>{
/**
* \class Faust::GivensFGFTComplex
......
using namespace Faust;
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::next_step()
{
......@@ -22,7 +22,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::next_step()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::choose_pivot()
{
//Matlab ref. code:
......@@ -38,7 +38,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::choose_pivot()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::max_L()
{
// Matlab ref. code:
......@@ -117,7 +117,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::max_L()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::calc_theta()
{
FPP phi1, phi2;
......@@ -133,7 +133,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::calc_theta()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::check_pivot_image(FPP& c_pp, FPP& c_pq, FPP& c_qp, FPP& c_qq)
{
FPP im_pivot_pq = (conj(c_pp)*(*this->L)(this->p,this->p)+conj(c_qp)*(*this->L)(this->q,this->p))*c_pq +(conj(c_pp)*(*this->L)(this->p,this->q)+conj(c_qp)*(*this->L)(this->q,this->q))*c_qq;
......@@ -148,7 +148,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::check_pivot_image(FPP& c_pp, FPP& c_pq,
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_fact()
{
// Matlab ref. code:
......@@ -226,7 +226,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_fact()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
{
// L = S'*L*S
......@@ -276,7 +276,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L(Faust::MatSparse<FPP,Cpu> & L)
{
//#define OPT_UPDATE_SPARSE_L
......@@ -299,7 +299,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L(Faust::MatSparse<FPP,Cpu> & L)
#endif
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L()
{
MatSparse<FPP, DEVICE>* sL = dynamic_cast<MatSparse<FPP, DEVICE>*>(this->L);
......@@ -307,7 +307,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L()
else update_L(*dynamic_cast<MatDense<FPP, DEVICE>*>(this->L));
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_first(Faust::Vect<FPP,DEVICE>& L_vec_p, Faust::Vect<FPP,DEVICE>& L_vec_q, const FPP& c_pp, const FPP& c_pq, const FPP& c_qp, const FPP& c_qq, int p, int q, Faust::MatDense<FPP,DEVICE> & L)
{
#define copy_vec2Lrow(vec,rowi) \
......@@ -333,7 +333,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_first(Faust::Vect<FPP,DEVICE>&
copy_vec2Lrow(tmp, q);
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_second(Faust::Vect<FPP,DEVICE>& L_vec_p, Faust::Vect<FPP,DEVICE>& L_vec_q, const FPP& c_pp, const FPP& c_pq, const FPP& c_qp, const FPP& c_qq, int p, int q, Faust::MatDense<FPP,DEVICE> & L)
{
Faust::Vect<FPP,DEVICE> tmp, tmp2;
......@@ -356,7 +356,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_second(Faust::Vect<FPP,DEVICE>
memcpy(L.getData()+L.getNbRow()*q, tmp.getData(), sizeof(FPP)*L.getNbRow());
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_second(Eigen::SparseMatrix<FPP,Eigen::RowMajor > & L_vec_p, Eigen::SparseMatrix<FPP, Eigen::RowMajor>& L_vec_q, const FPP& c_pp, const FPP& c_pq, const FPP& c_qp, const FPP& c_qq, int p, int q, Faust::MatSparse<FPP,DEVICE> & L)
{
Eigen::SparseMatrix<FPP, Eigen::RowMajor> tmp, tmp2;
......@@ -381,7 +381,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_second(Eigen::SparseMatrix<FPP
L.mat.col(q) = tmp;
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_first(Eigen::SparseMatrix<FPP, Eigen::RowMajor> & L_vec_p, Eigen::SparseMatrix<FPP, Eigen::RowMajor>& L_vec_q, const FPP& c_pp, const FPP& c_pq, const FPP& c_qp, const FPP& c_qq, int p, int q, Faust::MatSparse<FPP,DEVICE> & L)
{
Eigen::SparseMatrix<FPP, Eigen::RowMajor> tmp, tmp2, tmp3;
......@@ -407,7 +407,7 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_L_first(Eigen::SparseMatrix<FPP,
L.mat.innerVector(q) = tmp;
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_err()
{
// Matlab ref. code:
......@@ -444,21 +444,21 @@ void GivensFGFTComplex<FPP,DEVICE,FPP2>::update_err()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTComplex<FPP,DEVICE,FPP2>::GivensFGFTComplex(Faust::MatSparse<FPP,DEVICE>& Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError /* default to 0.0 */, const bool errIsRel, const bool enable_large_Faust) : Faust::GivensFGFTGen<typename FPP::value_type, DEVICE, FPP2, FPP>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), C(Lap.getNbRow(), Lap.getNbCol())
{
//see parent ctor
this->C.setZeros();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTComplex<FPP,DEVICE,FPP2>::GivensFGFTComplex(Faust::MatDense<FPP,DEVICE>& Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError, const bool errIsRel, const bool enable_large_Faust) : Faust::GivensFGFTGen<typename FPP::value_type, DEVICE, FPP2, FPP>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), C(Lap.getNbRow(), Lap.getNbCol())
{
// see parent ctor
this->C.setZeros();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
const Faust::MatSparse<FPP,DEVICE> GivensFGFTComplex<FPP,DEVICE,FPP2>::get_Dspm(const bool ord /* default to false*/)
{
MatSparse <FPP,DEVICE> spD;
......
......@@ -11,10 +11,10 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
class GivensFGFTParallelGen;
template<typename FPP, Device DEVICE, typename FPP2 = float, typename FPP4 = FPP>
template<typename FPP, FDevice DEVICE, typename FPP2 = float, typename FPP4 = FPP>
class GivensFGFTGen {
/**
* \class Faust::GivensFGFTGen
......
......@@ -8,7 +8,7 @@ using namespace Faust;
#endif
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::update_D()
{
// D = spdiag(diag(L))
......@@ -21,13 +21,13 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::update_D()
#endif
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::order_D()
{
order_D(1);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::order_D(const int order /* -1 for descending order, 1 for ascending order */)
{
ordered_D = Faust::Vect<FPP,DEVICE>(D.size());
......@@ -54,7 +54,7 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::order_D(const int order /* -1 for desc
D_order_dir = order;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const vector<int>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_ord_indices()
{
if(! is_D_ordered)
......@@ -63,7 +63,7 @@ const vector<int>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_ord_indices()
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::compute_facts()
{
is_D_ordered = false; // facts (re)computed then D must be reordered
......@@ -88,7 +88,7 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::compute_facts()
}
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::GivensFGFTGen(MatGeneric<FPP4,DEVICE>* Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError, const bool errIsRel, const bool enable_large_Faust /* deft to false */) :
Lap(*Lap), D(Lap->getNbRow()), errs(0), coord_choices(0), q_candidates(new int[Lap->getNbRow()]), is_D_ordered(false), verbosity(verbosity), stoppingCritIsError(stoppingError != 0.0), stoppingError(stoppingError), errIsRel(errIsRel), Lap_squared_fro_norm(0), facts(J>0?(J*4<Lap->getNbRow()*Lap->getNbRow()||enable_large_Faust?J:0):1 /* don't allocate if the complexity doesn't worth it and enable_large_Faust is false*/), last_fact_permuted(false), J(J), dim_size(Lap->getNbRow()), enable_large_Faust(enable_large_Faust)
{
......@@ -108,19 +108,19 @@ Lap(*Lap), D(Lap->getNbRow()), errs(0), coord_choices(0), q_candidates(new int[
memset(this->D.getData(), 0, sizeof(FPP)*dim_size);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::GivensFGFTGen(Faust::MatSparse<FPP4, DEVICE> & Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError, const bool errIsRel, const bool enable_large_Faust/* deft to false */) : GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>(&Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust)
{
L = new MatSparse<FPP4,DEVICE>(Lap);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::GivensFGFTGen(Faust::MatDense<FPP4, DEVICE> & Lap, int J, unsigned int verbosity /* deft val == 0 */, const double stoppingError, const bool errIsRel, const bool enable_large_Faust/* deft to false */) : GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>(&Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust)
{
L = new MatDense<FPP4,DEVICE>(Lap);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
FPP2 GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_err(int j) const
{
if(j > 0 && j < errs.size())
......@@ -129,13 +129,13 @@ FPP2 GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_err(int j) const
throw out_of_range("GivensFGFTGen::get_err(j): j is out of range.");
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const vector<FPP2>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_errs() const
{
return errs;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const Faust::Vect<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(const bool ord /* default to false */)
{
if(ord)
......@@ -147,7 +147,7 @@ const Faust::Vect<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(const
return D;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const Faust::Vect<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(const int ord /* default to false */)
{
if(ord != 0)
......@@ -159,7 +159,7 @@ const Faust::Vect<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(const
return D;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
template<typename FPP3>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_Dspm(Faust::MatSparse<FPP3,DEVICE> & spD, const bool ord /* default to false */)
{
......@@ -174,13 +174,13 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_Dspm(Faust::MatSparse<FPP3,DEVICE>
spD = MatSparse<FPP3,DEVICE>(nat_ord_indices, nat_ord_indices, diag_D, nat_ord_indices.size(), nat_ord_indices.size());
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(FPP* diag_data, const bool ord /* default to false */)
{
get_D(diag_data, ord?1:0);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(FPP* diag_data, const int ord /* default to false */)
{
const Faust::Vect<FPP,DEVICE>& D_ = get_D(ord);
......@@ -188,7 +188,7 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(FPP* diag_data, const int ord /*
memcpy(diag_data, src_data_ptr, sizeof(FPP)*D_.size());
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const Faust::MatDense<FPP4,DEVICE> GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::compute_fourier(const bool ord /* default to false */)
{
Faust::MatDense<FPP4,Cpu> fourier(L->getNbRow(), L->getNbCol());
......@@ -208,19 +208,19 @@ const Faust::MatDense<FPP4,DEVICE> GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::compute_
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const Faust::MatGeneric<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_L() const
{
return *L;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const vector<pair<int,int>>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_coord_choices() const
{
return coord_choices;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_coord_choice(int j, int& p, int& q) const
{
if(j > 0 && j < coord_choices.size())
......@@ -232,26 +232,26 @@ void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_coord_choice(int j, int& p, int& q
throw out_of_range("GivensFGFTGen::get_coord_choice(j,p,q): j is out of range.");
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const Faust::MatDense<FPP4,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_Lap() const
{
return Lap;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
const vector<Faust::MatSparse<FPP4,DEVICE>>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_facts() const
{
return facts;
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
Faust::Transform<FPP4,DEVICE> GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_transform(bool ord)
{
return get_transform(ord?1:0);
}
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP, FDevice DEVICE, typename FPP2, typename FPP4>
Faust::Transform<FPP4,DEVICE> GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_transform(int ord)
{
//TODO: an optimization is possible by changing type of facts to vector<MatGeneric*> it would avoid copying facts into Transform and rather use them directly. It will need a destructor that deletes them eventually if they weren't transfered to a Transform object before.
......
......@@ -9,7 +9,7 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2 = float>
template<typename FPP, FDevice DEVICE, typename FPP2 = float>
class GivensFGFTParallel : public GivensFGFT<FPP,DEVICE,FPP2>, public GivensFGFTParallelGen<FPP, DEVICE, FPP2>
{
/**
......
using namespace Faust; //TODO: remove, not advisable in a header
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTParallel<FPP,DEVICE,FPP2>::GivensFGFTParallel(Faust::MatDense<FPP,DEVICE>& Lap, int J, int t, unsigned int verbosity, const double stoppingError, const bool errIsRel, const bool enable_large_Faust) : GivensFGFT<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), /*t(t), fact_nrots(0)*/ GivensFGFTParallelGen<FPP, DEVICE, FPP2>(t, *this)
{
if(J > 0) this->facts.resize(round(J/(float)t));
......@@ -9,7 +9,7 @@ GivensFGFTParallel<FPP,DEVICE,FPP2>::GivensFGFTParallel(Faust::MatDense<FPP,DEVI
init_fact_nz_inds_sort_func();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTParallel<FPP,DEVICE,FPP2>::GivensFGFTParallel(Faust::MatSparse<FPP,DEVICE>& Lap, int J, int t, unsigned int verbosity, const double stoppingError, const bool errIsRel, const bool enable_large_Faust) : GivensFGFT<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust),/* t(t), fact_nrots(0)*/ GivensFGFTParallelGen<FPP, DEVICE, FPP2>(t, *this)
{
if(J > 0) this->facts.resize(round(J/(float)t));
......@@ -18,7 +18,7 @@ GivensFGFTParallel<FPP,DEVICE,FPP2>::GivensFGFTParallel(Faust::MatSparse<FPP,DEV
init_fact_nz_inds_sort_func();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallel<FPP,DEVICE,FPP2>::init_fact_nz_inds_sort_func()
{
this->fact_nz_inds_sort_func= [](const pair<int,int> &a, const pair<int,int> &b, Faust::MatDense<FPP,DEVICE> & L_low)
......@@ -27,7 +27,7 @@ void GivensFGFTParallel<FPP,DEVICE,FPP2>::init_fact_nz_inds_sort_func()
};
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallel<FPP,DEVICE,FPP2>::next_step()
{
......@@ -47,7 +47,7 @@ void GivensFGFTParallel<FPP,DEVICE,FPP2>::next_step()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallel<FPP,DEVICE,FPP2>::update_fact()
{
if(this->fact_nrots == 0){
......@@ -78,7 +78,7 @@ void GivensFGFTParallel<FPP,DEVICE,FPP2>::update_fact()
if(this->J == 0) this->facts.resize(this->ite+1);
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallel<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
{
// L = S'*L*S
......
......@@ -9,7 +9,7 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2 = float>
template<typename FPP, FDevice DEVICE, typename FPP2 = float>
class GivensFGFTParallelComplex : public GivensFGFTComplex<FPP,DEVICE,FPP2>, public GivensFGFTParallelGen<typename FPP::value_type, DEVICE, FPP2, FPP>
{
/**
......
using namespace Faust; //TODO: remove, not advisable in a header
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::GivensFGFTParallelComplex(Faust::MatDense<FPP,DEVICE>& Lap, int J, int t, unsigned int verbosity, const double stoppingError, const bool errIsRel, const bool enable_large_Faust) : GivensFGFTComplex<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), /*t(t), fact_nrots(0)*/ GivensFGFTParallelGen<typename FPP::value_type, DEVICE, FPP2, FPP>(t, *this)
{
if(J > 0) this->facts.resize(round(J/(float)t));
......@@ -8,7 +8,7 @@ GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::GivensFGFTParallelComplex(Faust::Mat
init_fact_nz_inds_sort_func();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::GivensFGFTParallelComplex(Faust::MatSparse<FPP,DEVICE>& Lap, int J, int t, unsigned int verbosity, const double stoppingError, const bool errIsRel, const bool enable_large_Faust) : GivensFGFTComplex<FPP,DEVICE,FPP2>(Lap, J, verbosity, stoppingError, errIsRel, enable_large_Faust), /* t(t), fact_nrots(0) */ GivensFGFTParallelGen<typename FPP::value_type, DEVICE, FPP2, FPP>(t, *this)
{
if(J > 0) this->facts.resize(round(J/(float)t));
......@@ -16,7 +16,7 @@ GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::GivensFGFTParallelComplex(Faust::Mat
init_fact_nz_inds_sort_func();
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::init_fact_nz_inds_sort_func()
{
this->fact_nz_inds_sort_func= [](const pair<int,int> &a, const pair<int,int> &b, Faust::MatDense<FPP,DEVICE> & L_low)
......@@ -29,7 +29,7 @@ void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::init_fact_nz_inds_sort_func()
};
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::next_step()
{
......@@ -49,7 +49,7 @@ void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::next_step()
}
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::update_fact()
{
FPP c_pp, c_pq, c_qp, c_qq;
......@@ -100,7 +100,7 @@ void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::update_fact()
if(this->J == 0) this->facts.resize(this->ite+1);
}
template<typename FPP, Device DEVICE, typename FPP2>
template<typename FPP, FDevice DEVICE, typename FPP2>
void GivensFGFTParallelComplex<FPP,DEVICE,FPP2>::update_L(Faust::MatDense<FPP,Cpu> & L)
{
// L = S'*L*S
......
......@@ -9,7 +9,7 @@
namespace Faust {
template<typename FPP, Device DEVICE, typename FPP2 = float, typename FPP4 = FPP>
template<typename FPP, FDevice DEVICE, typename FPP2 = float, typename FPP4 = FPP>
class GivensFGFTParallelGen
{
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment