Skip to content

Remove Function.prepare_for_call property - #312

Merged
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:rm-Function-prepare_for_call
Aug 7, 2026
Merged

Remove Function.prepare_for_call property#312
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:rm-Function-prepare_for_call

Conversation

@eerovaher

Copy link
Copy Markdown
Collaborator

This is another PR where re-ordering statements in the generated C code allows erfa_generator to be simplified.

If signature_shape of all the arguments of a ufunc is "()" then the ufunc is a normal ufunc, but if there is an argument with a different signature_shape then the ufunc is a gufunc. So far for the latter erfa_generator has created code for processing all input arguments, then inout arguments and finally output arguments, but now it processes first all the arguments with signature_shape different from "()" and after that all the rest.

If `signature_shape` of all the arguments of a ufunc is `"()"` then the
ufunc is a normal ufunc, but if there is an argument with a different
`signature_shape` then the ufunc is a gufunc. So far for the latter
`erfa_generator` has created code for processing all input arguments,
then inout arguments and finally output arguments, but now it processes
first all the arguments with `signature_shape` different from `"()"` and
after that all the rest. This change in the order of statements in
gufuncs allows `erfa_generator` to be simplified by removing the
`Function.prepare_for_call` abstract property and its implementations in
the `UFunc` and `GUFunc` classes without complicating generated code.
@avalentino
avalentino merged commit 7107ef0 into liberfa:main Aug 7, 2026
27 checks passed
@eerovaher
eerovaher deleted the rm-Function-prepare_for_call branch August 7, 2026 19:25
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