Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #341

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

VictorEijkhout
Copy link

@VictorEijkhout VictorEijkhout commented Jun 4, 2024

CMake discoverability

Fixes #339

CMake discoverability
@mhoemmen mhoemmen requested review from crtrott, dalg24, ibaned and nmm0 June 5, 2024 14:15
Copy link
Contributor

@mhoemmen mhoemmen left a comment

Choose a reason for hiding this comment

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

Thanks @VictorEijkhout for contributing this! Looks good to me!

@crtrott What do you think?

@mhoemmen
Copy link
Contributor

mhoemmen commented Jun 5, 2024

@VictorEijkhout Btw I took the liberty of adding a "Fixes #339" message to your PR description, so that merging this PR will automatically close the issue.

Copy link
Member

@crtrott crtrott left a comment

Choose a reason for hiding this comment

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

I had yesterday a discussion with Damien on this. This PR points something unfortunate out: I am not sure that the target being called std::mdspan is a very fortunate choice considering that mdspan is in the standard, and part of LLVM for example. We were wondering if we should rename the target (with providing an alias as std::mdspan for a while).

@VictorEijkhout
Copy link
Author

@crtrott I had the same thought. Especially since in the program it's still Kokkos::mdspan.

Copy link
Contributor

@nmm0 nmm0 left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this! I just have a couple of suggestions

@@ -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

Comment on lines +27 to +31
```
#include "mdspan/mdspan.hpp"
namespace md = Kokkos;
...
md::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 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

@crtrott
Copy link
Member

crtrott commented Jun 17, 2024

We should take this over and change what we name our cmake targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What targets are defined by find_package( mdspan )?
4 participants