Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ Note: There is a tag mdspan-0.4.0 which reflects the status of P0009 before
* renaming `pointer`, `data`, `is_contiguous` and `is_always_contiguous`; and before
* renaming `size_type` to `index_type` and introducing a new `size_type = make_unsigned_t<index_type>` alias.

Building code with `mdspan`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this under the "Using mdspan" subheading and retitle this something like "Cmake find_package" or something like that

---------------------------

mdspan is discoverable by CMake:

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```cmake

find_package( mdspan REQUIRED )
target_link_libraries( myproject PUBLIC std::mdspan )
```

Your code can then have
```
#include "mdspan/mdspan.hpp"
namespace md = Kokkos;
...
md::mdspan
Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would just have the include here (I personally prefer with angle brackets, but I suppose it's a matter of taste)

Suggested change
```
#include "mdspan/mdspan.hpp"
namespace md = Kokkos;
...
md::mdspan
```cpp
#include <mdspan/mdspan.hpp>

I think we could probably leave out the namespace alias here

```


Using `mdspan`
--------------

Expand Down