matrix.h: Fix compiling on certain 32-bit systems. (Regression from commit fc3570a. Fixes issue #40.)

This commit is contained in:
rogerman 2017-02-14 14:52:42 -08:00
parent 6cd42cbfe4
commit 60ae4c8de3
1 changed files with 4 additions and 4 deletions

View File

@ -168,7 +168,7 @@ static void memset_u16(void *dst, const u16 val, const size_t elementCount)
for (size_t i = 0; i < length_u64; i++) for (size_t i = 0; i < length_u64; i++)
dst_u64[i] = val_u64; dst_u64[i] = val_u64;
#else #else
for (size_t i = 0; i < length; i++) for (size_t i = 0; i < elementCount; i++)
((u16 *)dst)[i] = val; ((u16 *)dst)[i] = val;
#endif #endif
} }
@ -181,7 +181,7 @@ static void memset_u16_fast(void *dst, const u16 val)
const u64 val_u64 = ((u64)val << 48) | ((u64)val << 32) | ((u64)val << 16) | (u64)val; const u64 val_u64 = ((u64)val << 48) | ((u64)val << 32) | ((u64)val << 16) | (u64)val;
MACRODO_N(ELEMENTCOUNT / (sizeof(val_u64) / sizeof(val)), (dst_u64[(X)] = val_u64)); MACRODO_N(ELEMENTCOUNT / (sizeof(val_u64) / sizeof(val)), (dst_u64[(X)] = val_u64));
#else #else
for (size_t i = 0; i < LENGTH; i++) for (size_t i = 0; i < ELEMENTCOUNT; i++)
((u16 *)dst)[i] = val; ((u16 *)dst)[i] = val;
#endif #endif
} }
@ -196,7 +196,7 @@ static void memset_u32(void *dst, const u32 val, const size_t elementCount)
for (size_t i = 0; i < length_u64; i++) for (size_t i = 0; i < length_u64; i++)
dst_u64[i] = val_u64; dst_u64[i] = val_u64;
#else #else
for (size_t i = 0; i < length; i++) for (size_t i = 0; i < elementCount; i++)
((u32 *)dst)[i] = val; ((u32 *)dst)[i] = val;
#endif #endif
} }
@ -209,7 +209,7 @@ static void memset_u32_fast(void *dst, const u32 val)
const u64 val_u64 = ((u64)val << 32) | (u64)val; const u64 val_u64 = ((u64)val << 32) | (u64)val;
MACRODO_N(ELEMENTCOUNT / (sizeof(val_u64) / sizeof(val)), (dst_u64[(X)] = val_u64)); MACRODO_N(ELEMENTCOUNT / (sizeof(val_u64) / sizeof(val)), (dst_u64[(X)] = val_u64));
#else #else
for (size_t i = 0; i < LENGTH; i++) for (size_t i = 0; i < ELEMENTCOUNT; i++)
((u16 *)dst)[i] = val; ((u16 *)dst)[i] = val;
#endif #endif
} }