Skip to content

Commit

Permalink
Update macroatom.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 8, 2024
1 parent 5dae6bf commit e606320
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions macroatom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ __host__ __device__ void do_macroatom(Packet &pkt, const MacroAtomState &pktmast
const double randomrate = rng_uniform() * cumulative_transitions[MA_ACTION_COUNT - 1];

// first cumulative_transitions[i] such that cumulative_transitions[i] > randomrate
const auto selected_action = static_cast<enum ma_action>(
std::ranges::upper_bound(cumulative_transitions, randomrate) - cumulative_transitions.cbegin());
const auto selected_action = static_cast<int>(std::ranges::upper_bound(cumulative_transitions, randomrate) -
cumulative_transitions.cbegin());

switch (selected_action) {
case MA_ACTION_RADDEEXC: {
Expand Down

0 comments on commit e606320

Please sign in to comment.