Rename NAIVE_SLOW into ATRIP_NAIVE_SLOW
This commit is contained in:
parent
8c5c47e208
commit
ed347ab0d9
@ -4,8 +4,10 @@
|
|||||||
|
|
||||||
namespace atrip {
|
namespace atrip {
|
||||||
|
|
||||||
/* This function is really too slow, below are more performant
|
#if defined(ATRIP_NAIVE_SLOW)
|
||||||
functions to get tuples.
|
/*
|
||||||
|
* This function is really too slow, below are more performant
|
||||||
|
* functions to get tuples.
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
ABCTuples get_nth_naive_tuples(size_t Nv, size_t np, int64_t i) {
|
ABCTuples get_nth_naive_tuples(size_t Nv, size_t np, int64_t i) {
|
||||||
@ -248,38 +250,25 @@ namespace atrip {
|
|||||||
using Database = typename Slice<F>::Database;
|
using Database = typename Slice<F>::Database;
|
||||||
Database db;
|
Database db;
|
||||||
|
|
||||||
#ifdef NAIVE_SLOW
|
#ifdef ATRIP_NAIVE_SLOW
|
||||||
WITH_CHRONO("db:comm:naive:tuples",
|
WITH_CHRONO("db:comm:naive:tuples",
|
||||||
const auto tuples = get_nth_naive_tuples(nv,
|
const auto tuples = get_nth_naive_tuples(nv,
|
||||||
np,
|
np,
|
||||||
iteration);
|
iteration);
|
||||||
const auto prev_tuples = get_nth_naive_tuples(nv,
|
const auto prev_tuples = get_nth_naive_tuples(nv,
|
||||||
np,
|
np,
|
||||||
(int64_t)iteration - 1);
|
iteration - 1);
|
||||||
)
|
)
|
||||||
#else
|
#else
|
||||||
WITH_CHRONO("db:comm:naive:tuples",
|
WITH_CHRONO("db:comm:naive:tuples",
|
||||||
const auto tuples = nth_atrip_distributed((int64_t)iteration,
|
const auto tuples = nth_atrip_distributed(iteration,
|
||||||
nv,
|
nv,
|
||||||
np);
|
np);
|
||||||
const auto prev_tuples = nth_atrip_distributed((int64_t)iteration - 1,
|
const auto prev_tuples = nth_atrip_distributed(iteration - 1,
|
||||||
nv,
|
nv,
|
||||||
np);
|
np);
|
||||||
)
|
)
|
||||||
|
|
||||||
if (false)
|
|
||||||
for (size_t rank = 0; rank < np; rank++) {
|
|
||||||
std::cout << Atrip::rank << ":"
|
|
||||||
<< " :tuples< " << rank << ">" << iteration
|
|
||||||
<< " :abc " << tuples[rank][0]
|
|
||||||
<< ", " << tuples[rank][1]
|
|
||||||
<< ", " << tuples[rank][2] << "\n";
|
|
||||||
std::cout << Atrip::rank << ":"
|
|
||||||
<< " :prev-tuples< " << rank << ">" << iteration
|
|
||||||
<< " :abc-prev " << prev_tuples[rank][0]
|
|
||||||
<< ", " << prev_tuples[rank][1]
|
|
||||||
<< ", " << prev_tuples[rank][2] << "\n";
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (size_t rank = 0; rank < np; rank++) {
|
for (size_t rank = 0; rank < np; rank++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user