kokkos / mdspan

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

Wiki tutorial seems out of date #104

Open danra opened 2 years ago

danra commented 2 years ago

First-time mdspan user here so I might be mistaken.

As an example, the following code from https://github.com/kokkos/mdspan/wiki/A-Gentle-Introduction-to-mdspan#what-is-mdspan doesn't compile with the mdspan-0.2.0 release:

int* data = /* ... */
auto ms = std::mdspan<int, 2, 2>(data);

Since a type template argument is expected where 2 is given.

It seems the current correct way of saying the above is:

auto ms = std::mdspan (data, 2, 2);
mhoemmen commented 2 years ago

Thank you for pointing this out. We haven't had a chance to update the tutorial yet. The implementation closely tracks the current version of the proposal P0009.

crtrott commented 2 years ago

I fixed the biggest wrongness in it. I will also schedule some time to develop a proper tutorial for the entirety of mdspan, but it will take a little bit.