mal-packet-weaver
C++20 packet serialization/deserialization library.
|
Enumerations | |
enum class | CompilerType : uint32_t { kUnknown = 1 << 0 , kGCC = 1 << 1 , kMSVC = 1 << 2 , kICC = 1 << 3 } |
Ensures that the determined endianness is valid. More... | |
Functions | |
constexpr bool | is_big_endian () |
Determines if the system's native endianness is big-endian. | |
constexpr bool | is_little_endian () |
Determines if the system's native endianness is little-endian. | |
constexpr uint32_t | compiler_type () |
Determines the compiler type used to compile the code. | |
constexpr bool | is_compiler_icc () |
Checks if the code was compiled with ICC (Intel C++ Compiler). | |
constexpr bool | is_compiler_gcc () |
Checks if the code was compiled with GCC (GNU Compiler Collection). | |
constexpr bool | is_compiler_msvc () |
Checks if the code was compiled with MSVC (Microsoft Visual C++). | |
uint16_t | betole16 (uint16_t x) |
Converts a 16-bit value between big-endian and little-endian. | |
uint32_t | betole32 (uint32_t x) |
Converts a 32-bit value between big-endian and little-endian. | |
uint64_t | betole64 (uint64_t x) |
Converts a 64-bit value between big-endian and little-endian. | |
__m128i | betole128 (__m128i x) |
Converts a 128-bit value between big-endian and little-endian using SSE2 intrinsics. | |
__m256i | betole256 (__m256i x) |
Converts a 256-bit value between big-endian and little-endian using AVX2 intrinsics. | |
Variables | |
constexpr bool | kIsBigEndian = is_big_endian() |
Represents the determined endianness of the system. | |
constexpr bool | kIsLittleEndian = is_little_endian() |
Represents the determined endianness of the system. | |
constexpr uint32_t | kCompilerType = compiler_type() |
Indicates the compiler type used for the code. | |
|
strong |
Ensures that the determined endianness is valid.
This compile-time assertion checks if the determined endianness is either big-endian or little-endian.
Indicates the compiler type.
Enumerator | |
---|---|
kUnknown | |
kGCC | |
kMSVC | |
kICC |
Definition at line 55 of file endianness.hpp.
__m128i mal_toolkit::endianness::betole128 | ( | __m128i | x | ) |
Converts a 128-bit value between big-endian and little-endian using SSE2 intrinsics.
x | The value to be converted. |
Definition at line 188 of file endianness.hpp.
|
inline |
Converts a 16-bit value between big-endian and little-endian.
x | The value to be converted. |
Definition at line 114 of file endianness.hpp.
__m256i mal_toolkit::endianness::betole256 | ( | __m256i | x | ) |
Converts a 256-bit value between big-endian and little-endian using AVX2 intrinsics.
x | The value to be converted. |
Definition at line 204 of file endianness.hpp.
|
inline |
Converts a 32-bit value between big-endian and little-endian.
x | The value to be converted. |
Definition at line 136 of file endianness.hpp.
uint64_t mal_toolkit::endianness::betole64 | ( | uint64_t | x | ) |
Converts a 64-bit value between big-endian and little-endian.
x | The value to be converted. |
Definition at line 160 of file endianness.hpp.
|
constexpr |
Determines the compiler type used to compile the code.
Definition at line 67 of file endianness.hpp.
|
constexpr |
Determines if the system's native endianness is big-endian.
Definition at line 23 of file endianness.hpp.
|
constexpr |
Checks if the code was compiled with GCC (GNU Compiler Collection).
Definition at line 101 of file endianness.hpp.
|
constexpr |
Checks if the code was compiled with ICC (Intel C++ Compiler).
Definition at line 95 of file endianness.hpp.
|
constexpr |
Checks if the code was compiled with MSVC (Microsoft Visual C++).
Definition at line 107 of file endianness.hpp.
|
constexpr |
Determines if the system's native endianness is little-endian.
Definition at line 29 of file endianness.hpp.
|
constexpr |
Indicates the compiler type used for the code.
Definition at line 89 of file endianness.hpp.
|
constexpr |
Represents the determined endianness of the system.
This is a compile-time constant indicating whether the system's native endianness is big-endian or little-endian.
Definition at line 36 of file endianness.hpp.
|
constexpr |
Represents the determined endianness of the system.
This is a compile-time constant indicating whether the system's native endianness is little-endian or big-endian.
Definition at line 43 of file endianness.hpp.