28#ifndef OZZ_OZZ_BASE_PLATFORM_H_
29#define OZZ_OZZ_BASE_PLATFORM_H_
35#if !((__cplusplus >= 201103L) || (_MSC_VER >= 1900))
36#error "ozz-animation requires c++11 language standards."
44#include "ozz/base/export.h"
52#define OZZ_ARRAY_SIZE(_array) (sizeof(_array) / sizeof(_array[0]))
58#define OZZ_INLINE __forceinline
60#define OZZ_INLINE inline __attribute__((always_inline))
66#define OZZ_NOINLINE __declspec(noinline)
68#define OZZ_NOINLINE __attribute__((noinline))
74#define OZZ_RESTRICT __restrict
78#define OZZ_IF_DEBUG(...)
79#define OZZ_IF_NDEBUG(...) __VA_ARGS__
81#define OZZ_IF_DEBUG(...) __VA_ARGS__
82#define OZZ_IF_NDEBUG(...)
88OZZ_BASE_DLL
bool strmatch(
const char* _str,
const char* _pattern);
91template <
typename _Ty>
92OZZ_INLINE
bool IsAligned(_Ty _value,
size_t _alignment) {
93 return (_value & (_alignment - 1)) == 0;
95template <
typename _Ty>
96OZZ_INLINE
bool IsAligned(_Ty* _address,
size_t _alignment) {
97 return (
reinterpret_cast<uintptr_t
>(_address) & (_alignment - 1)) == 0;
102template <
typename _Ty>
103OZZ_INLINE _Ty Align(_Ty _value,
size_t _alignment) {
104 return static_cast<_Ty
>(_value + (_alignment - 1)) & (0 - _alignment);
106template <
typename _Ty>
107OZZ_INLINE _Ty* Align(_Ty* _address,
size_t _alignment) {
108 return reinterpret_cast<_Ty*
>(
109 (
reinterpret_cast<uintptr_t
>(_address) + (_alignment - 1)) &
114template <
typename _Ty>
115_Ty* PointerStride(_Ty* _ty,
size_t _stride) {
116 return reinterpret_cast<_Ty*
>(
reinterpret_cast<uintptr_t
>(_ty) + _stride);
uint8 uint8_t
Definition fwd.hpp:103
detail::uint8 byte
Definition raw_data.hpp:34