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

Use gp2c descriptions instead of prototypes #54

Open
jdemeyer opened this issue Jan 15, 2018 · 1 comment
Open

Use gp2c descriptions instead of prototypes #54

jdemeyer opened this issue Jan 15, 2018 · 1 comment

Comments

@jdemeyer
Copy link
Collaborator

Currently, the Cython code for wrappers of PARI functions is generated only using the "prototype". However, certain functions also have gp2c descriptions, which contains more fine-grained code. For example:

Function: Mod
Class: basic
Section: conversions
C-Name: gmodulo
Prototype: GG
Help: Mod(a,b): creates 'a modulo b'.
Description:
 (small, small):gen         gmodulss($1, $2)
 (small, gen):gen           gmodulsg($1, $2)
 (gen, gen):gen             gmodulo($1, $2)

The contains optimizations for Mod(x, y) if x or y are C longs instead of PARI objects.

It might not be worth using this, but at least we should think about it.

@videlec
Copy link
Collaborator

videlec commented Jan 15, 2018

Might be useful for #52

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

No branches or pull requests

2 participants