Skip to content

Commit

Permalink
fix strange compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Sep 26, 2024
1 parent 1632222 commit 23aeba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/poisson_gmg/poisson_equation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ class PoissonEquation {
pack.IsPhysicalBoundary(b, 0, 1, 0) && (jb.e == fj),
pack.IsPhysicalBoundary(b, -1, 0, 0) && (kb.s == fk),
pack.IsPhysicalBoundary(b, 1, 0, 0) && (kb.e == fk)};

// Use both pack and pack_coarse outside of the constexpr if
// statements to prevent compilation errors in some CUDA compilers
pack(b, n, fk, fj, fi) = pack_coarse(b, n, ck, cj, ci);
if constexpr (ProlongationType::Constant == prolongation_type) {
pack(b, n, fk, fj, fi) = pack_coarse(b, n, ck, cj, ci);
} else if constexpr (ProlongationType::Linear == prolongation_type) {
Expand Down

0 comments on commit 23aeba3

Please sign in to comment.