Artifact d7e6269b1527678672f88a478c177dfa66096c027ca767ceec22c789fea54623:
- File src/tools.mm — part of check-in [0097baa3a7] at 2025-03-08 01:09:36 on branch trunk — Remove memory pool (user: js, size: 425) [annotate] [blame] [check-ins using]
// implementation of generic tools #include "tools.h" #include <new> ///////////////////////// misc tools /////////////////////// void endianswap( void *memory, int stride, int length) // little indians as storage format { if (*((char *)&stride)) return; loop(w, length) loop(i, stride / 2) { uchar *p = (uchar *)memory + w * stride; uchar t = p[i]; p[i] = p[stride - i - 1]; p[stride - i - 1] = t; }; }