|
@@ -50,7 +50,8 @@ struct WNEvalPlan {
|
|
|
WNEvalPlan(WNEvalPlan &&wn) = default;
|
|
|
WNEvalPlan& operator=(WNEvalPlan&&) = default;
|
|
|
|
|
|
- WNEvalPlan(uint32_t N, uint32_t nthreads) : N(N), nthreads(nthreads) {
|
|
|
+ WNEvalPlan(uint32_t N_, uint32_t nthreads_) : N(N_),
|
|
|
+ nthreads(nthreads_) {
|
|
|
if (N<2) {
|
|
|
subtree_num_inswitches = 0;
|
|
|
subtree_num_outswitches = 0;
|
|
@@ -80,20 +81,20 @@ struct WNEvalPlan {
|
|
|
}
|
|
|
|
|
|
// Count the number of input and output switches used by a
|
|
|
- // WaksmanNetwork with N items. Add those values to
|
|
|
+ // WaksmanNetwork with num items. Add those values to
|
|
|
// subtree_num_inswitches and subtree_num_outswitches.
|
|
|
- void count_switches(uint32_t N) {
|
|
|
- if (N<2) {
|
|
|
+ void count_switches(uint32_t num) {
|
|
|
+ if (num<2) {
|
|
|
return;
|
|
|
}
|
|
|
- if (N == 2) {
|
|
|
+ if (num == 2) {
|
|
|
subtree_num_outswitches += 1;
|
|
|
return;
|
|
|
}
|
|
|
- const uint32_t Nleft = (N+1)/2;
|
|
|
- const uint32_t Nright = N/2;
|
|
|
- const uint32_t numInSwitches = (N-1)/2;
|
|
|
- const uint32_t numOutSwitches = N/2;
|
|
|
+ const uint32_t Nleft = (num+1)/2;
|
|
|
+ const uint32_t Nright = num/2;
|
|
|
+ const uint32_t numInSwitches = (num-1)/2;
|
|
|
+ const uint32_t numOutSwitches = num/2;
|
|
|
|
|
|
subtree_num_inswitches += numInSwitches;
|
|
|
subtree_num_outswitches += numOutSwitches;
|
|
@@ -148,10 +149,10 @@ class WaksmanNetwork {
|
|
|
const WNEvalPlan &plan;
|
|
|
WNTraversal &traversal;
|
|
|
|
|
|
- appInvPermArgs(WaksmanNetwork &wn, unsigned char *buf,
|
|
|
- size_t block_size, const WNEvalPlan &plan, WNTraversal &traversal)
|
|
|
- : wn(wn), buf(buf), block_size(block_size), plan(plan),
|
|
|
- traversal(traversal) {}
|
|
|
+ appInvPermArgs(WaksmanNetwork &wn_, unsigned char *buf_,
|
|
|
+ size_t block_size_, const WNEvalPlan &plan_, WNTraversal
|
|
|
+ &traversal_) : wn(wn_), buf(buf_), block_size(block_size_),
|
|
|
+ plan(plan_), traversal(traversal_) {}
|
|
|
};
|
|
|
|
|
|
template <OSwap_Style oswap_style>
|