diff --git a/src/engine/engine_io.c b/src/engine/engine_io.c index 6c348b25..f4f8c79d 100644 --- a/src/engine/engine_io.c +++ b/src/engine/engine_io.c @@ -308,6 +308,15 @@ static void bufread(void* dest, int num, int szbuf, const void* buf, int* ptrbuf +// number of bytes to be skipped to achieve 64-byte alignment +static inline unsigned int SKIP(intptr_t offset) { + const unsigned int align = 64; + // compute skipped bytes + return (align - (offset % align)) % align; +} + + + //----------------------------------- mjModel construction ----------------------------------------- // set pointers in mjModel buffer diff --git a/src/engine/engine_macro.h b/src/engine/engine_macro.h index 3ad6dca6..d9086197 100644 --- a/src/engine/engine_macro.h +++ b/src/engine/engine_macro.h @@ -73,11 +73,4 @@ #define PTRDIFF(x, y) ((char*)(x) - (char*)(y)) -// number of bytes to be skipped to achieve 64-byte alignment -static inline unsigned int SKIP(intptr_t offset) { - const unsigned int align = 64; - // compute skipped bytes - return (align - (offset % align)) % align; -} - #endif // MUJOCO_SRC_ENGINE_ENGINE_MACRO_H_