Skip to content

Commit

Permalink
Fix mdspan build
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricchevalier19 committed Apr 9, 2024
1 parent 07fad7f commit ba9a691
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 8 additions & 4 deletions cmake/KokkosComm_configuration.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
#define KOKKOSCOMM_VERSION_MINOR @KOKKOSCOMM_VERSION_MINOR@
#define KOKKOSCOMM_VERSION_PATCH @KOKKOSCOMM_VERSION_PATCH@

#cmakedefine KOKKOSCOMM_ENABLE_MDSPAN
#cmakedefine KOKKOSCOMM_USE_STD_MDSPAN
#cmakedefine KOKKOSCOMM_USE_KOKKOS_MDSPAN
#cmakedefine KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL
#cmakedefine01 KOKKOSCOMM_ENABLE_MDSPAN
#if KOKKOSCOMM_ENABLE_MDSPAN
# cmakedefine01 KOKKOSCOMM_USE_STD_MDSPAN
# cmakedefine01 KOKKOSCOMM_USE_KOKKOS_MDSPAN
# if KOKKOSCOMM_USE_KOKKOS_MDSPAN
# define KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL 1
# endif // KOKKOSCOMM_USE_KOKKOS_MDSPAN
#endif // KOKKOSCOMM_ENABLE_MDSPAN
4 changes: 2 additions & 2 deletions src/KokkosComm_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct Traits<Span> {
}

template <typename ExecSpace>
static void pack(const ExecSpace &space, non_const_packed_view_type &dst,
static void pack(const ExecSpace &, non_const_packed_view_type &dst,
const Span &src) {
using md_index = std::array<typename Span::index_type, rank()>;

Expand Down Expand Up @@ -143,7 +143,7 @@ struct Traits<Span> {
}

template <typename ExecSpace>
static void unpack(const ExecSpace &space, Span &dst,
static void unpack(const ExecSpace &, Span &dst,
const non_const_packed_view_type &src) {
using md_index = std::array<typename Span::index_type, rank()>;

Expand Down
8 changes: 4 additions & 4 deletions unit_tests/test_isendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
//
//@HEADER

#include <gtest/gtest.h>

#include "KokkosComm.hpp"

#if KOKKOSCOMM_ENABLE_MDSPAN
#if KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL
#include <experimental/mdspan>
Expand All @@ -29,10 +33,6 @@ using std::MDSPAN_PREFIX() layout_stride;
using std::MDSPAN_PREFIX() mdspan;
#endif // KOKKOSCOMM_ENABLE_MDSPAN

#include <gtest/gtest.h>

#include "KokkosComm.hpp"

template <typename T>
class IsendRecv : public testing::Test {
public:
Expand Down

0 comments on commit ba9a691

Please sign in to comment.