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

API-core-view-resize from md to rst #226

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

pierrepebay
Copy link
Collaborator

@pierrepebay pierrepebay commented Dec 14, 2022

  • API/core/view/resize transition from .md to .rst
before (.md) after (.rst)
image image
image ---
image image
image image

@fnrizzi
Copy link
Collaborator

fnrizzi commented Dec 14, 2022

@pierrepebay one quick comment: to improve readability can you please ensure the arguments are all aligned? in the snipper below all args are aligned with Vieew and similarly for all others?

for example in here:
image

@pierrepebay
Copy link
Collaborator Author

@fnrizzi not sure if this is the alignment changes you wanted, let me know if so.

@fnrizzi
Copy link
Collaborator

fnrizzi commented Dec 19, 2022

@fnrizzi not sure if this is the alignment changes you wanted, let me know if so.

yes i think that is right, if that renders it correctly!

@fnrizzi fnrizzi marked this pull request as ready for review March 10, 2023 09:05
@fnrizzi
Copy link
Collaborator

fnrizzi commented Mar 10, 2023

avoided sphinx syntax because really messes up indentation of arguments, so it becomes hard to read. see #340

@fnrizzi fnrizzi changed the title kokkos#120: API-core-view-resize from md to rst API-core-view-resize from md to rst Mar 31, 2023
nmm0
nmm0 previously requested changes Apr 3, 2023
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.

Use sphinx directives in order to enable cross-referencing

Description
-----------

* .. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use :cpp:function:: (or rather our variant :cppkokkos:function::)


* ``View<T, P...>::array_layout`` is either ``LayoutLeft`` or ``LayoutRight``.

* .. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above


* ``View<T, P...>::array_layout`` is either ``LayoutLeft` or `LayoutRight``.

* .. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

* ``v``: existing view, can be a default constructed one.
* ``layout``: a layout instance containing the new dimensions.

* .. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

* ``layout``: a layout instance containing the new dimensions.
* ``arg_prop``: View constructor property, e.g., ``Kokkos::WithoutInitializing``.

* .. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@fnrizzi
Copy link
Collaborator

fnrizzi commented Apr 3, 2023

@nmm0 see my comment "avoided sphinx syntax because really messes up indentation of arguments,"

@nmm0
Copy link
Contributor

nmm0 commented Apr 3, 2023

Ack I saw Francesco's comment only after I submitted the review, please hold off on my suggested changes I don't want to give conflicting suggestions


Kokkos::resize(Kokkos::WithoutInitializing, v, 2, 3);

Resize a ``Kokkos::View`` with dynamic rank 2 to have dynamic extent 2 and 3 respectively preserving previous content. After this call, the new content is uninitialized.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the "Example" section have real, live working code that one could copy and paste? This is not an .md to .rst issue, but one relating to standardization. This issue does not have to be dealt with in the conversion exercise. I mention it because we probably want to move towards "live", working code, vs. pseudo code.

@nmm0 nmm0 dismissed their stale review April 3, 2023 18:03

Francesco pointed out the problem with my suggestions

@fnrizzi
Copy link
Collaborator

fnrizzi commented Apr 3, 2023

@nmm0 can i merge this?

@nmm0
Copy link
Contributor

nmm0 commented Apr 3, 2023

@nmm0 can i merge this?

I think it's fine for now though we may want to file an issue to update when the sphinx issue is resolved. Incidentally, how bad is the rendering currently? Is it worth losing the ability to cross reference these functions?

@fnrizzi
Copy link
Collaborator

fnrizzi commented Apr 4, 2023

@nmm0 here is an example (new rendering vs old for the same overload):

image

if you feel strongly that we should change, I am happy to do so

@nmm0
Copy link
Contributor

nmm0 commented Apr 4, 2023

@nmm0 here is an example (new rendering vs old for the same overload):

...

if you feel strongly that we should change, I am happy to do so

Yeah that is pretty unreadable. Let's merge this now and we can merge on fixing up stuff when sphinx gets updated or we have a better solution (like trying utf8 ellipses or something like that :P)

@nmm0 nmm0 merged commit 883fa86 into kokkos:main Apr 4, 2023
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.

4 participants