Closed nmm0 closed 1 year ago
A couple of changes -- I put the main headers in <mdspan/mdspan.hpp>
and <mdspan/experimental/mdarray.hpp>
. I left all the other headers as is, but we can move them within mdspan/
(except the std headers of course). I figured that would probably make the diff a bit difficult to track though.
Finally, we have the "std-like" mdspan header as <experimental/mdspan>
, but mdspan is not in namespace std
anymore. Do we want to change that and move it to be just <mdspan>
? This would of course conflict with any actual standard library implementation and we would probably want a cmake option to disable that from happening in installs.
I also had to add an extra define MDSPAN_IMPL_NAMESPACE_STD
when we are in "std-like" mode because of conflicts with <span>
Couple comments: I think I am ok to drop C++14 support, but I am also ok to NOT support nesting for things we consider mature. Also wouldn't it be a user thing, that if a user says I want everything in a nested namespace and they use C++17, they could define MDSPAN_IMPL_STANDARD_NAMESPACE
as std::experimental
, and then submdspan say would end up in std::experimental::proposed
?
Also I have thought about defaults. I think md
is too short and too potentially conflicted. I don't really see a reason why we shouldn't make the default "Kokkos" and "Experimental".
Couple comments: I think I am ok to drop C++14 support, but I am also ok to NOT support nesting for things we consider mature. Also wouldn't it be a user thing, that if a user says I want everything in a nested namespace and they use C++17, they could define
MDSPAN_IMPL_STANDARD_NAMESPACE
asstd::experimental
, and then submdspan say would end up instd::experimental::proposed
?Also I have thought about defaults. I think
md
is too short and too potentially conflicted. I don't really see a reason why we shouldn't make the default "Kokkos" and "Experimental".
@crtrott I changed the namespaces to Kokkos and Experimental
There are a ton of changes here, mostly because we use
std::experimental
extensively. This right now adds two macros,MDSPAN_IMPL_STANDARD_NAMESPACE
, which defaults tomd
andMDSPAN_IMPL_PROPOSED_NAMESPACE
which defaults toexperimental
and will be nested insideMDSPAN_IMPL_STANDARD_NAMESPACE
.These are of course, subject to change :)
I also added two headers for getting the "library"-style includes,
mdspan.hpp
andexperimental/mdarray.hpp
. I think eventually we probably want to remove the oldstd
-style includes. I'm also considering moving these to a subfolder, e.g.#include <mdspan/mdspan.hpp>
and#include <mdspan/experimental/mdarray.hpp>
. Anyway, can adjust as needed.Also, I avoided using CMake here so we can more easily copy the files over to Kokkos.