Skip to content

Commit

Permalink
intrepid2: compatibility update with kokkos-kernels
Browse files Browse the repository at this point in the history
Address issue kokkos/kokkos-kernels#2456 (comment)

Co-authored-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Nathan Ellingwood <[email protected]>
  • Loading branch information
ndellingwood and Yuuichi Asahi committed Dec 16, 2024
1 parent 436ce06 commit 5812d0f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/intrepid2/src/Projection/Intrepid2_ProjectionTools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
#ifdef HAVE_INTREPID2_KOKKOSKERNELS
#include "KokkosBatched_QR_Serial_Internal.hpp"
#include "KokkosBatched_ApplyQ_Serial_Internal.hpp"
#if KOKKOS_VERSION >= 40599
#include "KokkosBatched_Trsv_Decl.hpp"
#else
#include "KokkosBatched_Trsv_Serial_Internal.hpp"
#endif
#include "KokkosBatched_Util.hpp"
#endif

Expand Down Expand Up @@ -545,11 +549,15 @@ class ProjectionTools {
w.data());

// R0^{-1} b -> b
#if KOKKOS_VERSION >= 40599
KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Upper, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::NonUnit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(1.0, A0, b);
#else
KokkosBatched::SerialTrsvInternalUpper<KokkosBatched::Algo::Trsv::Unblocked>::invoke(false,
A0.extent(0),
1.0,
A0.data(), A0.stride_0(), A0.stride_1(),
b.data(), b.stride_0());
#endif

//scattering b into the basis coefficients
for(ordinal_type i=0; i<n; ++i){
Expand Down Expand Up @@ -586,11 +594,15 @@ class ProjectionTools {
w.data());

// R^{-1} b -> b
#if KOKKOS_VERSION >= 40599
KokkosBatched::SerialTrsv<KokkosBatched::Uplo::Upper, KokkosBatched::Trans::NoTranspose, KokkosBatched::Diag::NonUnit, KokkosBatched::Algo::Trsv::Unblocked>::invoke(1.0, A, b);
#else
KokkosBatched::SerialTrsvInternalUpper<KokkosBatched::Algo::Trsv::Unblocked>::invoke(false,
A.extent(0),
1.0,
A.data(), A.stride_0(), A.stride_1(),
b.data(), b.stride_0());
#endif

//scattering b into the basis coefficients
for(ordinal_type i=0; i<n; ++i){
Expand Down

0 comments on commit 5812d0f

Please sign in to comment.