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

Refactor and document parts of pika/init.hpp #825

Merged
merged 12 commits into from
Nov 8, 2023

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Oct 25, 2023

Fixes #703 and does some additional refactoring at the same time.

  • Removes the int return type from functions that don't have anything useful to return. The only functions that keep the int return type are pika::stop and pika::init because they can return the value from pika_main.
  • Removes the error_code parameter from all pika::start, pika::stop, etc. functions in pika/init.hpp.
  • Adds documentation (to the API reference page) for pika::start, pika::stop, pika::finalize, pika::wait, pika::resume, and pika::suspend. I have not added pika::init or overloads of pika::start that take a function as their future is uncertain (I would like to remove them, but I'm still unsure). I'm still unsure about the contents of init_params so I haven't documented any of the members.

This adds the API documentation through doxygen and breathe, and manually adding the functions that we want to present in the documentation. I've also added a small snippet showing how to use some functions in the pika/init.hpp header. I think this is a pattern that we can follow for most headers and/or functions/classes to show the typical use cases.

@msimberg msimberg self-assigned this Oct 25, 2023
@msimberg msimberg force-pushed the init-etc-refactor branch 3 times, most recently from cb378b7 to 97d7f3e Compare October 25, 2023 14:36
@msimberg msimberg modified the milestones: 0.20.0, 0.21.0 Oct 27, 2023
@msimberg msimberg marked this pull request as ready for review October 30, 2023 08:20
@msimberg
Copy link
Contributor Author

Open for reviews, but not ready to be merged yet. This will be a breaking change for DLA-Future but we can prepare for it in DLA-Future. In particular, #825 (comment) still needs to be dealt with.

@msimberg msimberg force-pushed the init-etc-refactor branch 5 times, most recently from 6c6196e to 7f42030 Compare November 1, 2023 15:31
@msimberg
Copy link
Contributor Author

msimberg commented Nov 1, 2023

cscs-ci run

Copy link
Contributor

@aurianer aurianer left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

libs/pika/init_runtime/src/init_runtime.cpp Show resolved Hide resolved
@msimberg
Copy link
Contributor Author

msimberg commented Nov 8, 2023

cscs-ci run

@msimberg msimberg enabled auto-merge November 8, 2023 14:07
@msimberg msimberg added this pull request to the merge queue Nov 8, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 8, 2023
@msimberg msimberg added this pull request to the merge queue Nov 8, 2023
Merged via the queue into pika-org:main with commit d6d9a3e Nov 8, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Archive
Development

Successfully merging this pull request may close these issues.

Remove int return value from certain runtime functions
2 participants