[Gridflow-dev] Re: AMD64 (K8) support

Alexandre Castonguay acastonguay at artengine.ca
Fri Mar 4 23:18:58 EST 2005


Hiya,

Here is the output of the modified program.

alx at linux:~> g++ -xc++ sizeof.cpp -osizeof && ./sizeof
void *:8; ptrdiff_t:8; off_t:8; size_t:8;
char:1; short:2; int:4; long:8; long long:8;
float:4; double:8;

Cheers,

a

On Friday 04 March 2005 19:36, Mathieu Bouchard wrote:
> On Fri, 4 Mar 2005, Mathieu Bouchard wrote:
> > Anyone tried to compile GridFlow on AMD64 (K8) ?
> > Because it doesn't work, so I wanted to know whether anyone had a fix for
> > that.
>
> I have written this small (9 lines) program so that we can figure out the
> sizes of basic C++ types easily. (alx, this is a slightly updated version
> of the one i sent you before)
>
> ------------------8<--------cut-here--------8<------------------
> #include <stdio.h>
> #include <stdlib.h>
> #include <cstddef>
> #define T(a) printf("%s:%d; ",#a,sizeof(a));
> int main () {
> T(void *)T(ptrdiff_t)T(off_t)T(size_t)puts("");
> T(char)T(short)T(int)T(long)T(long long)puts("");
> T(float)T(double)puts("");
> return 0;}
> ------------------8<--------cut-here--------8<------------------
>
> put it in a text/plain file called sizeof.cpp and run this command:
>
>   g++ -xc++ sizeof.cpp -osizeof && ./sizeof
>
> it should report exactly this on K6,K7,P3,P4,etc:
>
>   void *:4 ptrdiff_t:4 off_t:4 size_t:4
>   char:1 short:2 int:4 long:4 long long:8
>   float:4 double:8
>
> and apparently on K8 it's a bit different:
>
>   void *:8 ptrdiff_t:8(?) off_t:8(?) size_t:8(?)
>   char:1 short:2 int:4 long:8 long long:8
>   float:4 double:8
>
> I added "(?)" to the three ones I have had to guess because the test i did
> with alx this afternoon were missing those three ones.
>
> If anyone gets results different from mine, or has tried it on a different
> type of CPU (e.g.: G3,G4,G5,ARM,XScale,MIPS,SPARC,...) please reply to
> this message with the output of the program.
>
> _____________________________________________________________________
> Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
>
> _______________________________________________
> Gridflow-dev mailing list
> Gridflow-dev at ns.artengine.ca
> http://ns.artengine.ca/mailman/listinfo/gridflow-dev


More information about the Gridflow-dev mailing list