 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
15 #ifndef RAPIDJSON_CLZLL_H_
16 #define RAPIDJSON_CLZLL_H_
18 #include "../rapidjson.h"
20 #if defined(_MSC_VER) && !defined(UNDER_CE)
23 #pragma intrinsic(_BitScanReverse64)
25 #pragma intrinsic(_BitScanReverse)
37 #if defined(_MSC_VER) && !defined(UNDER_CE)
40 _BitScanReverse64(&r,
x);
43 if (_BitScanReverse(&r,
static_cast<uint32_t>(
x >> 32)))
47 _BitScanReverse(&r,
static_cast<uint32_t>(
x & 0xFFFFFFFF));
51 #elif (defined(__GNUC__) && __GNUC__ >= 4) || RAPIDJSON_HAS_BUILTIN(__builtin_clzll)
53 return static_cast<uint32_t>(__builtin_clzll(
x));
57 while (!(
x & (
static_cast<uint64_t>(1) << 63))) {
66 #define RAPIDJSON_CLZLL RAPIDJSON_NAMESPACE::internal::clzll
71 #endif // RAPIDJSON_CLZLL_H_
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Definition: rapidjson.h:124
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Definition: rapidjson.h:121
uint32_t clzll(uint64_t x)
Definition: clzll.h:32
unsigned long long uint64_t
Definition: stdint.h:18
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:437
unsigned int uint32_t
Definition: stdint.h:17
Definition: allocators.h:422