-
Notifications
You must be signed in to change notification settings - Fork 663
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
Cythonized Timestep [Core] #3683
Conversation
With respect to this should I remove the |
I am removing the |
@tylerjereddy would I please be able to get a review from you specifically on my use of the NumPy C API? There are quite a few calls to the C API, but I am not aware if there are any NumPy conventions I might be ignoring and would like to be as conformant as possible. Particularly, initialising the Is there a better way to have a C level array hook without allocating to their full size (natoms, 3)? |
Discussion of dtypes can take place on #3707 |
Cythonized Timestep
First large changes of CZIEOSS4 performance track. Primarily cythonization of the Timestep class and separation from the iterators. Would be good to get some input at this point to see what people think.
Fixes #3709
Status:
MemoryReader
andNetCDF
readersDesign Ideas:
__cinit__
time, making it very ugly for limited performance gain.Aims of this PR:
10x2x faster to set positionswithout a copywith a copy if no casting required)Changes made in this Pull Request:
pxd
file to define relevant importsdtype
kwarg added_frame
is no longer optional as must be initialised (to -1)_frame
is no longer an attribute and has been moved todata
dictionary inTRZReader
typenum
,*_dims
attributes added to store enumerated NumPy dtype and associated array dimensionality__getstate__
and__setstate__
implemented manually as cdef classes do not have the__dict__
attribute.__getnewargs_ex__
added to help__cinit__
construction upon unpickling.Discussion Points:
np.float32
but this can be changed.np.float32
but elsewhere in the code are promoted and demoted regularly.dimensions_dtype=np.float...
)?Looking forwards:
cython.floating
memoryview and matching templated C function.PR Checklist