kokkos / mdspan

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

Put it on Godbolt #52

Closed brycelelbach closed 3 years ago

brycelelbach commented 3 years ago

Y'all already have a script for making a single header - it'd be nice to include that single header in the repo (so people can URL include it on Godbolt) or just put this on Godbolt proper through their library support.

crtrott commented 3 years ago

Did this see here:

https://godbolt.org/z/PT9c9nhqq

jasonsewall-intel commented 3 years ago

image

That link is broken for me. The godbolt link on the front page (https://godbolt.org/z/ehErvsTce) also has what I consider a bug:

  for (std::size_t i = 0; i < m.extent(0); ++i)
    for (std::size_t j = 0; j < m.extent(0); ++j)

I think the j loop should have upper bound m.extent(1). Obviously, the cord works here because m.extent(0) == m.extent(1) in this case, but if users starting playing with non-square mdspans, they might find unexpected results.

masterleinad commented 3 years ago

The Compiler Explorer link should now be https://godbolt.org/z/fW5K9cKa5.