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

Change return types to prima_rc_t #192

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

nbelakovski
Copy link
Contributor

This should help users figure out how and where to look up any error codes they might receive while trying to use PRIMA.

There's a small problem which isn't created by this PR but is "surfaced" by it - many of the C functions we use return 0 on success, which is fairly standard in the C world. However the prima_rc_t value for 0 is PRIMA_SMALL_TR_RADIUS, which is not very intuitive.

I see that infos.f90 defines both SMALL_TR_RADIUS and INFO_DFT as 0, should we define PRIMA_DFT as 0 as well in prima.h?

This should help users figure out how and where to look up any error
codes they might receive while trying to use PRIMA.
@zaikunzhang
Copy link
Member

I see that infos.f90 defines both SMALL_TR_RADIUS and INFO_DFT as 0, should we define PRIMA_DFT as 0 as well in prima.h?

I agree. Should we call it PRIMA_RC_DFT or PRIMA_INFO_DFT?

@nbelakovski
Copy link
Contributor Author

PRIMA_RC_DFT sounds good, I'll make the change.

c/tests/stress.c Outdated Show resolved Hide resolved
nbelakovski and others added 2 commits April 18, 2024 22:38
…/checks?check_run_id=24006379701, which complains that "a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] unsigned int get_random_seed()"
@zaikunzhang zaikunzhang merged commit c13a9cc into libprima:main Apr 19, 2024
41 of 48 checks passed
@nbelakovski nbelakovski deleted the return_code_types branch April 20, 2024 23:30
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.

2 participants