On Wed, 2010-05-26 at 11:42 +0000, Tamas K Papp wrote:
Hi,
Is there a way to detect the size of integers (ie 32 or 64 bit) used by a library?
I am using LAPACK/BLAS (ATLAS) libraries via CFFI. Recently, my tests failed, and to my surprise, the solution was to use 32-bit ints. Note that I am on a 64-bit platform, using the Ubuntu libraries, so why this happens is a mystery.
Linux uses the LP64 data model, in which ints are 32bit: http://en.wikipedia.org/wiki/64-bit#Specific_C-language_data_models
But it would be great if I could detect it somehow from within Lisp.
cffi:foreign-type-size will return the size of the builtin types