mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hadrons: code cleaning
This commit is contained in:
parent
bb580ae077
commit
df3fbc477e
@ -32,6 +32,9 @@ using namespace Grid;
|
|||||||
using namespace QCD;
|
using namespace QCD;
|
||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
|
|
||||||
|
#define BIG_SEP "==============="
|
||||||
|
#define SEP "---------------"
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Application implementation *
|
* Application implementation *
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
@ -204,8 +207,8 @@ void Application::configLoop(void)
|
|||||||
|
|
||||||
for (unsigned int t = range.start; t < range.end; t += range.step)
|
for (unsigned int t = range.start; t < range.end; t += range.step)
|
||||||
{
|
{
|
||||||
LOG(Message) << "========== Starting measurement for trajectory " << t
|
LOG(Message) << BIG_SEP << " Starting measurement for trajectory " << t
|
||||||
<< " ==========" << std::endl;
|
<< " " << BIG_SEP << std::endl;
|
||||||
env_.setTrajectory(t);
|
env_.setTrajectory(t);
|
||||||
execute(program_);
|
execute(program_);
|
||||||
env_.freeAll();
|
env_.freeAll();
|
||||||
@ -240,9 +243,9 @@ unsigned int Application::execute(const std::vector<std::string> &program)
|
|||||||
for (unsigned int i = 0; i < program.size(); ++i)
|
for (unsigned int i = 0; i < program.size(); ++i)
|
||||||
{
|
{
|
||||||
// execute module
|
// execute module
|
||||||
LOG(Message) << "---------- Measurement step " << i+1 << "/"
|
LOG(Message) << SEP << " Measurement step " << i+1 << "/"
|
||||||
<< program.size() << " (module '" << program[i] << "')"
|
<< program.size() << " (module '" << program[i] << "') "
|
||||||
<< " ----------" << std::endl;
|
<< SEP << std::endl;
|
||||||
(*module_[program[i]])();
|
(*module_[program[i]])();
|
||||||
size = env_.getTotalSize();
|
size = env_.getTotalSize();
|
||||||
// print used memory after execution
|
// print used memory after execution
|
||||||
|
@ -86,7 +86,7 @@ private:
|
|||||||
void configLoop(void);
|
void configLoop(void);
|
||||||
unsigned int execute(const std::vector<std::string> &program);
|
unsigned int execute(const std::vector<std::string> &program);
|
||||||
// pretty size formatting
|
// pretty size formatting
|
||||||
std::string sizeString(long unsigned int bytes);
|
static std::string sizeString(long unsigned int bytes);
|
||||||
private:
|
private:
|
||||||
long unsigned int locVol_;
|
long unsigned int locVol_;
|
||||||
std::string parameterFileName_;
|
std::string parameterFileName_;
|
||||||
|
@ -149,7 +149,7 @@ void Environment::freeFermionMatrix(const std::string name)
|
|||||||
{
|
{
|
||||||
if (hasFermionMatrix(name))
|
if (hasFermionMatrix(name))
|
||||||
{
|
{
|
||||||
LOG(Message) << "freeing fermion matrix '" << name << "'" << std::endl;
|
LOG(Message) << "Freeing fermion matrix '" << name << "'" << std::endl;
|
||||||
fMat_.erase(name);
|
fMat_.erase(name);
|
||||||
object_.erase(name);
|
object_.erase(name);
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ void Environment::freeLattice(const std::string name)
|
|||||||
{
|
{
|
||||||
if (hasLattice(name))
|
if (hasLattice(name))
|
||||||
{
|
{
|
||||||
LOG(Message) << "freeing lattice '" << name << "'" << std::endl;
|
LOG(Message) << "Freeing lattice '" << name << "'" << std::endl;
|
||||||
lattice_.erase(name);
|
lattice_.erase(name);
|
||||||
object_.erase(name);
|
object_.erase(name);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user