-
Notifications
You must be signed in to change notification settings - Fork 49
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
Adding documentation for Kokkos::Array #615
base: main
Are you sure you want to change the base?
Conversation
Removed third template parameter and simplified the other descriptions Left to do: Tuple protocol (structured bindings) Deduction guide Mention deprecated interface (enough detail if folks see the extra template parameter; not enough to use it)
@@ -7,6 +7,8 @@ API: Containers | |||
|
|||
* - Container | |||
- Description | |||
* - `Array <containers/Array.html>`__ |
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 see this more like View
... do we really want this to be in containers?
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.
In C++ it is considered a container, but I don't have a strong feeling on it.
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.
Here Containers refers to the Kokkos subpackage, that is, everything that is defined in the containers/src/
directory. Array
belongs to Core so it is not the right place.
The API reference for Core is a bit messy at the moment so I would either put it in Utilities next to Complex
or in the STL Compat section. We can put organize things better in follow ups.
.. | ||
Use the following convention for headings: | ||
|
||
# with overline, for parts (collections of chapters) | ||
|
||
* with overline, for chapters | ||
|
||
= for sections | ||
|
||
- for subsections | ||
|
||
^ for subsubsections | ||
|
||
" for paragraphs | ||
|
||
.. |
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.
did you mean to push the comment stuff?
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.
No; I'll fix it.
Deduction Guides | ||
---------------- | ||
|
||
.. cppkokkos:function:: template<class T, class... U> Array(T, U...) -> Array<T, 1 + sizeof...(U)> |
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.
maybe this can be highlighted in an example
|
||
.. cppkokkos:function:: template<class T, size_t N> constexpr kokkos_swap(Array<T, N>& l, Array<T, N>& r) noexcept(N == 0 || is_nothrow_swappable_V<T>) | ||
|
||
:return: If ``T`` is swappable or ``N == 0``, each of the elements in `l` and `r` are swapped via ``kokkos_swap``. |
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.
not really a return ... but might be to render it neatly in sphinx
.. | ||
High-level, human-language summary of what the thing does, and if possible, brief statement about why it exists (2 - 3 sentences, max); | ||
|
||
Description |
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.
Since we have the old version below: maybe add in which version this one was added?
Cleaned up examples a little
removed line numbers from examples (gets in the way of copy/paste) Fixed to_array
Fixes #430.