Skip to content

Commit

Permalink
Test MSVC vs. CNL and ++ operator
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Mar 15, 2023
1 parent ac9f93d commit e1958ee
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 45 deletions.
6 changes: 3 additions & 3 deletions src/adiar/bdd/if_then_else.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ namespace adiar

if(!external_only && max_pq_1_size <= internal::no_lookahead_bound(3)) {
#ifdef ADIAR_STATS
stats_prod3.lpq.unbucketed++;
stats_prod3.lpq.unbucketed += 1u;
#endif
return __bdd_ite<ite_priority_queue_1_t<0, memory_mode_t::INTERNAL>,
ite_priority_queue_2_t<memory_mode_t::INTERNAL>,
Expand All @@ -609,7 +609,7 @@ namespace adiar
&& max_pq_2_size <= pq_2_memory_fits
&& max_pq_3_size <= pq_3_memory_fits) {
#ifdef ADIAR_STATS
stats_prod3.lpq.internal++;
stats_prod3.lpq.internal += 1u;
#endif
return __bdd_ite<ite_priority_queue_1_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>,
ite_priority_queue_2_t<memory_mode_t::INTERNAL>,
Expand All @@ -618,7 +618,7 @@ namespace adiar
pq_2_internal_memory, max_pq_2_size, pq_3_internal_memory, max_pq_3_size);
} else {
#ifdef ADIAR_STATS
stats_prod3.lpq.external++;
stats_prod3.lpq.external += 1u;
#endif
const size_t pq_1_memory = aux_available_memory / 3;
const size_t pq_2_memory = pq_1_memory;
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/internal/algorithms/count.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,23 @@ namespace adiar::internal

if(!external_only && max_pq_size <= no_lookahead_bound()) {
#ifdef ADIAR_STATS
stats_count.lpq.unbucketed++;
stats_count.lpq.unbucketed += 1u;
#endif
return __count<count_policy, count_priority_queue_t<typename count_policy::queue_t,
0,
memory_mode_t::INTERNAL>>
(dd, varcount, aux_available_memory, max_pq_size);
} else if(!external_only && max_pq_size <= pq_memory_fits) {
#ifdef ADIAR_STATS
stats_count.lpq.internal++;
stats_count.lpq.internal += 1u;
#endif
return __count<count_policy, count_priority_queue_t<typename count_policy::queue_t,
ADIAR_LPQ_LOOKAHEAD,
memory_mode_t::INTERNAL>>
(dd, varcount, aux_available_memory, max_pq_size);
} else {
#ifdef ADIAR_STATS
stats_count.lpq.external++;
stats_count.lpq.external += 1u;
#endif
return __count<count_policy, count_priority_queue_t<typename count_policy::queue_t,
ADIAR_LPQ_LOOKAHEAD,
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/internal/algorithms/intercut.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,21 +322,21 @@ namespace adiar::internal

if(!external_only && max_pq_size <= no_lookahead_bound()) {
#ifdef ADIAR_STATS
stats_intercut.lpq.unbucketed++;
stats_intercut.lpq.unbucketed += 1u;
#endif
return __intercut<intercut_policy,
intercut_priority_queue_t<0, memory_mode_t::INTERNAL>>
(dd, labels, pq_memory, max_pq_size);
} else if(!external_only && max_pq_size <= pq_memory_fits) {
#ifdef ADIAR_STATS
stats_intercut.lpq.internal++;
stats_intercut.lpq.internal += 1u;
#endif
return __intercut<intercut_policy,
intercut_priority_queue_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>>
(dd, labels, pq_memory, max_pq_size);
} else {
#ifdef ADIAR_STATS
stats_intercut.lpq.external++;
stats_intercut.lpq.external += 1u;
#endif
return __intercut<intercut_policy,
intercut_priority_queue_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::EXTERNAL>>
Expand Down
26 changes: 13 additions & 13 deletions src/adiar/internal/algorithms/pred.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace adiar::internal
curr_level_processed++;
const bool ret_value = curr_level_size < curr_level_processed;
#ifdef ADIAR_STATS
if (ret_value) { stats_equality.slow_check.exit_on_processed_on_level++; }
if (ret_value) { stats_equality.slow_check.exit_on_processed_on_level += 1u; }
#endif
return ret_value;
}
Expand Down Expand Up @@ -98,7 +98,7 @@ namespace adiar::internal
{
ret_value = v1.is_terminal() && v2.is_terminal() && v1.value() == v2.value();
#ifdef ADIAR_STATS
stats_equality.slow_check.exit_on_root++;
stats_equality.slow_check.exit_on_root += 1u;
#endif
return true;
}
Expand All @@ -107,7 +107,7 @@ namespace adiar::internal
static bool resolve_singletons(const dd::node_t &v1, const dd::node_t v2)
{
#ifdef ADIAR_STATS
stats_equality.slow_check.exit_on_root++;
stats_equality.slow_check.exit_on_root += 1u;
#endif
adiar_debug(v1.label() == v2.label(), "Levels match per the precondition");
return v1.low() == v2.low() && v1.high() == v2.high();
Expand All @@ -123,7 +123,7 @@ namespace adiar::internal
return false;
} else {
#ifdef ADIAR_STATS
stats_equality.slow_check.exit_on_children++;
stats_equality.slow_check.exit_on_children += 1u;
#endif
return true;
}
Expand All @@ -132,7 +132,7 @@ namespace adiar::internal
// Do they NOT point to a node with the same level?
if (r1.label() != r2.label()) {
#ifdef ADIAR_STATS
stats_equality.slow_check.exit_on_children++;
stats_equality.slow_check.exit_on_children += 1u;
#endif
return true;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ namespace adiar::internal
adiar_debug(in_nodes_2.can_pull(), "The number of nodes should coincide");
if (in_nodes_1.pull() != in_nodes_2.pull()) {
#ifdef ADIAR_STATS
stats_equality.fast_check.exit_on_mismatch++;
stats_equality.fast_check.exit_on_mismatch += 1u;
#endif
return false;
}
Expand All @@ -199,7 +199,7 @@ namespace adiar::internal
// Are they literally referring to the same underlying file?
if (f1 == f2) {
#ifdef ADIAR_STATS
stats_equality.exit_on_same_file++;
stats_equality.exit_on_same_file += 1u;
#endif
return negate1 == negate2;
}
Expand All @@ -208,7 +208,7 @@ namespace adiar::internal
// nodes?
if (f1->size() != f2->size()) {
#ifdef ADIAR_STATS
stats_equality.exit_on_nodecount++;
stats_equality.exit_on_nodecount += 1u;
#endif
return false;
}
Expand All @@ -217,7 +217,7 @@ namespace adiar::internal
// levels?
if (f1->levels() != f2->levels()) {
#ifdef ADIAR_STATS
stats_equality.exit_on_varcount++;
stats_equality.exit_on_varcount += 1u;
#endif
return false;
}
Expand All @@ -227,7 +227,7 @@ namespace adiar::internal
if(f1->number_of_terminals[negate1] != f2->number_of_terminals[negate2] ||
f1->number_of_terminals[!negate1] != f2->number_of_terminals[!negate2]) {
#ifdef ADIAR_STATS
stats_equality.exit_on_terminalcount++;
stats_equality.exit_on_terminalcount += 1u;
#endif
return false;
}
Expand All @@ -242,7 +242,7 @@ namespace adiar::internal
adiar_debug(in_meta_2.can_pull(), "level_info files are same size");
if (in_meta_1.pull() != in_meta_2.pull()) {
#ifdef ADIAR_STATS
stats_equality.exit_on_levels_mismatch++;
stats_equality.exit_on_levels_mismatch += 1u;
#endif
return false;
}
Expand All @@ -255,12 +255,12 @@ namespace adiar::internal
// between them.
if (f1->canonical && f2->canonical && negate1 == negate2) {
#ifdef ADIAR_STATS
stats_equality.fast_check.runs++;
stats_equality.fast_check.runs += 1u;
#endif
return fast_isomorphism_check(f1, f2);
} else {
#ifdef ADIAR_STATS
stats_equality.slow_check.runs++;
stats_equality.slow_check.runs += 1u;
#endif
return comparison_check<isomorphism_policy>(f1, f2, negate1, negate2);
}
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/internal/algorithms/prod2.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ namespace adiar::internal

if(!external_only && max_pq_1_size <= no_lookahead_bound(2)) {
#ifdef ADIAR_STATS
stats_prod2.lpq.unbucketed++;
stats_prod2.lpq.unbucketed += 1u;
#endif
return __prod2<prod_policy,
prod_priority_queue_1_t<0, memory_mode_t::INTERNAL>,
Expand All @@ -561,15 +561,15 @@ namespace adiar::internal
} else if(!external_only && max_pq_1_size <= pq_1_memory_fits
&& max_pq_2_size <= pq_2_memory_fits) {
#ifdef ADIAR_STATS
stats_prod2.lpq.internal++;
stats_prod2.lpq.internal += 1u;
#endif
return __prod2<prod_policy,
prod_priority_queue_1_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>,
prod_priority_queue_2_t<memory_mode_t::INTERNAL>>
(in_1, in_2, op, pq_1_internal_memory, max_pq_1_size, pq_2_internal_memory, max_pq_2_size);
} else {
#ifdef ADIAR_STATS
stats_prod2.lpq.external++;
stats_prod2.lpq.external += 1u;
#endif
const size_t pq_1_memory = aux_available_memory / 2;
const size_t pq_2_memory = pq_1_memory;
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/internal/algorithms/quantify.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ namespace adiar::internal

if(!external_only && max_pq_1_size <= no_lookahead_bound(2)) {
#ifdef ADIAR_STATS
stats_quantify.lpq.unbucketed++;
stats_quantify.lpq.unbucketed += 1u;
#endif
return __quantify<quantify_policy,
quantify_priority_queue_1_t<0, memory_mode_t::INTERNAL>,
Expand All @@ -376,15 +376,15 @@ namespace adiar::internal
} else if(!external_only && max_pq_1_size <= pq_1_memory_fits
&& max_pq_2_size <= pq_2_memory_fits) {
#ifdef ADIAR_STATS
stats_quantify.lpq.internal++;
stats_quantify.lpq.internal += 1u;
#endif
return __quantify<quantify_policy,
quantify_priority_queue_1_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>,
quantify_priority_queue_2_t<memory_mode_t::INTERNAL>>
(in, label, op, pq_1_internal_memory, max_pq_1_size, pq_2_internal_memory, max_pq_2_size);
} else {
#ifdef ADIAR_STATS
stats_quantify.lpq.external++;
stats_quantify.lpq.external += 1u;
#endif
const size_t pq_1_memory = aux_available_memory / 2;
const size_t pq_2_memory = pq_1_memory;
Expand Down
12 changes: 6 additions & 6 deletions src/adiar/internal/algorithms/reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ namespace adiar::internal
// element is written to it.
if (!red1_mapping.is_open()) { red1_mapping.open(); }
#ifdef ADIAR_STATS
stats_reduce.removed_by_rule_1++;
stats_reduce.removed_by_rule_1 += 1u;
#endif
red1_mapping.write({ n.uid(), reduction_rule_ret });
} else {
Expand Down Expand Up @@ -282,7 +282,7 @@ namespace adiar::internal
out_node.high());
} else {
#ifdef ADIAR_STATS
stats_reduce.removed_by_rule_2++;
stats_reduce.removed_by_rule_2 += 1u;
#endif
}

Expand Down Expand Up @@ -419,7 +419,7 @@ namespace adiar::internal
const ptr_uint64 reduction_rule_ret = dd_policy::reduction_rule(node_of(e_low,e_high));
if (reduction_rule_ret != e_low.source()) {
#ifdef ADIAR_STATS
stats_reduce.removed_by_rule_1++;
stats_reduce.removed_by_rule_1 += 1u;
#endif
const bool terminal_val = reduction_rule_ret.value();
const node out_node = node(terminal_val);
Expand Down Expand Up @@ -540,19 +540,19 @@ namespace adiar::internal

if (!external_only && max_pq_size <= no_lookahead_bound(1)) {
#ifdef ADIAR_STATS
stats_reduce.lpq.unbucketed++;
stats_reduce.lpq.unbucketed += 1u;
#endif
return __reduce<dd_policy, reduce_priority_queue<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>>
(in_file, pq_memory, sorters_memory);
} else if(!external_only && max_pq_size <= pq_memory_fits) {
#ifdef ADIAR_STATS
stats_reduce.lpq.internal++;
stats_reduce.lpq.internal += 1u;
#endif
return __reduce<dd_policy, reduce_priority_queue<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>>
(in_file, pq_memory, sorters_memory);
} else {
#ifdef ADIAR_STATS
stats_reduce.lpq.external++;
stats_reduce.lpq.external += 1u;
#endif
return __reduce<dd_policy, reduce_priority_queue<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::EXTERNAL>>
(in_file, pq_memory, sorters_memory);
Expand Down
6 changes: 3 additions & 3 deletions src/adiar/internal/algorithms/substitution.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,21 @@ namespace adiar::internal

if(!external_only && max_pq_size <= no_lookahead_bound(1)) {
#ifdef ADIAR_STATS
stats_substitute.lpq.unbucketed++;
stats_substitute.lpq.unbucketed += 1u;
#endif
return __substitute<substitute_policy, substitute_assignment_mgr,
substitute_priority_queue_t<0, memory_mode_t::INTERNAL>>
(dd, amgr, aux_available_memory, max_pq_size);
} else if(!external_only && max_pq_size <= pq_memory_fits) {
#ifdef ADIAR_STATS
stats_substitute.lpq.internal++;
stats_substitute.lpq.internal += 1u;
#endif
return __substitute<substitute_policy, substitute_assignment_mgr,
substitute_priority_queue_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::INTERNAL>>
(dd, amgr, aux_available_memory, max_pq_size);
} else {
#ifdef ADIAR_STATS
stats_substitute.lpq.external++;
stats_substitute.lpq.external += 1u;
#endif
return __substitute<substitute_policy, substitute_assignment_mgr,
substitute_priority_queue_t<ADIAR_LPQ_LOOKAHEAD, memory_mode_t::EXTERNAL>>
Expand Down
16 changes: 8 additions & 8 deletions src/adiar/internal/data_structures/levelized_priority_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ namespace adiar::internal
stats_levelized_priority_queue.sum_max_size_ratio += frac(_actual_max_size, _max_size);
_stats.sum_max_size_ratio += frac(_actual_max_size, _max_size);

stats_levelized_priority_queue.sum_destructors++;
_stats.sum_destructors++;
stats_levelized_priority_queue.sum_destructors += 1u;
_stats.sum_destructors += 1u;
#endif
}

Expand Down Expand Up @@ -512,16 +512,16 @@ namespace adiar::internal
if (_buckets_level[bucket_idx] == level) {
_buckets_sorter[bucket_idx] -> push(e);
#ifdef ADIAR_STATS
stats_levelized_priority_queue.push_bucket++;
_stats.push_bucket++;
stats_levelized_priority_queue.push_bucket += 1u;
_stats.push_bucket += 1u;
#endif
return;
}
} while (bucket_offset <= pushable_buckets);

#ifdef ADIAR_STATS
stats_levelized_priority_queue.push_overflow++;
_stats.push_overflow++;
stats_levelized_priority_queue.push_overflow += 1u;
_stats.push_overflow += 1u;
#endif
_overflow_queue.push(e);
}
Expand Down Expand Up @@ -1046,8 +1046,8 @@ namespace adiar::internal
stats_levelized_priority_queue.sum_max_size_ratio += frac(_actual_max_size, _max_size);
_stats.sum_max_size_ratio += frac(_actual_max_size, _max_size);

stats_levelized_priority_queue.sum_destructors++;
_stats.sum_destructors++;
stats_levelized_priority_queue.sum_destructors += 1u;
_stats.sum_destructors += 1u;
#endif
}

Expand Down

0 comments on commit e1958ee

Please sign in to comment.