Re: [pure-lang-users] C macros
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-30 23:26:06
|
On Sat 30/08/08 4:37 PM , Albert Graef Dr....@t-... sent: > Eddie Rucker wrote: > > Um... Is there some way from Pure to find out > the byte sizeof ints,> doubles, complex, etc? When the sizes change on > different machines> and/or compilers I'd like the library to > automatically handle this. > FWIW, system.pure now provides the following constants. These probably > aren't of much use for figuring out struct alignment, but at least they > provide the necessary information to malloc pointers to these types in a > portable manner. Also, you can test whether you're on a 64 bit system by > inspecting SIZEOF_POINTER. (BTW, I see no point in adding the long > double types right now, since these aren't supported by Pure in any > way.) Thanks! > Is it true that complex double is just two doubles, similar for complex > float? That would make things much easier, because a complex matrix > could be represented internally as a double matrix with twice the number > of columns. I guess that ISO C99 implementations are free to choose the > internal representation, though. Complex is indeed two doubles. I don't have the docs in front of me but I think it was defined double z[2]; e.r. |