-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Convert C code to use only int64_t internally #64
Comments
Hmm, what about providing both 32-bit and 64-bit ufuncs? |
Just to clarify, the issue is that internally for calculations related to indices, 32-bit ints are usually not enough - and the C code currently uses 32-bit ints in places. I think I've switched all the ones that matter to 64-bit, but this issue was just suggesting we could just convert all of them. This is not necessarily related to the int type of the indices passed to the cython functions/ufuncs. |
But I don't think that you can represent Numpy arrays that require 64-bit indices on a 32-bit machine, can you? |
@lpsinger - that's true - but just to be clear you can still request for example a 64-bit HEALPix index from e.g. |
Just to be clear the original issue here was more about the underlying C library which is not super consistent in when it uses 32- vs 64-bit integers, including on a 64-bit platform (that part of the code knows nothing about Numpy arrays). I think you are talking about the cython or ufunc layer? |
At the moment there is a lot of typecasting going on in the C code between int and int64_t. As suggested by @cdeil it would be a lot simpler if we just used int64_t throughout, although there may be a few remaining cases where this is really not needed.
The text was updated successfully, but these errors were encountered: