Skip to content

Commit

Permalink
Print point and triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Sep 25, 2023
1 parent 7670e3f commit 45af564
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions benchmarks/tokamak/tokamak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ int main()
if (intersects)
{
coefficients = test_coeffs;
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%d, %d: same triangle\n", i, j);
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%d, %d: %f %f in %d (same)\n", i,
j, point[0], point[1],
triangle_index);
}
else
{
Expand All @@ -296,9 +298,8 @@ int main()
ArborX::attach(ArborX::intersects(point),
Attachment{triangle_index, coefficients}),
TriangleIntersectionCallback<DeviceType>{triangles});
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%d, %d: %d %f %f %f\n", i, j,
triangle_index, coefficients[0],
coefficients[1], coefficients[2]);
KOKKOS_IMPL_DO_NOT_USE_PRINTF("%d, %d: %f %f in %d\n", i, j,
point[0], point[1], triangle_index);
}
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/details/ArborX_Callbacks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ KOKKOS_INLINE_FUNCTION
Predicate &&predicate,
Primitive &&primitive)
{
return ((Callback &&)callback)((Predicate &&)predicate,
(Primitive &&)primitive) ==
return ((Callback &&) callback)((Predicate &&) predicate,
(Primitive &&) primitive) ==
CallbackTreeTraversalControl::early_exit;
}

Expand All @@ -162,7 +162,7 @@ KOKKOS_INLINE_FUNCTION
Predicate &&predicate,
Primitive &&primitive)
{
((Callback &&)callback)((Predicate &&)predicate, (Primitive &&)primitive);
((Callback &&) callback)((Predicate &&) predicate, (Primitive &&) primitive);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/details/ArborX_DetailsTreeVisualization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ struct TreeVisualization
predicates(0) = pred;

TreeTraversal<Tree, Predicates, Callback, NearestPredicateTag>
tree_traversal(space, tree, predicates,
tree_traversal(ExecutionSpace{}, tree, predicates,
Callback{tree, visitor, permute});
#endif
}
Expand Down

0 comments on commit 45af564

Please sign in to comment.