mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: code cleaning
This commit is contained in:
parent
3d75e0f0d1
commit
5c06e89d69
@ -726,7 +726,7 @@ std::vector<std::vector<T>> Graph<T>::allTopoSort(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// build depedency matrix from topological sorts ///////////////////////////////
|
// build depedency matrix from topological sorts ///////////////////////////////
|
||||||
// complexity: can be V!
|
// complexity: something like O(V^2*log(V!))
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::map<T, std::map<T, bool>>
|
std::map<T, std::map<T, bool>>
|
||||||
makeDependencyMatrix(const std::vector<std::vector<T>> &topSort)
|
makeDependencyMatrix(const std::vector<std::vector<T>> &topSort)
|
||||||
|
@ -32,7 +32,7 @@ using namespace QCD;
|
|||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Module implementation *
|
* ModuleBase implementation *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
// constructor /////////////////////////////////////////////////////////////////
|
// constructor /////////////////////////////////////////////////////////////////
|
||||||
ModuleBase::ModuleBase(const std::string name)
|
ModuleBase::ModuleBase(const std::string name)
|
||||||
|
@ -50,8 +50,9 @@ public:\
|
|||||||
static mod##ModuleRegistrar mod##ModuleRegistrarInstance;
|
static mod##ModuleRegistrar mod##ModuleRegistrarInstance;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Module *
|
* Module class *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
// base class
|
||||||
class ModuleBase
|
class ModuleBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -77,8 +78,7 @@ private:
|
|||||||
Environment &env_;
|
Environment &env_;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Serializable NoPar;
|
// derived class, templating the parameter class
|
||||||
|
|
||||||
template <typename P>
|
template <typename P>
|
||||||
class Module: public ModuleBase
|
class Module: public ModuleBase
|
||||||
{
|
{
|
||||||
@ -98,6 +98,12 @@ private:
|
|||||||
P par_;
|
P par_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// no parameter type
|
||||||
|
typedef Serializable NoPar;
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Template implementation *
|
||||||
|
******************************************************************************/
|
||||||
template <typename P>
|
template <typename P>
|
||||||
Module<P>::Module(const std::string name)
|
Module<P>::Module(const std::string name)
|
||||||
: ModuleBase(name)
|
: ModuleBase(name)
|
||||||
|
@ -94,10 +94,8 @@ void MQuark::execute(void)
|
|||||||
PropToFerm(tmp, fullSrc, s, c);
|
PropToFerm(tmp, fullSrc, s, c);
|
||||||
InsertSlice(source, tmp, 0, 0);
|
InsertSlice(source, tmp, 0, 0);
|
||||||
InsertSlice(source, tmp, Ls_-1, 0);
|
InsertSlice(source, tmp, Ls_-1, 0);
|
||||||
axpby_ssp_pplus(source, 0., source, 1., source,
|
axpby_ssp_pplus(source, 0., source, 1., source, 0, 0);
|
||||||
0, 0);
|
axpby_ssp_pminus(source, 0., source, 1., source, Ls_-1, Ls_-1);
|
||||||
axpby_ssp_pminus(source, 0., source, 1., source,
|
|
||||||
Ls_ - 1, Ls_ - 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// source conversion for 5D sources
|
// source conversion for 5D sources
|
||||||
|
Loading…
Reference in New Issue
Block a user