-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add some documentation for recent additions to libcu++ #1594
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Concepts Library | ||
|
||
| [`<cuda/std/concepts>`]* | Fundamental library concepts (see also: [libcu++ Specifics]({{ "standard_api/concepts_library/concepts.html" | relative_url }})). <br/><br/> 2.3.0 / CUDA 12.4 | | ||
|
||
[`<cuda/std/concepts>`]: https://en.cppreference.com/w/cpp/header/concepts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
grand_parent: Standard API | ||
parent: Concepts Library | ||
nav_order: 0 | ||
--- | ||
|
||
# `<cuda/std/concepts>` | ||
|
||
## Extensions | ||
|
||
* All library features are available from C++14 onwards. The concepts can be used like type traits prior to C++20. | ||
|
||
```c++ | ||
template<cuda::std::integral Integer> | ||
void do_something_with_integers_in_cpp20(Integer&& i) {...} | ||
|
||
template<class Integer, cuda::std::enable_if_t<cuda::std::integral<Integer>, int> = 0> | ||
void do_something_with_integers_in_cpp17(Integer&& i) {...} | ||
|
||
template<class Integer, cuda::std::enable_if_t<cuda::std::integral<Integer>, int> = 0> | ||
void do_something_with_integers_in_cpp14(Integer&& i) {...} | ||
``` | ||
|
||
## Restrictions | ||
|
||
* Subsumption does not work prior to C++20 | ||
* Subsumption is only partially implemented in the compiler until nvcc 12.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Concepts Library | ||
|
||
| [`<cuda/std/ranges>`]* | Range based algorithms and concepts (see also: [libcu++ Specifics]({{ "standard_api/ranges_library/ranges.html" | relative_url }})). <br/><br/> 2.3.0 / CUDA 12.4 | | ||
|
||
[`<cuda/std/ranges>`]: https://en.cppreference.com/w/cpp/header/ranges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
grand_parent: Standard API | ||
parent: Ranges Library | ||
nav_order: 0 | ||
--- | ||
|
||
# `<cuda/std/ranges>` | ||
|
||
## Omissions | ||
|
||
* Iterator related concepts and machinery such as `cuda::std::forward_iterator` has been implemented in 2.3.0 | ||
* Range related concepts and machinery such as `cuda::std::ranges::forward_range` and `cuda::std::ranges::subrange` has been implemented in 2.4.0 | ||
|
||
* Range based algorithms have *not* been implemented | ||
* Views have *not* been implemented | ||
|
||
## Extensions | ||
|
||
* All library features are available from C++17 onwards. The concepts can be used like type traits prior to C++20. | ||
|
||
```c++ | ||
template<cuda::std::contiguos_range Range> | ||
void do_something_with_ranges_in_cpp20(Range&& range) {...} | ||
|
||
template<class Range, cuda::std::enable_if_t<cuda::std::contiguos_range<Range>, int> = 0> | ||
void do_something_with_ranges_in_cpp17(Range&& range) {...} | ||
``` | ||
|
||
## Restrictions | ||
|
||
* Subsumption does not work prior to C++20 | ||
* Subsumption is only partially implemented in the compiler until nvcc 12.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
grand_parent: Standard API | ||
parent: Utility Library | ||
nav_order: 5 | ||
--- | ||
|
||
# `<cuda/std/expected>` | ||
|
||
## Extensions | ||
|
||
* All features are available from C++14 onwards. | ||
|
||
## Restrictions | ||
|
||
* On device no exceptions are thrown in case of a bad access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
grand_parent: Standard API | ||
parent: Utility Library | ||
nav_order: 3 | ||
--- | ||
|
||
# `<cuda/std/optional>` | ||
|
||
## Extensions | ||
|
||
* All features are available from C++14 onwards. | ||
* All features are available at compile time if the value type supports it. | ||
|
||
## Restrictions | ||
|
||
* On device no exceptions are thrown in case of a bad access. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
grand_parent: Standard API | ||
parent: Utility Library | ||
nav_order: 4 | ||
--- | ||
|
||
# `<cuda/std/variant>` | ||
|
||
## Extensions | ||
|
||
* All features are available from C++14 onwards. | ||
* All features are available at compile time if the different value types support it. | ||
|
||
## Restrictions | ||
|
||
* On device no exceptions are thrown in case of a bad access. | ||
|
||
## Cuda specific changes | ||
|
||
* `cuda::std::visit` utilizes recursion instead of the usual function pointer array. This greatly improves runtime behavior, but comes at the cost of increased compile times. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 am not sure why we need a separate file for that but that is the precedent