-
Notifications
You must be signed in to change notification settings - Fork 71
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
base: stable
Are you sure you want to change the base?
Update README.md #341
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -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` | ||||||||||||||||
--------------------------- | ||||||||||||||||
|
||||||||||||||||
mdspan is discoverable by CMake: | ||||||||||||||||
|
||||||||||||||||
``` | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
I think we could probably leave out the namespace alias here |
||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
|
||||||||||||||||
Using `mdspan` | ||||||||||||||||
-------------- | ||||||||||||||||
|
||||||||||||||||
|
There was a problem hiding this comment.
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