Add static chrono

This commit is contained in:
2021-10-19 17:34:28 +02:00
parent fec33b3bb9
commit da714d3b7f
6 changed files with 25 additions and 5 deletions

View File

@@ -3,10 +3,11 @@
#include <sstream>
#include <string>
#include <map>
#include <chrono>
#include <ctf.hpp>
#include <atrip/Utils.hpp>
#define ADD_ATTRIBUTE(_type, _name, _default) \
_type _name = _default; \
Input& with_ ## _name(_type i) { \
@@ -20,6 +21,7 @@ namespace atrip {
static int rank;
static int np;
static Timings chrono;
static void init();
struct Input {

View File

@@ -229,7 +229,7 @@ static Slice& findOneByType(std::vector<Slice> &slices, Slice::Type type) {
});
WITH_CRAZY_DEBUG
WITH_RANK
<< "\t__ looking for " << type << "\n";
<< "__slice__:find:looking for " << type << "\n";
if (sliceIt == slices.end())
throw std::domain_error("Slice by type not found!");
return *sliceIt;

View File

@@ -110,6 +110,10 @@ struct NaiveDistribution : public TuplesDistribution {
, tuplesPerRank * (rank + 1) - 1
};
WITH_RANK << "range = "
<< range.first << " -> " << range.second
<< std::endl;
std::vector<ABCTuple> result(range.second - range.first, FAKE_TUPLE);
std::copy(all.begin() + range.first,
range.second >= all.size()