kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
413 stars 69 forks source link

Clang-17 and MSVC on Windows fails to build (C++20) #298

Open tobiashienzsch opened 12 months ago

tobiashienzsch commented 12 months ago

Error message:

Clang 15/16 work on Linux. I don't have access there for 17 unfortunately.

After switching to MSVC 2022 on GitHub Actions, it fails as well. Looks like the error is coming from a similar place (no unique emulation in layout stride)

D:/a/plugin-perceptual-convolution/plugin-perceptual-convolution/build/_deps/mdspan-src/include\mdspan/../experimental/__p0009_bits/layout_stride.hpp:288:9: error: type '__base_t' (aka '__no_unique_address_emulation<__compressed_pair<Kokkos::extents<unsigned long long, 18446744073709551615, 18446744073709551615>, possibly_empty_array<unsigned long long, extents_type::rank()>>>') is not a direct or virtual base of 'Kokkos::layout_stride::mapping<Kokkos::extents<unsigned long long, 18446744073709551615, 18446744073709551615>>'
  288 |       : __base_t(__base_t{__member_pair_t(
      |         ^~~~~~~~
D:/a/plugin-perceptual-convolution/plugin-perceptual-convolution/build/_deps/mdspan-src/include\mdspan/../experimental/__p2630_bits/submdspan_mapping.hpp:237:9: note: in instantiation of function template specialization 'Kokkos::layout_stride::mapping<Kokkos::extents<unsigned long long, 18446744073709551615, 18446744073709551615>>::mapping<unsigned long long>' requested here
  237 |         dst_mapping_t(dst_ext, detail::construct_sub_strides(
      |         ^
D:/a/plugin-perceptual-convolution/plugin-perceptual-convolution/build/_deps/mdspan-src/include\mdspan/../experimental/__p0009_bits/layout_right.hpp:265:21: note: in instantiation of function template specialization 'Kokkos::layout_right::mapping<Kokkos::extents<unsigned long long, 18446744073709551615, 18446744073709551615>>::submdspan_mapping_impl<Kokkos::full_extent_t, std::tuple<unsigned long long, unsigned long long>>' requested here
  265 |          return src.submdspan_mapping_impl(slices...);
      |                     ^
D:/a/plugin-perceptual-convolution/plugin-perceptual-convolution/build/_deps/mdspan-src/include\mdspan/../experimental/__p2630_bits/submdspan.hpp:29:45: note: in instantiation of function template specialization 'Kokkos::submdspan_mapping<Kokkos::full_extent_t, std::tuple<unsigned long long, unsigned long long>>' requested here
   29 |   const auto sub_submdspan_mapping_result = submdspan_mapping(src.mapping(), slices...);
      |                                             ^
D:/a/plugin-perceptual-convolution/plugin-perceptual-convolution/src/plugin/ui/BenchmarkTab.cpp:174:16: note: in instantiation of function template specialization 'Kokkos::submdspan<float, Kokkos::extents<unsigned long long, 18446744073709551615, 18446744073709551615>, Kokkos::layout_right, Kokkos::default_accessor<float>, Kokkos::full_extent_t, std::tuple<unsigned long long, unsigned long long>>' requested here
  174 |         stdex::submdspan(impulse.to_mdspan(), stdex::full_extent, std::tuple{blockSize, impulse.extent(1)}),
      |   
crtrott commented 12 months ago

We will take a look.