Skip to content

Commit 630ae9e

Browse files
authored
Merge pull request #1483 from LLNL/bugfix/quest-candidates-hip-build
Fix HIP build when not using IntersectionShaper
2 parents a73d429 + cc64cff commit 630ae9e

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

src/axom/quest/examples/quest_candidates_example.cpp

+22-18
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,6 @@ using UMesh = axom::mint::UnstructuredMesh<axom::mint::SINGLE_SHAPE>;
5353
using IndexPair = std::pair<axom::IndexType, axom::IndexType>;
5454
using RuntimePolicy = axom::runtime_policy::Policy;
5555

56-
// clang-format off
57-
#if defined(AXOM_RUNTIME_POLICY_USE_OPENMP)
58-
using omp_exec = axom::OMP_EXEC;
59-
#else
60-
using omp_exec = seq_exec;
61-
#endif
62-
63-
#if defined(AXOM_RUNTIME_POLICY_USE_CUDA)
64-
constexpr int CUDA_BLK_SZ = 256;
65-
using cuda_exec = axom::CUDA_EXEC<CUDA_BLK_SZ>;
66-
#else
67-
using cuda_exec = seq_exec;
68-
#endif
69-
70-
// Hip exec included from IntersectionShaper header
71-
72-
// clang-format on
73-
7456
//-----------------------------------------------------------------------------
7557
/// Basic RAII utility class for initializing and finalizing slic logger
7658
//-----------------------------------------------------------------------------
@@ -725,6 +707,28 @@ std::vector<IndexPair> findCandidatesImplicit(const HexMesh& insertMesh,
725707

726708
int main(int argc, char** argv)
727709
{
710+
// clang-format off
711+
#if defined(AXOM_RUNTIME_POLICY_USE_OPENMP)
712+
using omp_exec = axom::OMP_EXEC;
713+
#else
714+
using omp_exec = seq_exec;
715+
#endif
716+
717+
#if defined(AXOM_RUNTIME_POLICY_USE_CUDA)
718+
constexpr int CUDA_BLK_SZ = 256;
719+
using cuda_exec = axom::CUDA_EXEC<CUDA_BLK_SZ>;
720+
#else
721+
using cuda_exec = seq_exec;
722+
#endif
723+
724+
#if defined(AXOM_RUNTIME_POLICY_USE_HIP)
725+
constexpr int HIP_BLK_SZ = 256;
726+
using hip_exec = axom::HIP_EXEC<HIP_BLK_SZ>;
727+
#else
728+
using hip_exec = seq_exec;
729+
#endif
730+
// clang-format on
731+
728732
// Initialize logger; use RAII so it will finalize at the end of the application
729733
BasicLogger logger;
730734

0 commit comments

Comments
 (0)