Skip to content

Commit

Permalink
Lapack: gesv host tpl fix
Browse files Browse the repository at this point in the history
The types used for gesv_tpl_spec_avail and the actual TPL
instantiation where mismatched leading to linker error.
  • Loading branch information
Luc Berger-Vergiat (-EXP) committed Nov 15, 2023
1 parent 52d70c1 commit 9d2da26
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions lapack/tpls/KokkosLapack_gesv_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ struct gesv_tpl_spec_avail {
// Generic Host side LAPACK (could be MKL or whatever)
#ifdef KOKKOSKERNELS_ENABLE_TPL_LAPACK

#define KOKKOSLAPACK_GESV_TPL_SPEC_AVAIL_LAPACK(SCALAR, LAYOUT, MEMSPACE) \
template <class ExecSpace> \
struct gesv_tpl_spec_avail< \
ExecSpace, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<int*, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > > { \
enum : bool { value = true }; \
#define KOKKOSLAPACK_GESV_TPL_SPEC_AVAIL_LAPACK(SCALAR, LAYOUT, MEMSPACE) \
template <class ExecSpace> \
struct gesv_tpl_spec_avail< \
ExecSpace, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<int*, LAYOUT, Kokkos::Device<ExecSpace, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > > { \
enum : bool { value = true }; \
};

KOKKOSLAPACK_GESV_TPL_SPEC_AVAIL_LAPACK(double, Kokkos::LayoutLeft,
Expand Down
4 changes: 2 additions & 2 deletions lapack/tpls/KokkosLapack_gesv_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void lapackGesvWrapper(const AViewType& A, const BViewType& B,
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<int*, LAYOUT, \
Kokkos::Device<Kokkos::DefaultHostExecutionSpace, \
Kokkos::Device<ExecSpace, \
Kokkos::HostSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
Expand All @@ -95,7 +95,7 @@ void lapackGesvWrapper(const AViewType& A, const BViewType& B,
using BViewType = \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<ExecSpace, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PViewType = Kokkos::View<int*, LAYOUT, Kokkos::HostSpace, \
using PViewType = Kokkos::View<int*, LAYOUT, Kokkos::Device<ExecSpace, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
\
static void gesv(const ExecSpace& /* space */, const AViewType& A, \
Expand Down

0 comments on commit 9d2da26

Please sign in to comment.