IndexUtilitiesasmjit::Support

asmjit::Support Namespace Reference [¶]

Contains support classes and functions that may be used by AsmJit source and header files. Anything defined here is considered internal and should not be used outside of AsmJit and related projects like AsmTK.

Typedefs

Functions

template<size_t Size, bool IsUnsigned>
using Support::std_int_t = typename std_int<Size, IsUnsigned>::type[¶]

std_int_t is a shortcut to std_int<Size, IsUnsigned>::type.

template<size_t Size>
using Support::std_sint_t = typename std_int<Size, false>::type[¶]

std_sint_t is a shortcut to std_int<Size, false>::type.

template<size_t Size>
using Support::std_uint_t = typename std_int<Size, true>::type[¶]

std_uint_t is a shortcut to std_int<Size, true>::type.

using Support::BitWord = std_uint_t<sizeof(uintptr_t)>[¶]

Storage used to store bits in a single word as a standard type as defined by <stdint.h>.

Support::ByteOrderenum class[¶]

Byte order.

ConstantDescription
kLE 

Little endian.

kBE 

Big endian.

kNative 

Native byte order of the target architecture.

Support::SortOrder : uint32_tenum class[¶]

Sort order.

ConstantDescription
kAscending 

Ascending order.

Descending order.

template<typename... Args>
void Support::maybe_unused(
Args&&...
)staticnoexcept[¶]

Silences warnings about unused arguments or variables - more variables can be passed to maybe_unused() at once.

uint32_t Support::bytepack32_4x8(
uint32_t a,
uint32_t b,
uint32_t c,
uint32_t d
)constexprstaticnodiscardnoexcept[¶]

Pack four 8-bit integer into a 32-bit integer as it is an array of {b0,b1,b2,b3}.

int Support::compare_string_views(
const char* a_data,
size_t a_size,
const char* b_data,
size_t b_size
)staticnodiscardnoexcept[¶]

Compares two string views.

template<typename T>
bool Support::bit_vector_get_bit(
T* buf,
size_t index
)staticnoexcept[¶]

Sets bit in a bit-vector buf at index.

template<typename T>
void Support::bit_vector_set_bit(
T* buf,
size_t index,
bool value
)staticnoexcept[¶]

Sets bit in a bit-vector buf at index to value.

template<typename T>
void Support::bit_vector_or_bit(
T* buf,
size_t index,
bool value
)staticnoexcept[¶]

Sets bit in a bit-vector buf at index to value.

template<typename T>
void Support::bit_vector_xor_bit(
T* buf,
size_t index,
bool value
)staticnoexcept[¶]

Sets bit in a bit-vector buf at index to value.

template<typename T>
void Support::bit_vector_fill(
T* buf,
size_t index,
size_t count
)staticnoexcept[¶]

Fills count bits in bit-vector buf starting at bit-index index.

template<typename T>
void Support::bit_vector_clear(
T* buf,
size_t index,
size_t count
)staticnoexcept[¶]

Clears count bits in bit-vector buf starting at bit-index index.

template<typename T, typename CompareT = Compare<SortOrder::kAscending>>
void Support::insertion_sort(
T* base,
size_t size,
const CompareT& cmp = CompareT()
)staticnoexcept[¶]

Insertion sort.

template<typename T, class CompareT = Compare<SortOrder::kAscending>>
void Support::sort(
T* base,
size_t size,
const CompareT& cmp = CompareT{}
)staticnoexcept[¶]

Quick sort implementation.

The main reason to provide a custom qsort implementation is that we needed something that will never throw bad_alloc exception. This implementation doesn't use dynamic memory allocation.