search for: taihulight

Displaying 3 results from an estimated 3 matches for "taihulight".

2018 Aug 16
2
longint
...o please receive the value as a int64_t and then cast it to > an int32_t -- which corresponds to R's notion of an integer on every platform. Only on Intel platforms int is 32 bits. Strictly speaking int is only required to be >= 16 bits. Who knows what the size of an int is on the Sunway TaihuLight for example ;-) H. > > And please note that that conversion is lossy. If you must keep 64 bits then > the bit64 package by Jens Oehlschlaegel is good and eg fully supported inside > data.table. We use it for 64-bit integers as nanosecond timestamps in our > nanotime package (whic...
2018 Aug 16
0
longint
...then >> cast it to >> an int32_t -- which corresponds to R's notion of an integer on every >> platform. > > Only on Intel platforms int is 32 bits. Strictly speaking int is only > required to be >= 16 bits. Who knows what the size of an int is on > the Sunway TaihuLight for example ;-) R's configure checks that int is 32 bit and will not compile without it (src/main/arithmetic.c) ... so int and int32_t are the same on all platforms where the latter is defined. -- Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Stat...
2018 Aug 16
3
longint
Thanks for the replies and for confirming my suspicion. Interestingly, src/include/S.h uses a trick: ?? #define longint int and so does the nlme package (within src/init.c). On 08/15/2018 02:47 PM, Herv? Pag?s wrote: > No segfault but a BIG warning from the compiler. That's because > dereferencing the pointer inside your myfunc() function will > produce an int that is not