On Fri, Oct 30, 2009 at 5:37 PM, Sean McBride wrote:
> I guess 'platform-independent format' is code for big endian.
Maybe? Maybe not. It's a platform-independent format:
struct CFSwappedFloat32 {
uint32_t v;
};
That doesn't imply anything about the data actually contained therein.
--Kyle
On 10/30/09 5:20 PM, Kyle Sluder said:
>On Fri, Oct 30, 2009 at 10:31 AM, Sean McBride
>wrote:
>> Ah yes, I forgot about those... But I've found them not useful in
>> practice. I don't get why for ints they have host<->big, host<->little,
>> etc. for the floats they don't. Instead they have tho
On Fri, Oct 30, 2009 at 10:31 AM, Sean McBride wrote:
> Ah yes, I forgot about those... But I've found them not useful in
> practice. I don't get why for ints they have host<->big, host<->little,
> etc. for the floats they don't. Instead they have those weird host<-
>>swapped. And though they t
On 10/30/09 7:52 PM, Adam R. Maxwell said:
>>> I don't get why for ints they have host<->big, host<->little,
>>> etc. for the floats they don't. Instead they have those weird host<-
>>> swapped. And though they take floats, they return structs.
>>
>> I think this is to avoid storing swapped
On Oct 30, 2009, at 1:46 PM, Jens Alfke wrote:
> On Oct 30, 2009, at 10:31 AM, Sean McBride wrote:
>
>> I don't get why for ints they have host<->big, host<->little,
>> etc. for the floats they don't. Instead they have those weird host<-
>>>
>> swapped. And though they take floats, they return
Converter.part[1] = Converter.part[2];
Converter.part[2] = swap_char;
return Converter.float_value;
#endif
}
> Da: Sean McBride
> Organizzazione: Rogue Research Inc.
> Data: Fri, 30 Oct 2009 13:51:18 -0400
> A: "gMail.com" ,
> Cc: Jens Alfke
> Ogge
On 10/30/09 6:29 PM, gMail.com said:
>Cool. Thanks. I did the following, either when I read from the disk and when
>I write to the disk
>
>Read unsigned int in case of PPC
> outValue[i] = EndianU32_NtoB(inValue[i]);
>
>Write unsigned int in case of PPC
>outV
On Oct 30, 2009, at 10:31 AM, Sean McBride wrote:
I don't get why for ints they have host<->big, host<->little,
etc. for the floats they don't. Instead they have those weird host<-
swapped. And though they take floats, they return structs.
I think this is to avoid storing swapped floats i
On 10/30/09 9:48 AM, Kyle Sluder said:
>> For floats Apple provides no API, but you can use a union like this:
>
>See CFSwappedFloat64: http://developer.apple.com/mac/library/
>DOCUMENTATION/CoreFoundation/Conceptual/CFMemoryMgmt/Tasks/
>ByteSwapping.html#//apple_ref/doc/uid/20001155-CJBEHAAG
Ah
Cool. Thanks. I did the following, either when I read from the disk and when
I write to the disk
Read unsigned int in case of PPC
outValue[i] = EndianU32_NtoB(inValue[i]);
Write unsigned int in case of PPC
outValue[i] = EndianU32_BtoN(inValue[i]);
Read float in case of PPC
On Oct 30, 2009, at 9:35 AM, "Sean McBride"
wrote:
For floats Apple provides no API, but you can use a union like this:
See CFSwappedFloat64:
http://developer.apple.com/mac/library/DOCUMENTATION/CoreFoundation/Conceptual/CFMemoryMgmt/Tasks/ByteSwapping.html#//apple_ref/doc/uid/20001155-CJB
On 10/30/09 4:56 PM, gMail.com said:
>In the past I have successfully used EndianU32_NtoB to read a "long" on a
>PPC machine. Now I need to read and write an array of "unsigned int" and an
>array of "float". May you please tell me how to do?
For floats A
On Oct 30, 2009, at 8:56 AM, gMail.com wrote:
In the past I have successfully used EndianU32_NtoB to read a "long"
on a
PPC machine. Now I need to read and write an array of "unsigned int"
and an
array of "float". May you please tell me how to do?
Just writ
In the past I have successfully used EndianU32_NtoB to read a "long" on a
PPC machine. Now I need to read and write an array of "unsigned int" and an
array of "float". May you please tell me how to do?
Thanks
--
LL
___
14 matches
Mail list logo