Skip to content

Commit

Permalink
Adapt to P0009R17
Browse files Browse the repository at this point in the history
- flyby: minor tweak to CMakeLists.txt (detect KokkosKernels quietly)
- flyby: adding workaround for MSVC to transposed.hpp
  • Loading branch information
hkaiser committed Jun 25, 2022
1 parent 76d38cf commit 31dcaa3
Show file tree
Hide file tree
Showing 8 changed files with 345 additions and 296 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ option(LINALG_ENABLE_BLAS
"Assume that we are linking with a BLAS library."
${BLAS_FOUND})

find_package(KokkosKernels)
find_package(KokkosKernels QUIET)
option(LINALG_ENABLE_KOKKOS
"Enable Kokkos-based implementation. Default: autodetect Kokkos installation."
${KokkosKernels_FOUND})
Expand Down
3 changes: 2 additions & 1 deletion include/experimental/__p1673_bits/transposed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ namespace impl {
template<class OriginalExtents>
static auto mapping(const typename layout_stride::template mapping<OriginalExtents>& orig_map) {
using original_mapping_type = typename layout_stride::template mapping<OriginalExtents>;
using extents_type = transpose_extents_t<typename original_mapping_type::extents_type>;
// MSVC fails for transpose_extents_t<typename original_mapping_type::extents_type>
using extents_type = transpose_extents_t<typename layout_stride::template mapping<OriginalExtents>::extents_type>;
using return_mapping_type = typename layout_type::template mapping<extents_type>;
return return_mapping_type{
transpose_extents(orig_map.extents()),
Expand Down
4 changes: 3 additions & 1 deletion tests/hpx-based/add_rank1_hpx.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2022 Hartmut Kaiser

#include <complex>
#include <cstddef>

#include <experimental/linalg>
#include <experimental/mdspan>

Expand Down Expand Up @@ -35,7 +37,7 @@ void hpx_blas1_add_test_impl(ExPolicy policy, x_t x, y_t y, z_t z)
// compute gold
std::vector<value_type> gold(extent);
using mdspan_t = std::experimental::mdspan<value_type,
std::experimental::extents<dynamic_extent>>;
std::experimental::extents<::std::size_t, dynamic_extent>>;
mdspan_t z_gold(gold.data(), extent);
add_gold_solution(x, y, z_gold);

Expand Down
Loading

0 comments on commit 31dcaa3

Please sign in to comment.