Open rbooth200 opened 7 years ago
iorig is an int. Is there any machine where an int is 64 bit?
On Tue, Jun 13, 2017 at 2:01 PM, Richard Booth notifications@github.com wrote:
Currently the code to read iorig in python assumes we are using a 32bit float, but this can now be double precision depending on the compilation options. I think this needs to be fixed at both ends.
In c++ we probably need to cast to an int of the right size before reinterpretting it as a float, and in python we need to detect the itemsize of the float and use that to generate the int. Otherwise we could implement an actual int type data transfer...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/153, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdSguFIe-i6twLwc-WTEjyO1E-6OSJOks5sDnoKgaJpZM4N4Yzp .
Sure, but we copy reinterpret it as either a 32 or 64 bit floating point number...
On Tue, 13 Jun 2017, 14:53 giovanni-rosotti, notifications@github.com wrote:
iorig is an int. Is there any machine where an int is 64 bit?
On Tue, Jun 13, 2017 at 2:01 PM, Richard Booth notifications@github.com wrote:
Currently the code to read iorig in python assumes we are using a 32bit float, but this can now be double precision depending on the compilation options. I think this needs to be fixed at both ends.
In c++ we probably need to cast to an int of the right size before reinterpretting it as a float, and in python we need to detect the itemsize of the float and use that to generate the int. Otherwise we could implement an actual int type data transfer...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/153, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABdSguFIe-i6twLwc-WTEjyO1E-6OSJOks5sDnoKgaJpZM4N4Yzp
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/153#issuecomment-308106016, or mute the thread https://github.com/notifications/unsubscribe-auth/AOqItKjIkFkHcxMAF542xpYdR-2C-Ztjks5sDoZlgaJpZM4N4Yzp .
ah ah, it didn't occur to me. yes it means that when using double precision outputs we get back double the number of iorigs, half which are the correct ones and half which are zero...
On Tue, Jun 13, 2017 at 3:06 PM, Richard Booth notifications@github.com wrote:
Sure, but we copy reinterpret it as either a 32 or 64 bit floating point number...
On Tue, 13 Jun 2017, 14:53 giovanni-rosotti, notifications@github.com wrote:
iorig is an int. Is there any machine where an int is 64 bit?
On Tue, Jun 13, 2017 at 2:01 PM, Richard Booth <notifications@github.com
wrote:
Currently the code to read iorig in python assumes we are using a 32bit float, but this can now be double precision depending on the compilation options. I think this needs to be fixed at both ends.
In c++ we probably need to cast to an int of the right size before reinterpretting it as a float, and in python we need to detect the itemsize of the float and use that to generate the int. Otherwise we could implement an actual int type data transfer...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/153, or mute the thread < https://github.com/notifications/unsubscribe-auth/ABdSguFIe-i6twLwc- WTEjyO1E-6OSJOks5sDnoKgaJpZM4N4Yzp
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/ 153#issuecomment-308106016, or mute the thread https://github.com/notifications/unsubscribe-auth/ AOqItKjIkFkHcxMAF542xpYdR-2C-Ztjks5sDoZlgaJpZM4N4Yzp .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gandalfcode/gandalf/issues/153#issuecomment-308109378, or mute the thread https://github.com/notifications/unsubscribe-auth/ABdSgvE7tl-bcWaav7g6z28PhVXe15HZks5sDoldgaJpZM4N4Yzp .
Currently the code to read iorig in python assumes we are using a 32bit float, but this can now be double precision depending on the compilation options. I think this needs to be fixed at both ends.
In c++ we probably need to cast to an int of the right size before reinterpretting it as a float, and in python we need to detect the itemsize of the float and use that to generate the int. Otherwise we could implement an actual int type data transfer...