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

Montecarlo/memoryview #397

Merged
merged 5 commits into from
Aug 25, 2015
Merged

Conversation

wkerzendorf
Copy link
Member

This was prompted by trying to avoid costly copies of large arrays, but has evolved into throwing away quite a bit of code that is not necessary anymore.

storage.r_outer = <double*> r_outer.data
cdef np.ndarray[double, ndim=1] v_inner = structure.v_inner.to('cm/s').value
storage.v_inner = <double*> v_inner.data
storage.r_inner = <double*> PyArray_DATA(structure.r_inner.to('cm').value)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orbitfold this is the main thing I'm doing - a much easier way to access the arrays.

@wkerzendorf
Copy link
Member Author

@orbitfold can you check this and merge? @ssim @chvogl @mreinecke this is the slightly updated C-structure. We now use c-contiguous arrays everywhere (instead of Fortran ones) and adding new data to the code should be much simpler now.

orbitfold added a commit that referenced this pull request Aug 25, 2015
@orbitfold orbitfold merged commit 97e9069 into tardis-sn:master Aug 25, 2015
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