XuvTools is developed in a cooperative effort from:
  • Chair of Pattern Recognition and Image Processing [www]
  • Friedrich Miescher Institute for Biomedical Research [www]
  • Center for Biological Systems Analysis [www]
 

Sizes of frequently used Data Types

These numbers where generated with the xuvsizeof executable. It resides in xuvtools/src/helper directory of LMBSOFT. To compile and run xuvsizeof, use on Unix

cd $LMBSOFTSRC/xuvtools/project/helper/
qmake -r xuvsizeof.pro
make
$LMBSOFTDEST/release_*/bin/xuvsizeof

If you want to build for a specific architecture on a machine that supports multiple architectures, you can specify it on the command line when invoking qmake like this:

qmake -r CONFIG+="x86"    xuvsizeof.pro
qmake -r CONFIG+="ppc"    xuvsizeof.pro
qmake -r CONFIG+="x86_64" xuvsizeof.pro
qmake -r CONFIG+="ppc64"  xuvsizeof.pro

On Windows, xuvsizeof can be compiled via:

cd %LMBSOFTSRC%\xuvtools\project\helper
qmake -tp vc -spec win32-msvc2008 -r xuvsizeof.pro
# open xuvsizeof.vcproj in Visual Studio, and compile
%LMBSOFTDEST%\release_*\bin\xuvsizeof.exe

Linux 32bit (i386)



Linux 64bit (x86_64)

#if defined(__linux__) && defined(__x86_64__)
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8
#define SIZEOF_PTRDIFF_T 8
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 8
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_UNSIGNED_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
#endif

Mac Intel 32bit (i386) and Mac PowerPC 32bit (ppc)

#if defined(__APPLE__) && defined(__i386__)
#define SIZEOF_CHAR 1
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_DOUBLE 16
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8
#define SIZEOF_PTRDIFF_T 4
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 4
#define SIZEOF_SSIZE_T 4
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_UNSIGNED_LONG_LONG 8
// ---- extended ----
#define SIZEOF_INT16_T 2
#define SIZEOF_INT32_T 4
#define SIZEOF_INT64_T 8
#define SIZEOF_INT8_T 1
#define SIZEOF_INT_FAST16_T 2
#define SIZEOF_INT_FAST32_T 4
#define SIZEOF_INT_FAST64_T 8
#define SIZEOF_INT_FAST8_T 1
#define SIZEOF_INT_LEAST16_T 2
#define SIZEOF_INT_LEAST32_T 4
#define SIZEOF_INT_LEAST64_T 8
#define SIZEOF_INT_LEAST8_T 1
#define SIZEOF_UINT16_T 2
#define SIZEOF_UINT32_T 4
#define SIZEOF_UINT64_T 8
#define SIZEOF_UINT8_T 1
#define SIZEOF_UINT_FAST16_T 2
#define SIZEOF_UINT_FAST32_T 4
#define SIZEOF_UINT_FAST64_T 8
#define SIZEOF_UINT_FAST8_T 1
#define SIZEOF_UINT_LEAST16_T 2
#define SIZEOF_UINT_LEAST32_T 4
#define SIZEOF_UINT_LEAST64_T 8
#define SIZEOF_UINT_LEAST8_T 1
#endif

Mac Intel 64bit (x86_64) and Mac PowerPC 64bit (ppc64)

#if defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
#define SIZEOF_CHAR 1
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define SIZEOF_LONG_DOUBLE 16
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 8
#define SIZEOF_PTRDIFF_T 8
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 8
#define SIZEOF_SSIZE_T 8
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_UNSIGNED_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
// ---- extended ----
#define SIZEOF_INT16_T 2
#define SIZEOF_INT32_T 4
#define SIZEOF_INT64_T 8
#define SIZEOF_INT8_T 1
#define SIZEOF_INT_FAST16_T 2
#define SIZEOF_INT_FAST32_T 4
#define SIZEOF_INT_FAST64_T 8
#define SIZEOF_INT_FAST8_T 1
#define SIZEOF_INT_LEAST16_T 2
#define SIZEOF_INT_LEAST32_T 4
#define SIZEOF_INT_LEAST64_T 8
#define SIZEOF_INT_LEAST8_T 1
#define SIZEOF_UINT16_T 2
#define SIZEOF_UINT32_T 4
#define SIZEOF_UINT64_T 8
#define SIZEOF_UINT8_T 1
#define SIZEOF_UINT_FAST16_T 2
#define SIZEOF_UINT_FAST32_T 4
#define SIZEOF_UINT_FAST64_T 8
#define SIZEOF_UINT_FAST8_T 1
#define SIZEOF_UINT_LEAST16_T 2
#define SIZEOF_UINT_LEAST32_T 4
#define SIZEOF_UINT_LEAST64_T 8
#define SIZEOF_UINT_LEAST8_T 1
#endif

Windows 32bit (Win32)

#if defined(_WIN32)
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 4
#define SIZEOF_PTRDIFF_T 4
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 4
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_UNSIGNED_LONG_LONG 8
#endif

Windows 64bit (x64)

#if defined(_WIN64)
#define SIZEOF_DOUBLE 8
#define SIZEOF_FLOAT 4
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_OFF_T 4
#define SIZEOF_PTRDIFF_T 8
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 8
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_UNSIGNED_LONG_LONG 8
#endif
devel/sizeof.txt ยท Last modified: 2009/04/10 17:08 by mario
Contact: admin(a)xuvtools.org