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

Implement prif_co_{min,max,sum} for all interoperable ints and reals #159

Open
bonachea opened this issue Dec 23, 2024 · 0 comments
Open

Comments

@bonachea
Copy link
Member

PRIF 0.5 says prif_co_{min,max} argument:

shall be of type integer with an interoperable kind or of type real with an interoperable kind

and prif_co_sum argument:

shall have any numeric type with an interoperable kind

However based on source inspection of caffeine.c:

  • caf_co_{min,max} only supports: int32, int64, float, double
  • caf_co_sum only supports: int32, int64, float, double, float complex, double complex

We should add branches to invoke prif_co_reduce for the remaining cases:

  • caf_co_{min,max} missing: int8, int16, long double
  • caf_co_sum missing: int8, int16, long double, long double complex

We should also add logic to ensure that aliased kind parameters like CFI_type_size_t, CFI_type_long_long, CFI_type_int_least64_t, CFI_type_short, CFI_type_signed_char etc all resolve to the appropriate logic for the four fixed-width integer basic types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant