Differences From Artifact [d289104dc5]:
- File src/OFFloatMatrix.m — part of check-in [927dbf6e7d] at 2011-08-07 16:57:49 on branch trunk — Add -[makeImmutable] to all mutable classes and use it. (user: js, size: 9955) [annotate] [blame] [check-ins using]
To Artifact [0e7f420221]:
- File
src/OFFloatMatrix.m
— part of check-in
[f3db074478]
at
2011-09-17 19:18:09
on branch trunk
— Make hashes independant of endianess in OF{Float,Double}{Vector,Matrix}.
Also removes unnecessary OF_HASH_ADD_INT* macros (except
OF_HASH_ADD_INT32 which was often used to hash hashes and is now called
OF_HASH_ADD_HASH). (user: js, size: 10040) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
221 222 223 224 225 226 227 | uint32_t hash; OF_HASH_INIT(hash); for (i = 0; i < rows * columns; i++) { union { float f; | | > | > | | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | uint32_t hash; OF_HASH_INIT(hash); for (i = 0; i < rows * columns; i++) { union { float f; uint8_t b[sizeof(float)]; } u; uint8_t j; u.f = of_bswap_float_if_be(data[i]); for (j = 0; j < sizeof(float); j++) OF_HASH_ADD(hash, u.b[j]); } OF_HASH_FINALIZE(hash); return hash; } |
︙ | ︙ |