source: branches/1.3/packages/optimizer/src/pgapack/gekco/pgapack/util/wordsizes.c @ 5675

Last change on this file since 5675 was 5675, checked in by ldelgass, 9 years ago

merge r5673 from trunk (eol-style)

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1
2#define WL 32
3#define FAKE_MPI
4
5#include <stdio.h>
6#include "../include/pgapack.h"
7
8/*
9 *  Compile with: cc -o wordsizes wordsizes.c
10 *
11 *  Any size WL can be used -- it will not affect the sizes below.
12 *
13 *  FAKE_MPI will also not affect the sizes of the structures below,
14 *  but will simplify the compilation. 
15 *
16 *  If PGAContext * is 8 bytes, then you have a "64-bit" machine.  Be
17 *  sure to use integer*8 for the PGAContext variable, and integer*4
18 *  (usually just integer) for everything else.
19 *
20 */
21void main(void) {
22    printf("Sizes of various datatypes in bytes.\n\n");
23    printf("sizeof(PGAContext *):      %2d\n", sizeof(PGAContext *));
24    printf("sizeof(PGABinary):         %2d\n", sizeof(PGABinary));
25    printf("sizeof(PGAReal):           %2d\n", sizeof(PGAReal));
26    printf("sizeof(PGAInteger):        %2d\n", sizeof(PGAInteger));
27    printf("sizeof(PGACharacter):      %2d\n", sizeof(PGACharacter));
28
29    printf("sizeof(int):               %2d\n", sizeof(int));
30    printf("sizeof(long int):          %2d\n", sizeof(long int));
31
32    printf("sizeof(double):            %2d\n", sizeof(double));
33    printf("sizeof(char):              %2d\n", sizeof(char));
34}
Note: See TracBrowser for help on using the repository browser.