Skip to content

Commit

Permalink
fix(pu): fix emplace_back in macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
puyuan1996 committed Oct 26, 2023
1 parent 8e81483 commit 4de2a9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lzero/mcts/ctree/ctree_sampled_efficientzero/lib/cnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ namespace tree
// After sorting, the first vector is the index, and the second vector is the probability value after perturbation sorted from large to small.
for (size_t iter = 0; iter < disturbed_probs.size(); iter++)
{
disc_action_with_probs.emplace_back(std::make_pair(iter, disturbed_probs[iter]));
#ifdef __APPLE__
disc_action_with_probs.__emplace_back(std::make_pair(iter, disturbed_probs[iter]));
#else
disc_action_with_probs.emplace_back(std::make_pair(iter, disturbed_probs[iter]));
#endif
}

std::sort(disc_action_with_probs.begin(), disc_action_with_probs.end(), cmp);
Expand Down

0 comments on commit 4de2a9e

Please sign in to comment.