Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected failure when adding assert to AgentHandle::Next() #340

Open
TobiasDuswald opened this issue Jul 17, 2023 · 0 comments
Open

Unexpected failure when adding assert to AgentHandle::Next() #340

TobiasDuswald opened this issue Jul 17, 2023 · 0 comments
Labels

Comments

@TobiasDuswald
Copy link
Contributor

Adding the following assert to AgentHandle::Next() breaks some unit tests.

AgentHandle Next() override {
    while (box_it.IsAtEnd()) {
      box_index++;
      assert(box_index < sorted_boxes.size() &&
             "box_index out of bounds. This should not happen.");
      box_it = sorted_boxes[box_index]->begin(grid_);
    }
    auto ret = *box_it;
    start++;
    ++box_it;
    return ret;
  }
};

Affects the following tests:

-TEST(DiffusionTest, GradientComputation) {
-TEST(DiffusionTest, LazyGradientComputation) {
-TEST(OperationTest, ReductionOp) {
-TEST(OperationTest, ReductionOpMultiThreading) {
-TEST(ResourceManagerTest, SortAndForEachAgentParallel) {
-TEST(ResourceManagerTest, SortAndForEachAgentParallelDynamic) {
-TEST(ResourceManagerTest, ParallelAgentRemoval_SmallScale1) {
-TEST(ResourceManagerTest, ParallelAgentRemoval_LargeScale25) {
-TEST(ResourceManagerTest, ParallelAgentRemoval_LargeScale50) {
-TEST(ResourceManagerTest, ParallelAgentRemoval_LargeScale75) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant