[+] Early attempt at AuBitScanForward

[*] Force inline on all utilities.
This commit is contained in:
Reece Wilson 2022-01-19 14:23:21 +00:00
parent f1040a67b0
commit 57b3e73668

View File

@ -12,7 +12,7 @@
#endif
template<typename T, typename... Args>
static inline AuSPtr<T> AuMakeShared(Args&&... args)
static auline AuSPtr<T> AuMakeShared(Args&&... args)
{
try
{
@ -29,13 +29,13 @@ static inline AuSPtr<T> AuMakeShared(Args&&... args)
#endif
template<typename... Args>
static inline auto AuMakePair(Args&&... args)
static auline auto AuMakePair(Args&&... args)
{
return AURORA_RUNTIME_MAKE_PAIR(std::forward<Args>(args)...);
}
#if defined(AURORA_IS_MODERNNT_DERIVED) && (defined(_WINDOWS_) || defined(_OTHER_MS_MAIN_HEADER_GUARDS_HERE))
static inline void AuWin32CloseHandle(HANDLE &handle)
static auline void AuWin32CloseHandle(HANDLE &handle)
{
HANDLE local;
@ -67,10 +67,10 @@ static constexpr int AuArraySize(const T(&array)[Z])
#if defined(DEBUG) || defined(STAGING)
template<typename ... T>
static inline void __declspec(noreturn) SysPanic(T... args);
static auline void __declspec(noreturn) SysPanic(T... args);
template<typename Z, typename T>
static void inline SafeDelete(T *in)
static void auline SafeDelete(T *in)
{
static_assert(std::is_base_of<T, typename std::remove_pointer<Z>::type>::value, "Couldn't not safe delete from type T because it is not derived from Z");
auto cast = dynamic_cast<Z>(in);
@ -85,7 +85,7 @@ static void inline SafeDelete(T *in)
#else
template<typename Z, typename T>
static void inline SafeDelete(T *in)
static void auline SafeDelete(T *in)
{
static_assert(std::is_base_of<T, typename std::remove_pointer<Z>::type>::value, "Couldn't not safe delete from type T because it is not derived from Z");
delete static_cast<Z>(in);
@ -106,7 +106,7 @@ struct AuNullCallback
AU_DEFINE_CTOR_ONE(AuNullCallback, (AuVoidFunc, voidFunc));
AU_DEFINE_CTOR_ONE(AuNullCallback, (AuSPtr<IAuNullDelegate>, callbackFunc));
inline void operator()()
auline void operator()()
{
if (voidFunc)
{
@ -119,7 +119,7 @@ struct AuNullCallback
}
};
static constexpr inline AuUInt32 AuConvertMagicTag32(const char buffer[4])
static constexpr auline AuUInt32 AuConvertMagicTag32(const char buffer[4])
{
AuUInt32 magic {};
if (Aurora::Build::kCurrentEndian == Aurora::Build::ECPUEndian::eCPULittle)
@ -154,7 +154,7 @@ static constexpr inline AuUInt32 AuConvertMagicTag32(const char buffer[4])
return magic;
}
static constexpr inline AuUInt64 AuConvertMagicTag64(const char buffer[8])
static constexpr auline AuUInt64 AuConvertMagicTag64(const char buffer[8])
{
AuUInt64 magic {};
if (Aurora::Build::kCurrentEndian == Aurora::Build::ECPUEndian::eCPULittle)
@ -183,32 +183,32 @@ static constexpr inline AuUInt64 AuConvertMagicTag64(const char buffer[8])
}
template<typename T, typename Z>
static inline AuOptional<AuSPtr<T>> AuOptionalSharedDynamicCast(AuOptional<AuSPtr<Z>> &in)
static auline AuOptional<AuSPtr<T>> AuOptionalSharedDynamicCast(AuOptional<AuSPtr<Z>> &in)
{
if (!in.has_value()) return {};
return std::dynamic_pointer_cast<T>(in.value());
}
template<typename T, typename Z>
static inline AuOptional<AuSPtr<T>> AuOptionalSharedStaticCast(AuOptional<AuSPtr<Z>> &in)
static auline AuOptional<AuSPtr<T>> AuOptionalSharedStaticCast(AuOptional<AuSPtr<Z>> &in)
{
if (!in.has_value()) return {};
return std::static_pointer_cast<T>(in.value());
}
static inline bool AuEndsWith(AuString const &value, AuString const &ending)
static auline bool AuEndsWith(AuString const &value, AuString const &ending)
{
if (ending.size() > value.size()) return false;
return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
}
static inline bool AuStartsWith(AuString const &value, AuString const &starting)
static auline bool AuStartsWith(AuString const &value, AuString const &starting)
{
return value.rfind(starting, 0) == 0;
}
template<typename T>
static inline AuString AuToStringASCIIOp(T op, const AuString &in)
static auline AuString AuToStringASCIIOp(T op, const AuString &in)
{
AuString ret;
ret.resize(in.size());
@ -219,18 +219,18 @@ static inline AuString AuToStringASCIIOp(T op, const AuString &in)
return ret;
}
static inline AuString AuToLower(const AuString &in)
static auline AuString AuToLower(const AuString &in)
{
return AuToStringASCIIOp<int(*)(int)>(std::tolower, in);
}
static inline AuString AuToUpper(const AuString &in)
static auline AuString AuToUpper(const AuString &in)
{
return AuToStringASCIIOp<int(*)(int)>(std::toupper, in);
}
template<typename Map, class Key, typename Value>
static inline bool AuTryFind(Map &map, const Key &key, Value *&ptr)
static auline bool AuTryFind(Map &map, const Key &key, Value *&ptr)
{
auto itr = map.find(key);
if (itr != map.end())
@ -246,7 +246,7 @@ static inline bool AuTryFind(Map &map, const Key &key, Value *&ptr)
}
template<typename Map, class Key, typename Value>
static inline bool AuTryFind(Map *map, const Key &key, Value *&ptr)
static auline bool AuTryFind(Map *map, const Key &key, Value *&ptr)
{
auto itr = map->find(key);
if (itr != map->end())
@ -262,7 +262,7 @@ static inline bool AuTryFind(Map *map, const Key &key, Value *&ptr)
}
template<typename Map, class Key>
static inline bool AuTryFind(Map &map, const Key &key)
static auline bool AuTryFind(Map &map, const Key &key)
{
auto itr = map.find(key);
if (itr != map.end())
@ -276,13 +276,13 @@ static inline bool AuTryFind(Map &map, const Key &key)
}
template<typename Range, class Key>
static inline bool AuExists(Range &a, const Key &item)
static auline bool AuExists(Range &a, const Key &item)
{
return std::find(a.begin(), a.end(), item) != a.end();
}
template<typename Map, class Key>
static inline bool AuTryFind(Map *map, const Key &key)
static auline bool AuTryFind(Map *map, const Key &key)
{
auto itr = map->find(key);
if (itr != map->end())
@ -296,7 +296,7 @@ static inline bool AuTryFind(Map *map, const Key &key)
}
template<typename Map, class Key, typename Value>
static inline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr)
static auline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr)
{
auto itr = map.find(key);
if (itr != map.end())
@ -312,7 +312,7 @@ static inline bool AuTryFindGeneric(Map &map, const Key &key, Value *&ptr)
}
template<typename Map, class Key>
static inline bool AuTryDelete(Map &map, const Key &key)
static auline bool AuTryDelete(Map &map, const Key &key)
{
auto itr = map.find(key);
if (itr != map.end())
@ -327,7 +327,7 @@ static inline bool AuTryDelete(Map &map, const Key &key)
}
template<typename List, class Key>
static inline bool AuTryDeleteList(List &list, const Key &key)
static auline bool AuTryDeleteList(List &list, const Key &key)
{
auto itr = std::find(list.begin(), list.end(), key);
if (itr != list.end())
@ -342,7 +342,7 @@ static inline bool AuTryDeleteList(List &list, const Key &key)
}
template<typename Container, typename Type>
static inline bool AuTryInsert(Container &container, const Type &value)
static auline bool AuTryInsert(Container &container, const Type &value)
{
try
{
@ -356,7 +356,7 @@ static inline bool AuTryInsert(Container &container, const Type &value)
}
}
template<typename Container, typename Type>
static inline bool AuTryInsert(Container &container, Type &&value)
static auline bool AuTryInsert(Container &container, Type &&value)
{
try
{
@ -371,7 +371,7 @@ static inline bool AuTryInsert(Container &container, Type &&value)
}
template<typename Container, typename Type>
static inline bool AuTryInsert(Container *container, const Type &value)
static auline bool AuTryInsert(Container *container, const Type &value)
{
try
{
@ -386,7 +386,7 @@ static inline bool AuTryInsert(Container *container, const Type &value)
}
template<typename Container, typename Type>
static inline bool AuTryInsert(Container *container, Type &&value)
static auline bool AuTryInsert(Container *container, Type &&value)
{
try
{
@ -401,7 +401,7 @@ static inline bool AuTryInsert(Container *container, Type &&value)
}
template<typename Container, typename Type>
static inline bool AuTryInsertNoEnd(Container &container, Type &&value) // move
static auline bool AuTryInsertNoEnd(Container &container, Type &&value) // move
{
try
{
@ -416,7 +416,7 @@ static inline bool AuTryInsertNoEnd(Container &container, Type &&value) // move
}
template<typename Container, typename Type>
static inline bool AuTryInsertNoEnd(Container &container, const Type &value) // copy
static auline bool AuTryInsertNoEnd(Container &container, const Type &value) // copy
{
try
{
@ -431,7 +431,7 @@ static inline bool AuTryInsertNoEnd(Container &container, const Type &value) //
}
template<typename Container, typename Type>
static inline bool AuTryInsertNoEnd(Container *container, Type &&value) // move
static auline bool AuTryInsertNoEnd(Container *container, Type &&value) // move
{
try
{
@ -446,7 +446,7 @@ static inline bool AuTryInsertNoEnd(Container *container, Type &&value) // move
}
template<typename Container, typename Type>
static inline bool AuTryInsertNoEnd(Container *container, const Type &value) // copy
static auline bool AuTryInsertNoEnd(Container *container, const Type &value) // copy
{
try
{
@ -466,7 +466,7 @@ namespace Aurora::Memory
}
template<typename T>
static inline bool AuTryResize(T &list, AuUInt length)
static auline bool AuTryResize(T &list, AuUInt length)
{
try
{
@ -487,7 +487,7 @@ static inline bool AuTryResize(T &list, AuUInt length)
}
template<typename T>
static inline bool AuTryDownsize(T &list, AuUInt length)
static auline bool AuTryDownsize(T &list, AuUInt length)
{
try
{
@ -508,7 +508,7 @@ static inline bool AuTryDownsize(T &list, AuUInt length)
}
}
static inline AuString AuReplaceAll(AuString &str, const AuString &from, const AuString &to)
static auline AuString AuReplaceAll(AuString &str, const AuString &from, const AuString &to)
{
size_t start_pos = 0;
while ((start_pos = str.find(from, start_pos)) != std::string::npos)
@ -520,7 +520,7 @@ static inline AuString AuReplaceAll(AuString &str, const AuString &from, const A
}
// i told myself not to copy this, required a split function twice, now here we are :D
static inline AuList<AuString> AuSplitString(const AuString& str, const AuString& delim, bool ignoreEmpty = true)
static auline AuList<AuString> AuSplitString(const AuString& str, const AuString& delim, bool ignoreEmpty = true)
{
AuList<AuString> tokens;
AuUInt prev = 0, pos = 0;
@ -563,25 +563,77 @@ auto AuTuplePopFront(const Tuple& tuple)
}
template<typename T>
static inline bool AuTestBit(T value, AuUInt8 idx)
static auline bool AuTestBit(T value, AuUInt8 idx)
{
return value & (T(1) << T(idx));
}
template<typename T>
static inline void AuSetBit(T &value, AuUInt8 idx)
static auline void AuSetBit(T &value, AuUInt8 idx)
{
value |= T(1) << T(idx);
}
template<typename T>
static inline void AuClearBit(T &value, AuUInt8 idx)
static auline void AuClearBit(T &value, AuUInt8 idx)
{
value &= ~(T(1) << T(idx));
}
template<typename T>
static auline bool AuBitScanForward(AuUInt8 &index, T value)
{
unsigned long ret;
bool success;
success = false;
index = 0;
if (value == 0)
{
return false;
}
#if defined(AURORA_COMPILER_MSVC)
if constexpr ( sizeof(T) == sizeof(AuUInt64))
#if defined(AURORA_IS_32BIT)
if (!_BitScanForward(&ret, static_cast<AuUInt32>(value & 0xffffffff)))
{
_BitScanForward(&ret, static_cast<AuUInt32>((value << 32) & 0xffffffff));
ret += 32;
}
#else
success = _BitScanForward64(&ret, static_cast<AuUInt64>(value));
#endif
else success = _BitScanForward(&ret, static_cast<unsigned long>(value));
#elif defined(AURORA_COMPILER_GCC) || defined(AURORA_COMPILER_CLANG)
if constexpr (sizeof(T) == sizeof(AuUInt64))
#if defined(AURORA_IS_32BIT)
auto lower = static_cast<AuUInt32>(value & 0xffffffff));
if (lower == 0)
{
ret = __builtin_ctzl(static_cast<AuUInt32>((value << 32) & 0xffffffff));
ret += 32;
}
else
{
ret = __builtin_ctzl(static_cast<AuUInt32>(lower));
}
#else
ret = __builtin_ctzll(static_cast<AuUInt64>(value));
#endif
else if constexpr (sizeof(T) == sizeof(unsigned long))
ret = __builtin_ctzl(static_cast<unsigned long>(value));
else if constexpr ( sizeof(T) == sizeof(unsigned int))
ret = __builtin_ctz(static_cast<unsigned int>(value));
success = true;
#endif
index = ret;
return success;
}
// TODO: AuPopCnt
// TODO: AuBitScanForward
// TODO: AuBitScanReverse
#if defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86) || defined(AURORA_ARCH_ARM)
#define AURORA_PERMIT_ARBITRARY_REF
@ -591,7 +643,7 @@ static inline void AuClearBit(T &value, AuUInt8 idx)
// I'm sorry to anyone reading this. I wanted it to be verbose. I should've just used my old friends, macros :(
template<typename T>
static inline T AuReadGenericLE(const void *ptr, int offset)
static auline T AuReadGenericLE(const void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_LITTLE)
return *reinterpret_cast<const T *>(reinterpret_cast<const AuUInt8 *>(ptr) + offset);
@ -632,7 +684,7 @@ static inline T AuReadGenericLE(const void *ptr, int offset)
}
template<typename T>
static inline T AuReadGenericBE(const void *ptr, int offset)
static auline T AuReadGenericBE(const void *ptr, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_BIG)
return *reinterpret_cast<const T *>(reinterpret_cast<const AuUInt8 *>(ptr) + offset);
@ -672,87 +724,87 @@ static inline T AuReadGenericBE(const void *ptr, int offset)
#endif
}
static inline AuUInt64 AuReadU64LE(const void *ptr, int offset)
static auline AuUInt64 AuReadU64LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt64>(ptr, offset);
}
static inline AuUInt32 AuReadU32LE(const void *ptr, int offset)
static auline AuUInt32 AuReadU32LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt32>(ptr, offset);
}
static inline AuUInt16 AuReadU16LE(const void *ptr, int offset)
static auline AuUInt16 AuReadU16LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt16>(ptr, offset);
}
static inline AuUInt8 AuReadU8LE(const void *ptr, int offset)
static auline AuUInt8 AuReadU8LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuUInt8>(ptr, offset);
}
static inline AuInt64 AuReadS64LE(const void *ptr, int offset)
static auline AuInt64 AuReadS64LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt64>(ptr, offset);
}
static inline AuInt32 AuReadS32LE(const void *ptr, int offset)
static auline AuInt32 AuReadS32LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt32>(ptr, offset);
}
static inline AuInt16 AuReadS16LE(const void *ptr, int offset)
static auline AuInt16 AuReadS16LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt16>(ptr, offset);
}
static inline AuInt8 AuReadS8LE(const void *ptr, int offset)
static auline AuInt8 AuReadS8LE(const void *ptr, int offset)
{
return AuReadGenericLE<AuInt8>(ptr, offset);
}
static inline AuUInt64 AuReadU64BE(const void *ptr, int offset)
static auline AuUInt64 AuReadU64BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt64>(ptr, offset);
}
static inline AuUInt32 AuReadU32BE(const void *ptr, int offset)
static auline AuUInt32 AuReadU32BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt32>(ptr, offset);
}
static inline AuUInt16 AuReadU16BE(const void *ptr, int offset)
static auline AuUInt16 AuReadU16BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt16>(ptr, offset);
}
static inline AuUInt8 AuReadU8BE(const void *ptr, int offset)
static auline AuUInt8 AuReadU8BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuUInt8>(ptr, offset);
}
static inline AuInt64 AuReadS64BE(const void *ptr, int offset)
static auline AuInt64 AuReadS64BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt64>(ptr, offset);
}
static inline AuInt32 AuReadS32BE(const void *ptr, int offset)
static auline AuInt32 AuReadS32BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt32>(ptr, offset);
}
static inline AuInt16 AuReadS16BE(const void *ptr, int offset)
static auline AuInt16 AuReadS16BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt16>(ptr, offset);
}
static inline AuInt8 AuReadS8BE(const void *ptr, int offset)
static auline AuInt8 AuReadS8BE(const void *ptr, int offset)
{
return AuReadGenericBE<AuInt8>(ptr, offset);
}
static inline AuUInt64 AuReadU64(const void *ptr, int offset)
static auline AuUInt64 AuReadU64(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU64LE(ptr, offset);
@ -761,7 +813,7 @@ static inline AuUInt64 AuReadU64(const void *ptr, int offset)
#endif
}
static inline AuUInt32 AuReadU32(const void *ptr, int offset)
static auline AuUInt32 AuReadU32(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU32LE(ptr, offset);
@ -770,7 +822,7 @@ static inline AuUInt32 AuReadU32(const void *ptr, int offset)
#endif
}
static inline AuUInt16 AuReadU16(const void *ptr, int offset)
static auline AuUInt16 AuReadU16(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU16LE(ptr, offset);
@ -779,7 +831,7 @@ static inline AuUInt16 AuReadU16(const void *ptr, int offset)
#endif
}
static inline AuUInt8 AuReadU8(const void *ptr, int offset)
static auline AuUInt8 AuReadU8(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadU8LE(ptr, offset);
@ -788,7 +840,7 @@ static inline AuUInt8 AuReadU8(const void *ptr, int offset)
#endif
}
static inline AuInt64 AuReadS64(const void *ptr, int offset)
static auline AuInt64 AuReadS64(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS64LE(ptr, offset);
@ -797,7 +849,7 @@ static inline AuInt64 AuReadS64(const void *ptr, int offset)
#endif
}
static inline AuInt32 AuReadS32(const void *ptr, int offset)
static auline AuInt32 AuReadS32(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS32LE(ptr, offset);
@ -806,7 +858,7 @@ static inline AuInt32 AuReadS32(const void *ptr, int offset)
#endif
}
static inline AuInt16 AuReadS16(const void *ptr, int offset)
static auline AuInt16 AuReadS16(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS16LE(ptr, offset);
@ -815,7 +867,7 @@ static inline AuInt16 AuReadS16(const void *ptr, int offset)
#endif
}
static inline AuInt8 AuReadS8(const void *ptr, int offset)
static auline AuInt8 AuReadS8(const void *ptr, int offset)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
return AuReadS8LE(ptr, offset);
@ -825,7 +877,7 @@ static inline AuInt8 AuReadS8(const void *ptr, int offset)
}
template<typename T>
static inline void AuWriteGenericLE(void *ptr, int offset, T value)
static auline void AuWriteGenericLE(void *ptr, int offset, T value)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_LITTLE)
*reinterpret_cast<T *>(reinterpret_cast<AuUInt8 *>(ptr) + offset) = value;
@ -865,7 +917,7 @@ static inline void AuWriteGenericLE(void *ptr, int offset, T value)
}
template<typename T>
static inline void AuWriteGenericBE(void *ptr, T value, int offset)
static auline void AuWriteGenericBE(void *ptr, T value, int offset)
{
#if defined(AURORA_PERMIT_ARBITRARY_REF) && defined(AU_CPU_ENDIAN_BIG)
*reinterpret_cast<T *>(reinterpret_cast<AuUInt8 *>(ptr) + offset) = value;
@ -904,87 +956,87 @@ static inline void AuWriteGenericBE(void *ptr, T value, int offset)
#endif
}
static inline void AuWriteU64LE(void *ptr, int offset, AuUInt64 value)
static auline void AuWriteU64LE(void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericLE<AuUInt64>(ptr, offset, value);
}
static inline void AuWriteU32LE(void *ptr, int offset, AuUInt32 value)
static auline void AuWriteU32LE(void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericLE<AuUInt32>(ptr, offset, value);
}
static inline void AuWriteU16LE(void *ptr, int offset, AuUInt16 value)
static auline void AuWriteU16LE(void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericLE<AuUInt16>(ptr, offset, value);
}
static inline void AuWriteU8LE(void *ptr, int offset, AuUInt8 value)
static auline void AuWriteU8LE(void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericLE<AuUInt8>(ptr, offset, value);
}
static inline void AuWriteS64LE(void *ptr, int offset, AuInt64 value)
static auline void AuWriteS64LE(void *ptr, int offset, AuInt64 value)
{
AuWriteGenericLE<AuInt64>(ptr, offset, value);
}
static inline void AuWriteS32LE(void *ptr, int offset, AuInt32 value)
static auline void AuWriteS32LE(void *ptr, int offset, AuInt32 value)
{
AuWriteGenericLE<AuInt32>(ptr, offset, value);
}
static inline void AuWriteS16LE(void *ptr, int offset, AuInt16 value)
static auline void AuWriteS16LE(void *ptr, int offset, AuInt16 value)
{
AuWriteGenericLE<AuInt16>(ptr, offset, value);
}
static inline void AuWriteS8LE(void *ptr, int offset, AuInt8 value)
static auline void AuWriteS8LE(void *ptr, int offset, AuInt8 value)
{
AuWriteGenericLE<AuInt8>(ptr, offset, value);
}
static inline void AuWriteU64BE(void *ptr, int offset, AuUInt64 value)
static auline void AuWriteU64BE(void *ptr, int offset, AuUInt64 value)
{
AuWriteGenericBE<AuUInt64>(ptr, offset, value);
}
static inline void AuWriteU32BE(void *ptr, int offset, AuUInt32 value)
static auline void AuWriteU32BE(void *ptr, int offset, AuUInt32 value)
{
AuWriteGenericBE<AuUInt32>(ptr, offset, value);
}
static inline void AuWriteU16BE(void *ptr, int offset, AuUInt16 value)
static auline void AuWriteU16BE(void *ptr, int offset, AuUInt16 value)
{
AuWriteGenericBE<AuUInt16>(ptr, offset, value);
}
static inline void AuWriteU8BE(void *ptr, int offset, AuUInt8 value)
static auline void AuWriteU8BE(void *ptr, int offset, AuUInt8 value)
{
AuWriteGenericBE<AuUInt8>(ptr, offset, value);
}
static inline void AuWriteS64BE(void *ptr, int offset, AuInt64 value)
static auline void AuWriteS64BE(void *ptr, int offset, AuInt64 value)
{
AuWriteGenericBE<AuInt64>(ptr, offset, value);
}
static inline void AuWriteS32BE(void *ptr, int offset, AuInt32 value)
static auline void AuWriteS32BE(void *ptr, int offset, AuInt32 value)
{
AuWriteGenericBE<AuInt32>(ptr, offset, value);
}
static inline void AuWriteS16BE(void *ptr, int offset, AuInt16 value)
static auline void AuWriteS16BE(void *ptr, int offset, AuInt16 value)
{
AuWriteGenericBE<AuInt16>(ptr, offset, value);
}
static inline void AuWriteS8BE(void *ptr, int offset, AuInt8 value)
static auline void AuWriteS8BE(void *ptr, int offset, AuInt8 value)
{
AuWriteGenericBE<AuInt8>(ptr, offset, value);
}
static inline void AuWriteU64(void *ptr, int offset, AuUInt64 value)
static auline void AuWriteU64(void *ptr, int offset, AuUInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU64LE(ptr, offset, value);
@ -993,7 +1045,7 @@ static inline void AuWriteU64(void *ptr, int offset, AuUInt64 value)
#endif
}
static inline void AuWriteU32(void *ptr, int offset, AuUInt32 value)
static auline void AuWriteU32(void *ptr, int offset, AuUInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU32LE(ptr, offset, value);
@ -1002,7 +1054,7 @@ static inline void AuWriteU32(void *ptr, int offset, AuUInt32 value)
#endif
}
static inline void AuWriteU16(void *ptr, int offset, AuUInt16 value)
static auline void AuWriteU16(void *ptr, int offset, AuUInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU16LE(ptr, offset, value);
@ -1011,7 +1063,7 @@ static inline void AuWriteU16(void *ptr, int offset, AuUInt16 value)
#endif
}
static inline void AuWriteU8(void *ptr, int offset, AuUInt8 value)
static auline void AuWriteU8(void *ptr, int offset, AuUInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteU8LE(ptr, offset, value);
@ -1020,7 +1072,7 @@ static inline void AuWriteU8(void *ptr, int offset, AuUInt8 value)
#endif
}
static inline void AuWriteS64(void *ptr, int offset, AuInt64 value)
static auline void AuWriteS64(void *ptr, int offset, AuInt64 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS64LE(ptr, offset, value);
@ -1029,7 +1081,7 @@ static inline void AuWriteS64(void *ptr, int offset, AuInt64 value)
#endif
}
static inline void AuWriteS32(void *ptr, int offset, AuInt32 value)
static auline void AuWriteS32(void *ptr, int offset, AuInt32 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS32LE(ptr, offset, value);
@ -1038,7 +1090,7 @@ static inline void AuWriteS32(void *ptr, int offset, AuInt32 value)
#endif
}
static inline void AuWriteS16(void *ptr, int offset, AuInt16 value)
static auline void AuWriteS16(void *ptr, int offset, AuInt16 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS16LE(ptr, offset, value);
@ -1047,7 +1099,7 @@ static inline void AuWriteS16(void *ptr, int offset, AuInt16 value)
#endif
}
static inline void AuWriteS8(void *ptr, int offset, AuInt8 value)
static auline void AuWriteS8(void *ptr, int offset, AuInt8 value)
{
#if defined(AU_CPU_ENDIAN_LITTLE)
AuWriteS8LE(ptr, offset, value);