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
Allow multiple instances of the PariInstance object #21806
Comments
Dependencies: #21820 |
Commit: |
New commits:
|
Author: Luca De Feo |
Changed keywords from none to atelierpari2017 |
comment:5
I don't understand clearly why we should allow multiple pari instances. Could it be precised in the ticket description? (we discussed it yesterday but I don't quite remember) |
comment:6
minor remark: there are trailing whitespaces! |
Reviewer: Vincent Delecroix |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Note that an alternate, reasonable, design would initialize the PARI library at module load, rather than in With the current design, we have the (dubious) advantage of being able to call |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:11
pari is initialized at module load since a global |
Changed author from Luca De Feo to Luca De Feo, Jeroen Demeyer |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
New version, needs review... |
comment:18
All doctests pass, and I like Jeroens modifications. New commits:
|
Changed reviewer from Vincent Delecroix to Vincent Delecroix, Luca De Feo |
comment:19
What should I expect from
|
comment:20
Replying to @videlec:
A segmentation fault I guess. |
comment:22
There is already the comment
|
comment:23
Replying to @jdemeyer:
This comment is not clear enough. The sentence says that the memory is freed. Not that you will obtain a |
New commits:
|
Changed branch from u/jdemeyer/allow_multiple_instances_of_the_pariinstance_object to |
Since the
PariInstance
object is really just a callable namespace without state, it should be possible to create multiple instances of it.The rationale for this is that when multiple python modules depend upon CyPari, each one must instantiate its own
PariInstance
object, or possibly an object inheriting from it.Since
PariInstance
initializes the PARI library upon__init__
, we must be careful to do this initialization only once.When
PariInstance.__init__()
is called a second time with asize
argument which is larger than the current size, we should increase (but never decrease) the PARI stack size but otherwise do nothing.Depends on #21820
CC: @defeo
Component: interfaces
Keywords: atelierpari2017
Author: Luca De Feo, Jeroen Demeyer
Branch/Commit:
b70450d
Reviewer: Vincent Delecroix, Luca De Feo
Issue created by migration from https://trac.sagemath.org/ticket/21806
The text was updated successfully, but these errors were encountered: