Skip to content

Commit

Permalink
Fix formatting of latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Feb 23, 2024
1 parent 43db66e commit bdb937f
Show file tree
Hide file tree
Showing 17 changed files with 605 additions and 687 deletions.
10 changes: 5 additions & 5 deletions src/adiar/internal/algorithms/nested_sweeping.h
Original file line number Diff line number Diff line change
Expand Up @@ -990,12 +990,14 @@ namespace adiar::internal
// ---------------------------------------------------------------------
// Determine memory for priority queue depending on whether random
// access can also be used.
const size_t minimum_inner_pq_memory = policy_impl.pq_memory(inner_memory - inner_stream_memory);
const size_t minimum_inner_pq_memory =
policy_impl.pq_memory(inner_memory - inner_stream_memory);
adiar_assert(minimum_inner_pq_memory <= inner_memory - inner_stream_memory,
"There should be enough memory to include all streams and priority queue");

const size_t inner_ra_memory = policy_impl.ra_memory(outer_file);
const bool use_random_access = ep.template get<exec_policy::access>() == exec_policy::access::Random_Access
const bool use_random_access =
ep.template get<exec_policy::access>() == exec_policy::access::Random_Access
|| (inner_ra_memory <= inner_memory - inner_stream_memory - minimum_inner_pq_memory
&& ep.template get<exec_policy::access>() == exec_policy::access::Auto
&& outer_file->indexable);
Expand Down Expand Up @@ -1030,9 +1032,7 @@ namespace adiar::internal
ep.template get<exec_policy::memory>() == exec_policy::memory::Internal;

const size_t inner_pq_max_size =
internal_only
? std::min(inner_pq_fits, inner_pq_bound)
: inner_pq_bound;
internal_only ? std::min(inner_pq_fits, inner_pq_bound) : inner_pq_bound;

// TODO (bdd_compose): ask 'nesting_policy' implementation for the initalizer list
if (!external_only
Expand Down
19 changes: 11 additions & 8 deletions src/adiar/internal/algorithms/prod2.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,13 @@ namespace adiar::internal
public:
__prod2_recurse_in__output_node(arc_writer& aw,
const typename Policy::node_type::uid_type& out_uid)
: _aw(aw), _out_uid(out_uid)
: _aw(aw)
, _out_uid(out_uid)
{}

template <typename Request>
inline void
operator() (const Request& req) const
operator()(const Request& req) const
{
if (Policy::no_skip || !req.data.source.is_nil()) {
this->_aw.push_internal({ req.data.source, this->_out_uid });
Expand All @@ -150,12 +151,13 @@ namespace adiar::internal

public:
__prod2_recurse_in__output_terminal(arc_writer& aw, const Pointer& out_terminal)
: _aw(aw), _out_terminal(out_terminal)
: _aw(aw)
, _out_terminal(out_terminal)
{}

template <typename Request>
inline void
operator() (const Request& req) const
operator()(const Request& req) const
{
this->_aw.push_terminal({ req.data.source, this->_out_terminal });
}
Expand All @@ -169,17 +171,18 @@ namespace adiar::internal
struct __prod2_recurse_in__forward
{
private:
PriorityQueue &_pq;
PriorityQueue& _pq;
const Target& _t;

public:
__prod2_recurse_in__forward(PriorityQueue &pq, const Target& t)
: _pq(pq), _t(t)
__prod2_recurse_in__forward(PriorityQueue& pq, const Target& t)
: _pq(pq)
, _t(t)
{}

template <typename Request>
inline void
operator() (const Request& req) const
operator()(const Request& req) const
{
this->_pq.push({ this->_t, {}, req.data });
}
Expand Down
Loading

0 comments on commit bdb937f

Please sign in to comment.