Skip to content

Commit

Permalink
Make compile with Cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
David Schneider committed Jun 6, 2024
1 parent f59545f commit 576dce9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/mapping/device/GinkgoRBFKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void create_rbf_system_matrix(std::shared_ptr<const gko::Executor> exec,
auto k_supportPoints = map_data(supportPoints.get());
auto k_targetPoints = map_data(targetPoints.get());

if (dynamic_cast<const gko::ReferenceExecutor *>(exec.get()) ||
dynamic_cast<const gko::OmpExecutor *>(exec.get())) {
if (std::dynamic_pointer_cast<const gko::ReferenceExecutor>(exec) ||
std::dynamic_pointer_cast<const gko::OmpExecutor>(exec)) {
// Row-major access
Kokkos::parallel_for(
"create_rbf_system_matrix_row_major",
Expand Down Expand Up @@ -113,8 +113,8 @@ void fill_polynomial_matrix(std::shared_ptr<const gko::Executor> exec,
auto k_mtx = map_data(mtx.get());
auto k_x = map_data(x.get());

if (dynamic_cast<const gko::ReferenceExecutor *>(exec.get()) ||
dynamic_cast<const gko::OmpExecutor *>(exec.get())) {
if (std::dynamic_pointer_cast<const gko::ReferenceExecutor>(exec) ||
std::dynamic_pointer_cast<const gko::OmpExecutor>(exec)) {
Kokkos::parallel_for(
"fill_polynomial_matrix_row_major",
Kokkos::MDRangePolicy<Kokkos::Rank<2>>{{0, 0}, {mtx->get_size()[0], mtx->get_size()[1]}},
Expand Down
2 changes: 1 addition & 1 deletion src/mapping/impl/BasisFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#endif

constexpr double NUMERICAL_ZERO_DIFFERENCE = 1.0e-14;
PRECICE_MEMORY_SPACE constexpr double NUMERICAL_ZERO_DIFFERENCE = 1.0e-14;

#if !defined(__NVCC__) || !defined(__HIPCC__)
#include "logging/Logger.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/mapping/tests/GinkgoRadialBasisFctSolverTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ BOOST_AUTO_TEST_SUITE(GinkgoRadialBasisFunctionSolver)
} \
BOOST_AUTO_TEST_CASE(MapCompactPolynomialC8) \
{ \
PRECICE_TEST(1_rank); \
PRECICE_TEST(1_rank, Require::Kokkos); \
double supportRadius = 1.2; \
CompactPolynomialC8 fct(supportRadius); \
doLocalCode(CompactPolynomialC8, fct, Polynomial::SEPARATE, EXECUTOR, SOLVER); \
Expand Down

0 comments on commit 576dce9

Please sign in to comment.