libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
Namespaces | |
namespace | binary |
namespace | binary_right_to_left |
An implementation of the binary-right-to-left method of exponentiation for raising a number to positive, integer power. | |
namespace | cache |
namespace | cpu_timer |
Use the TSC timer to measure intervals. | |
namespace | dyn |
namespace | enum_tags |
Construct enum-tag values from a sequence of chars, and extract from the tag-value the string that was encoded. | |
namespace | euclid |
namespace | factoring |
namespace | factory |
namespace | fma |
The set of contained classes implements a DSEL that allows one to more naturally make use of the fma() operation using the natural mathematical operators of which std::fma() implements: * and + (or -). | |
namespace | hashers |
Various hashing functions. | |
namespace | heap |
namespace | info |
All of this stuff is for high-quality error reporting. | |
namespace | intrusive |
namespace | mpl |
namespace | msm |
A meta (or finite)-state machine that can represent UML-style state tables in C++. | |
namespace | NTUtils |
namespace | ppd |
Parallel Pixie Dust or PPD is the name of the thread library within libjmmcg. | |
namespace | private_ |
namespace | rapid_insert_lookup |
namespace | singleton |
namespace | socket |
namespace | stack |
namespace | stats_to_csv |
namespace | syscall |
A wrapper for glibc or syscalls, etc. This function captures the return-code and if it is the specified failure-code, then according to the traits may capture any error information and throw it as an exception. | |
Classes | |
struct | a_zero_sized_class |
class | AppBase |
class | application |
Derive from this to assist with signal handling in one's executable. More... | |
class | automatic_scope |
Used to try to help ensure that an object can only be used in the current, automatic, scope. More... | |
class | ave_deviation_meter |
A class used to compute the arithmetic mean and mean-average deviation [1] of a series of events. More... | |
struct | back_batch |
An adaptor for collections that batches up to I items being both added to or removed from the collection, Colln. More... | |
class | back_batch< Colln, 0UL > |
Batch-sizes of zero aren't allowed. More... | |
struct | back_batch< Colln, 1UL > |
If the batch-size is one, collapse this to an empty wrapper of the collection_type. More... | |
class | basic_stack_string |
A class to provide a representation for a null-terminated character string that utilises a small-string optimisation. More... | |
class | binder0args |
class | binder1st |
class | binder2args |
class | binder3args |
class | binder4args |
class | bitfield_map |
This container is an associative collection of types. The domain is a bit-map of the mapped_types that are selected in the range. More... | |
struct | checked_dynamic_cast |
class | CmdLineParamsData |
class | CmdLineProcessorBase |
class | ConfigFile |
A specialization for helping to making use of configuration files. More... | |
class | const_mem_fun1_ref_t |
class | const_mem_fun1_t |
class | const_mem_fun2_ref_t |
class | const_mem_fun_ref_t |
class | copy_mem_fun1_ref_t |
class | copy_mem_fun1_t |
class | copy_mem_fun2_ref_t |
class | copy_mem_fun_ref_t |
class | crt_exception |
class | csv_iterator |
class | curl |
struct | default_delete |
class | exception |
class | exit_codes |
A nice enum for the exit codes from main(). More... | |
struct | failure_code_mmap |
class | file |
struct | four_args |
struct | free_ptr |
A trivial class to use global free() to deallocate the memory using an RAII-style wrapper. More... | |
struct | front_batch |
An adaptor for collections that batches up to I items being atomically removed from the collection, Colln. More... | |
class | front_batch< Colln, 0UL > |
Batch-sizes of zero aren't allowed. More... | |
struct | front_batch< Colln, 1UL > |
Batch-sizes of zero aren't allowed. More... | |
struct | hp_interval |
Measure a time interval via RAII. More... | |
class | hp_timer |
A class for providing timings in high-performance counter resolution. More... | |
class | hp_timer< ppd::generic_traits::api_type::posix_pthreads, Mdl > |
class | hp_timer< ppd::generic_traits::MS_Win32, Mdl_ > |
A class for providing timings in high-performance counter resolution. More... | |
struct | int128_t |
struct | invert_if |
Invert the value V if the boolean A is false. More... | |
struct | invert_if< V, false > |
class | latency_timestamps |
A simple class that is used to create a CSV-formatted file of timestamps, from which a histogram might be generated. More... | |
class | latency_timestamps_itf |
class | line_iterator |
class | Logger |
class | lowerletter |
A simple class to turn a character into lowercase according to the current locale settings. More... | |
struct | max |
class | mem_fun1_ref_t |
class | mem_fun1_t |
class | mem_fun_ref_t |
struct | min |
struct | modulus |
The result is the modulus of the value, V. More... | |
struct | narrow |
struct | no_args |
class | no_latency_timestamps |
A simple class that is used to create no timestamps. More... | |
class | non_addressable |
class | non_allocatable |
class | non_assignable |
Used to try to help ensure that an object cannot be copied. More... | |
class | non_copyable |
Used to try to help ensure that an object cannot be copied. More... | |
class | non_deleteable |
class | non_newable |
Used to try to help ensure that an object can only be allocated on the stack. More... | |
struct | noop_dtor |
Another trivial class to make calling the dtor of an object into a functor, but actually does nothing. More... | |
struct | NullCrack |
struct | one_arg |
class | PeanoCurve |
struct | placement_dtor |
Another trivial class to make calling the dtor of an object into a functor. More... | |
class | ptr_fun2_ref_t |
class | ptr_fun2_t |
class | ptr_fun3_ref_t |
class | ptr_fun4_ref_t |
class | ptr_fun_ref_t |
class | ptr_fun_t |
class | scoped_thread_settings |
struct | shared_data |
class | shared_mem |
A class to wrap POSIX (inter-process) shared-memory. More... | |
class | shared_ptr |
A shared pointer-type that has threading specified as a trait, and uses an intrusive count to save on calls to the memory allocator, which could cause excessive contention on the memory manager in a multi-threaded environment. More... | |
struct | sign |
The result is true if the value V is positive, otherwise false. More... | |
class | sp_counter_itf_type |
An optional interface for the intrusive sp_counter_type. More... | |
class | sp_counter_type |
The intrusive counter that an object must also inherit from for the shared_ptr class to work. More... | |
class | temp_file |
struct | three_args |
struct | two_args |
struct | uint128_t |
class | unique_ptr |
A unique pointer-type that has threading specified as a trait. More... | |
class | unordered_tuple |
A unordered container for a disparate list of types for which the keys form a perfect hash, computable at compile-time. More... | |
class | upperletter |
A simple class to turn a character into upper case according to the current locale settings. More... | |
struct | widen |
Typedefs | |
typedef char | tchar |
typedef std::basic_string< tchar > | tstring |
typedef std::basic_stringstream< tchar > | tstringstream |
typedef std::basic_istringstream< tchar > | tistringstream |
typedef std::basic_ostringstream< tchar > | tostringstream |
typedef std::basic_istream< tchar > | tistream |
typedef std::basic_ostream< tchar > | tostream |
typedef basic_stack_string< 1, char > | stack_string |
typedef basic_stack_string< 1, wchar_t > | wstack_string |
typedef std::basic_fstream< tchar > | tfstream |
typedef std::basic_ifstream< tchar > | tifstream |
typedef std::basic_ofstream< tchar > | tofstream |
Enumerations | |
enum | log_level_type { log_none =0 , log_errors , log_warnings , log_info } |
Functions | |
std::string | make_filename (std::string &&root, char const *const mask="-%%%%%") noexcept(false) |
Return a string suitable for using to name a file. More... | |
std::string | make_filename (char const *const root, char const *const mask) noexcept(false) |
const tstring __fastcall | dump_crt_errno (const unsigned long err=errno) noexcept(false) |
std::wstring __fastcall | StringToWString (const std::string &in) |
std::string __fastcall | WStringToString (const std::wstring &in) |
tstring __fastcall | WStringToTString (const std::wstring &in) |
std::wstring __fastcall | TStringToWString (const tstring &in) |
tstring __fastcall | StringToTString (const std::string &in) noexcept(true) |
std::string __fastcall | TStringToString (const tstring &in) noexcept(true) |
constexpr std::uint32_t | num_digits_in_base10 (std::uint64_t v) noexcept(true) __attribute__((pure)) |
Returns the number of digits in the base 10 representation of an uint64_t. More... | |
std::uint32_t | uint64ToBufferUnsafe (std::uint64_t v, char *const buffer, [[maybe_unused]] std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Copies the ASCII base 10 representation of v into the buffer and returns the number of bytes written. More... | |
std::uint64_t | folly_ascii_to_int (char const *buffer, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Returns the ASCII base 10 representation in the buffer. More... | |
template<unsigned Base> | |
std::uint64_t | ascii_to_int_baseline (char const *const buffer, std::size_t sz) noexcept(true) __attribute__((pure)) |
Returns the ASCII base 10 representation in the buffer. More... | |
template<typename T > | |
tstring __fastcall | tostring (const T &val) |
template<std::size_t N> | |
tstring __fastcall | tostring (const std::array< tstring::value_type, N > &val) |
template<> | |
tstring __fastcall | tostring< tstring > (const tstring &val) |
template<typename A , typename Fmt > | |
tstring __fastcall | tostring (const A &a, const Fmt &format) |
template<std::size_t Sz> | |
constexpr std::size_t FORCE_INLINE | tostring (std::uint64_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<std::uint8_t Base, std::size_t Sz> | |
constexpr std::size_t FORCE_INLINE | tostring_zero_pad_right_justify (std::uint32_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<std::size_t Sz> | |
constexpr std::size_t FORCE_INLINE | tostring (std::int64_t v, char(&buff)[Sz]) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<class V > | |
std::size_t | tostring (V v, char *const buff, std::size_t sz) noexcept(true)=delete |
template<> | |
std::size_t | tostring< int > (int v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<> | |
std::size_t | tostring< unsigned int > (unsigned int v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<> | |
std::size_t | tostring< long > (long v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<> | |
std::size_t | tostring< unsigned long > (unsigned long v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
std::size_t | tostring (std::uint32_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
std::size_t | tostring (std::int64_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
std::size_t | tostring (std::uint64_t v, char *const buff, std::size_t sz) noexcept(true) __attribute__((pure)) |
Convert the input value to a string stored in the supplied buffer. More... | |
std::size_t | tostring (double v, char *const buff, std::size_t sz) noexcept(true) |
Convert the input value to a string stored in the supplied buffer. More... | |
template<typename T > | |
void __fastcall | fromstring (const tstring &str, T &val) |
template<> | |
void __fastcall | fromstring< tstring > (const tstring &str, tstring &val) |
template<class V > | |
std::enable_if< std::is_integral< V >::value||std::is_floating_point< V >::value, V >::type | fromstring (char const *const, std::uint32_t) noexcept(true) __attribute__((pure))=delete |
template<> | |
int | fromstring< int > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
unsigned int | fromstring< unsigned int > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
long | fromstring< long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
unsigned long | fromstring< unsigned long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
long long | fromstring< long long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
unsigned long long | fromstring< unsigned long long > (char const *const begin, std::uint32_t sz) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<> | |
double | fromstring< double > (char const *const begin, std::uint32_t) noexcept(true) __attribute__((pure)) |
Convert the decimal value contained in the input string into an integral value. More... | |
template<typename T > | |
void __fastcall | delete_ptr (T *ptr) |
tstring | toupper (const tstring &l) |
Turn the input string into an uppercase variant according to the current locale settings. More... | |
tstring | tolower (const tstring &u) |
Turn the input string into a lowercase variant according to the current locale settings. More... | |
template<class Iter > | |
Iter | toupper (const Iter b, const Iter e, Iter o) |
Turn the input range into an uppercase variant according to the current locale settings. More... | |
template<class Iter > | |
Iter | tolower (const Iter b, const Iter e, Iter o) |
Turn the input range into a lowercase variant according to the current locale settings. More... | |
template<unsigned int BuffN, class charT , class traits > | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &os, basic_stack_string< BuffN, charT, traits > const &s) noexcept(false) |
template<unsigned int BuffN, class charT , class traits > | |
std::basic_istream< charT, traits > & | operator>> (std::basic_istream< charT, traits > &os, basic_stack_string< BuffN, charT, traits > &s) noexcept(false) |
template<typename MeteredObjType > | |
tostream &__fastcall FORCE_INLINE | operator<< (tostream &os, ave_deviation_meter< MeteredObjType > const &p) noexcept(false) |
template<class MeteredObjType , class Fn > | |
ave_deviation_meter< MeteredObjType > | estimate_average_deviation (typename ave_deviation_meter< MeteredObjType >::value_type const computations, Fn fn) |
An algorithm to estimate the average deviation returned after a functor is computed N times. More... | |
template<class MeteredObjType , class Fn > | |
std::pair< ave_deviation_meter< MeteredObjType >, bool > | compute_average_deviation (double const target_deviation, typename ave_deviation_meter< MeteredObjType >::value_type const max_computations, Fn fn) |
An algorithm to compute the ave_deviation_meter of a functor when a specific average deviation is requested. More... | |
template<typename InputIterator , typename ValueType > | |
std::pair< bool, InputIterator > | BestStringMatch (const InputIterator &matches_begin, const InputIterator &matches_end, const ValueType &str) |
template<typename MeteredObjType > | |
tostream &__fastcall | operator<< (tostream &os, ave_deviation_meter< MeteredObjType > const &p) noexcept(false) |
template<class V > | |
constexpr V | varadic_max (V v) noexcept(true) |
Work around the fact that there is no parameter-pack version of std::max(...). sigh C++ is great, no? More... | |
template<class V , class... Values> | |
constexpr V | varadic_max (V v, Values... values) noexcept(true) |
template<class V > | |
constexpr V | varadic_min (V v) noexcept(true) |
template<class V , class... Values> | |
constexpr V | varadic_min (V v, Values... values) noexcept(true) |
template<class Iter , class Compare > | |
void FORCE_INLINE | bogo_sort (Iter first, Iter last, Compare comp) |
An implementation of the bogo-sort[1] algorithm, in STL-style. More... | |
template<class Iter1 , class Iter2 > | |
void FORCE_INLINE | memcpy (Iter1 dest, Iter2 src, std::size_t n) noexcept(true) |
Equivalent to the memcpy operations. More... | |
template<> | |
void FORCE_INLINE | memcpy< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true) |
template<> | |
void FORCE_INLINE | memcpy< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true) |
template<class Iter1 , class Iter2 > | |
void FORCE_INLINE | memmove (Iter1 dest, Iter2 src, std::size_t n) noexcept(true) |
Equivalent to the memmove operations. More... | |
template<> | |
void FORCE_INLINE | memmove< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true) |
template<> | |
void FORCE_INLINE | memmove< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true) |
template<class Iter , class V > | |
std::enable_if< std::is_same< typename std::iterator_traits< Iter >::value_type, V >::value >::type FORCE_INLINE | memset (Iter dest, V i, std::size_t n) noexcept(true) |
Equivalent to the memset operations. More... | |
template<> | |
void FORCE_INLINE | memset< char *, char > (char *dest, char i, std::size_t n) noexcept(true) |
template<> | |
void FORCE_INLINE | memset< wchar_t *, wchar_t > (wchar_t *dest, wchar_t i, std::size_t n) noexcept(true) |
template<class Iter > | |
bool FORCE_INLINE | memcmp (Iter src1, Iter src2, std::size_t n) noexcept(true) |
Equivalent to the std::memcmp() operations. More... | |
template<> | |
bool FORCE_INLINE | memcmp< char const * > (char const *src1, char const *src2, std::size_t n) noexcept(true) |
template<> | |
bool FORCE_INLINE | memcmp< wchar_t const * > (wchar_t const *src1, wchar_t const *src2, std::size_t n) noexcept(true) |
template<class Val , std::size_t SrcSz, std::size_t DestSz> | |
void FORCE_INLINE | memcpy (Val const (&src)[SrcSz], Val(&dest)[DestSz]) noexcept(false) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr void FORCE_INLINE | memcpy_opt (char const (&src)[SrcSz], char(&dest)[DestSz]) noexcept(true) |
Copy the source array to the destination (which may overlap), statically unrolled. More... | |
template<std::size_t FirstSz, std::size_t SecondSz> | |
constexpr bool FORCE_INLINE | memcmp_opt (char const (&first)[FirstSz], char const (&second)[SecondSz]) noexcept(true) |
Compare the source array to the destination (which may overlap), statically unrolled. More... | |
template<char const needle, std::size_t FirstSz> | |
constexpr char const *FORCE_INLINE | strchr_opt (char const (&haystack)[FirstSz]) noexcept(true) __attribute__((pure)) |
Find the first occurrence of the character in the string. More... | |
template<long P, typename V > | |
__attribute__ ((const)) const V __fastcall FORCE_INLINE pow(const V v) | |
At compile-time, using the binary-right-to-left method, unroll the exponentiation of raising the value V to the integer power of P. More... | |
template<class BFSM , std::size_t BFSz = sizeof(typename std::underlying_type<typename boost::mpl::deref<typename boost::mpl::begin<BFSM>::type>::type::first::value_type>::type)> | |
class jmmcg::LIBJMMCG_VER_NAMESPACE::bitfield_map | __attribute__ ((packed)) |
unsigned | count_trailing_zeroes_compat (const uint128_t value) noexcept(true) |
unsigned | count_leading_zeroes_compat (const uint128_t value) noexcept(true) |
template<std::size_t FirstSz, std::size_t SecondSz, class LessThan32BytesLong > | |
constexpr char const *FORCE_INLINE | strstr_opt (char const (&haystack)[FirstSz], char const (&needle)[SecondSz]) noexcept(true) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr void FORCE_INLINE | memcpy_opt (std::array< char, SrcSz > const &src, std::array< char, DestSz > &dest) noexcept(true) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr void FORCE_INLINE | memcpy_opt (std::array< uint8_t, SrcSz > const &src, std::array< uint8_t, DestSz > &dest) noexcept(true) |
template<std::size_t Sz> | |
bool | memcmp (std::array< char, Sz > const &src1, std::array< char, Sz > const &src2) noexcept(true) |
template<std::size_t Sz> | |
bool | memcmp (std::array< uint8_t, Sz > const &src1, std::array< uint8_t, Sz > const &src2) noexcept(true) |
template<std::size_t Sz> | |
bool | operator== (std::array< char, Sz > const &src1, std::array< char, Sz > const &src2) noexcept(true) |
template<std::size_t Sz> | |
bool | operator== (std::array< uint8_t, Sz > const &src1, std::array< uint8_t, Sz > const &src2) noexcept(true) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr void | memcpy_slow (char const (&src)[SrcSz], char(&dest)[DestSz]) noexcept(true) |
template<class T , class V > | |
T | copy (V const &src) noexcept(true) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr std::array< char, DestSz > | copy (std::array< char, SrcSz > const &src) noexcept(true) |
template<std::size_t SrcSz, std::size_t DestSz> | |
constexpr std::array< uint8_t, DestSz > | copy (std::array< uint8_t, SrcSz > const &src) noexcept(true) |
__attribute__ ((pure)) bool curl | |
std::string | get_uuid_as_string () noexcept(false) |
bool | OutputDateTime (tostream &o, const time_t base_time=time(0), const tstring &fmt=_T("[%b %d %X %Z] ")) |
tostream &__fastcall | operator<< (tostream &ss, const timespec &st) |
Variables | |
const tchar *const | log_level_strs [] |
typedef basic_stack_string<1, char> jmmcg::LIBJMMCG_VER_NAMESPACE::stack_string |
Definition at line 446 of file stack_string.hpp.
typedef char jmmcg::LIBJMMCG_VER_NAMESPACE::tchar |
Definition at line 62 of file ttypes.hpp.
typedef std::basic_fstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tfstream |
typedef std::basic_ifstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tifstream |
typedef std::basic_istream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tistream |
Definition at line 72 of file ttypes.hpp.
typedef std::basic_istringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tistringstream |
Definition at line 70 of file ttypes.hpp.
typedef std::basic_ofstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tofstream |
typedef std::basic_ostream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tostream |
Definition at line 73 of file ttypes.hpp.
typedef std::basic_ostringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tostringstream |
Definition at line 71 of file ttypes.hpp.
typedef std::basic_string<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tstring |
Definition at line 68 of file ttypes.hpp.
typedef std::basic_stringstream<tchar> jmmcg::LIBJMMCG_VER_NAMESPACE::tstringstream |
Definition at line 69 of file ttypes.hpp.
typedef basic_stack_string<1, wchar_t> jmmcg::LIBJMMCG_VER_NAMESPACE::wstack_string |
Definition at line 447 of file stack_string.hpp.
Enumerator | |
---|---|
log_none | |
log_errors | |
log_warnings | |
log_info |
Definition at line 27 of file logging.hpp.
|
inline |
At compile-time, using the binary-right-to-left method, unroll the exponentiation of raising the value V to the integer power of P.
The runtime-algorithmic complexity of this function is O(M), where M is the algorithmic complexity of multiplication on the type V. The compile-time algorithmic complexity of this function is O(lg(power)+v(power)), where v(power) is the number of 1s in the binary representation of power.
v | The value to be exponentiated. |
Definition at line 239 of file integer_power.hpp.
struct jmmcg::LIBJMMCG_VER_NAMESPACE::uint128_t jmmcg::LIBJMMCG_VER_NAMESPACE::__attribute__ | ( | (packed) | ) |
|
inlinenoexcept |
Returns the ASCII base 10 representation in the buffer.
buffer | The ACSII base 10 representation of the natural number. |
sz | The length of the buffer. |
Definition at line 288 of file ttypes.hpp.
|
inline |
Definition at line 26 of file cmd_line_processing.hpp.
|
inline |
An implementation of the bogo-sort[1] algorithm, in STL-style.
Apologies to all members of the C++ standards community for this perversion. This algorithm should never be used in any code, apart from as an example of easy it is to create an apparently innocuous algorithm which can have an exceptionally bad order.
I quote an edited excerpt of a discussion on the ACCU-General mailing list regarding this implementation: "The quest for perversity was clearly at odds with the quest for beauty. I think perversity wins out in this case. And yes, you're a very bad man. How about compounding your badness and just writing this little gem up for Overload or blogging it so that it becomes immortalised and searchable? >:-> Kevlin [Henney]"
first | The start of the input range. |
last | The end of the input range. |
comp | The comparator to be used to compare two values within the range. |
Complexity: the truly excessive and exorbitant: O(N*N!+N*N)=O(N*N!), c.f. with O(nlog(n)) of std::sort().
[1] \see std::sort()
Definition at line 51 of file bogo_sort.hpp.
|
inline |
An algorithm to compute the ave_deviation_meter of a functor when a specific average deviation is requested.
target_deviation | The maximum, target average deviation, as a percentage number, that should be achieved. |
max_computations | The maximum number of times the functor fn should be computed, to ensure termination. |
fn | The functor to be computed. It should take no arguments and return ave_deviation_meter::value_type. |
Definition at line 40 of file ave_deviation_meter_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 1011 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 1024 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 997 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 109 of file int128_compatibility.hpp.
|
inlinenoexcept |
Definition at line 103 of file int128_compatibility.hpp.
|
inline |
Definition at line 618 of file ttypes.hpp.
|
inlinenoexcept |
Definition at line 77 of file exception_impl.hpp.
Referenced by jmmcg::LIBJMMCG_VER_NAMESPACE::crt_exception< API, Mdl >::to_string().
|
inline |
An algorithm to estimate the average deviation returned after a functor is computed N times.
computations | The number of times the functor fn should be computed. |
fn | The functor to be computed. It should take no arguments and return ave_deviation_meter::value_type. |
Definition at line 30 of file ave_deviation_meter_impl.hpp.
|
inlinenoexcept |
Returns the ASCII base 10 representation in the buffer.
buffer | The ACSII base 10 representation of the natural number. |
sz | The length of the buffer. |
From Folly.
Definition at line 242 of file ttypes.hpp.
Referenced by test_folly_ascii_to_int::result().
|
deletenoexcept |
|
inline |
Definition at line 499 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only, including a decimal point. |
Definition at line 583 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 517 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 539 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 561 of file ttypes.hpp.
|
inline |
Definition at line 504 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 528 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 550 of file ttypes.hpp.
|
inlinenoexcept |
Convert the decimal value contained in the input string into an integral value.
buff | The input buffer that must contain the decimal value only. |
Definition at line 572 of file ttypes.hpp.
|
inlinenoexcept |
|
noexcept |
Definition at line 35 of file filename.cpp.
|
noexcept |
Return a string suitable for using to name a file.
root | The string that shall be decorated to generate the resultant file name. |
mask | The mask used to form the random string, where '' is a hexadecimal character. |
Definition at line 28 of file filename.cpp.
|
inlinenoexcept |
Equivalent to the std::memcmp() operations.
src1 | A random-access iterator into a contiguous array of memory. |
src2 | A random-access iterator into a contiguous array of memory. |
n | The number of elements to compare. Must comprise a valid range. |
Definition at line 623 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 955 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 962 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 627 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 632 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Compare the source array to the destination (which may overlap), statically unrolled.
This method uses 512-bit, 256-bit, 128-bit, 64-bit, 32-bit, 16-bit then byte copies, unrolled to attempt to reduce the number of copy operations performed.
Algorithmic complexity: O(min(SrcSz, DestSz)/512)
Now ASAN reports mis-aligned accesses, [1], which could occur using MOV instructions [2] as in 64-bit mode alignment checking of ring 3 can be enabled. But on Intel & AMD mis-aligned access to memory-operands is not an issue in ring 3, so ubsan is conservative (obeying the Standard).
Definition at line 772 of file memops_impl.hpp.
|
inlinenoexcept |
Equivalent to the memcpy operations.
dest | A random-access iterator into a contiguous array of memory, note that the locations will not be pre-initialised, i.e. placement-new will only be used. |
src | A random-access iterator into a contiguous array of memory. |
n | The number of elements to copy. Must comprise a valid range. |
Definition at line 578 of file memops_impl.hpp.
|
noexcept |
Definition at line 638 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 582 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 587 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Copy the source array to the destination (which may overlap), statically unrolled.
This method uses 512-bit, 256-bit, 128-bit, 64-bit, 32-bit, 16-bit then byte copies, unrolled to attempt to reduce the number of copy operations performed.
Algorithmic complexity: O(min(SrcSz, DestSz)/512)
Now ASAN reports mis-aligned accesses, [1], which could occur using MOV instructions [2] as in 64-bit mode alignment checking of ring 3 can be enabled. But on Intel & AMD mis-aligned access to memory-operands is not an issue in ring 3, so ubsan is conservative (obeying the Standard).
Definition at line 652 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 939 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 947 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 986 of file memops_impl.hpp.
|
inlinenoexcept |
Equivalent to the memmove operations.
dest | A random-access iterator into a contiguous array of memory, note that the locations will not be pre-initialised, i.e. placement-new will only be used. |
src | A random-access iterator into a contiguous array of memory. |
n | The number of elements to move. Must comprise a valid range. |
Definition at line 593 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 597 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 602 of file memops_impl.hpp.
|
inlinenoexcept |
Equivalent to the memset operations.
dest | A random-access iterator into a contiguous array of memory. |
i | The value with which to initialise the elements in the range. |
n | The number of elements to set. Must comprise a valid range. |
Definition at line 608 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 612 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 617 of file memops_impl.hpp.
|
inlineconstexprnoexcept |
Returns the number of digits in the base 10 representation of an uint64_t.
Useful for preallocating buffers and such. It is also used internally, see below. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.
From Folly.
Definition at line 144 of file ttypes.hpp.
Referenced by uint64ToBufferUnsafe().
|
inlinenoexcept |
Definition at line 419 of file stack_string_impl.hpp.
|
inlinenoexcept |
Definition at line 22 of file ave_deviation_meter_impl.hpp.
|
inlinenoexcept |
Definition at line 22 of file ave_deviation_meter_impl.hpp.
|
inline |
Definition at line 75 of file hp_timer.hpp.
|
inlinenoexcept |
Definition at line 970 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 977 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 474 of file stack_string_impl.hpp.
|
inline |
Definition at line 41 of file logging.hpp.
|
inlineconstexprnoexcept |
Find the first occurrence of the character in the string.
This is based upon algorithms from: . Algorithmic complexity: O(min(FirstSz)/256) @param haystack The C-style char-array. @param needle The character to find. \return Zero if the character was not found in the first, otherwise the first occurrence of the character in the string. \see std::strchr()
Definition at line 910 of file memops_impl.hpp.
|
inlinenoexcept |
Definition at line 110 of file unicode_conversions.hpp.
References StringToTString().
Referenced by StringToTString().
|
inline |
Definition at line 57 of file unicode_conversions.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::widen::widen().
Referenced by TStringToWString().
|
inlineconstexprnoexcept |
Definition at line 925 of file memops_impl.hpp.
|
inline |
Turn the input range into a lowercase variant according to the current locale settings.
Definition at line 679 of file ttypes.hpp.
Turn the input string into a lowercase variant according to the current locale settings.
Definition at line 664 of file ttypes.hpp.
|
inline |
Definition at line 330 of file ttypes.hpp.
|
inline |
Definition at line 315 of file ttypes.hpp.
|
inline |
Definition at line 309 of file ttypes.hpp.
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The floating-point, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal, floating-point number shall be converted. |
sz | The size of the input buffer. |
Definition at line 493 of file ttypes.hpp.
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert(), isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert_MIT_price(), and isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert_price().
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 464 of file ttypes.hpp.
References uint64ToBufferUnsafe().
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert(), and folly_uint64ToBufferUnsafe::result().
|
inlineconstexprnoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
Sz | The size of the input buffer. |
Definition at line 375 of file ttypes.hpp.
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 452 of file ttypes.hpp.
References uint64ToBufferUnsafe().
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert().
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 481 of file ttypes.hpp.
References uint64ToBufferUnsafe().
Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert().
|
inlineconstexprnoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
Sz | The size of the input buffer. |
Definition at line 345 of file ttypes.hpp.
|
inlinedeletenoexcept |
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 393 of file ttypes.hpp.
References uint64ToBufferUnsafe().
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 422 of file ttypes.hpp.
References uint64ToBufferUnsafe().
|
inline |
Definition at line 324 of file ttypes.hpp.
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 410 of file ttypes.hpp.
References uint64ToBufferUnsafe().
|
inlinenoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted. |
sz | The size of the input buffer. |
Definition at line 439 of file ttypes.hpp.
References uint64ToBufferUnsafe().
|
inlineconstexprnoexcept |
Convert the input value to a string stored in the supplied buffer.
v | The integer, decimal input value. |
buff | A buffer that must be large enough into which the value, represented as ASCII, decimal integers shall be converted, zero-padded, right-justified. |
Sz | The size of the input buffer. |
Definition at line 357 of file ttypes.hpp.
|
inline |
Turn the input range into an uppercase variant according to the current locale settings.
Definition at line 672 of file ttypes.hpp.
Turn the input string into an uppercase variant according to the current locale settings.
Definition at line 656 of file ttypes.hpp.
|
inlinenoexcept |
Definition at line 121 of file unicode_conversions.hpp.
References TStringToString().
Referenced by TStringToString().
|
inline |
Definition at line 99 of file unicode_conversions.hpp.
References StringToWString(), and TStringToWString().
Referenced by TStringToWString().
|
inlinenoexcept |
Copies the ASCII base 10 representation of v into the buffer and returns the number of bytes written.
Assumes the buffer points to num_digits_in_base10(v) bytes of valid memory. Note that uint64 needs at most 20 bytes, uint32_t needs at most 10 bytes, uint16_t needs at most 5 bytes, and so on. Measurements suggest that defining a separate overload for 32-bit integers is not worthwhile.
This primitive is unsafe because it makes the size assumption and does not write the terminal '\0'.
From Folly.
Definition at line 213 of file ttypes.hpp.
References num_digits_in_base10().
Referenced by tostring(), tostring< int >(), tostring< long >(), tostring< unsigned int >(), and tostring< unsigned long >().
|
inlineconstexprnoexcept |
Work around the fact that there is no parameter-pack version of std::max(...). sigh C++ is great, no?
See Variadic functions: Variadic templates or initializer lists? – Revision 1.
Definition at line 43 of file max_min.hpp.
|
inlineconstexprnoexcept |
Definition at line 48 of file max_min.hpp.
|
inlineconstexprnoexcept |
Definition at line 54 of file max_min.hpp.
|
inlineconstexprnoexcept |
Definition at line 59 of file max_min.hpp.
|
inline |
Definition at line 70 of file unicode_conversions.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::narrow::narrow().
Referenced by WStringToTString().
|
inline |
Definition at line 88 of file unicode_conversions.hpp.
References WStringToString(), and WStringToTString().
Referenced by WStringToTString().
const tchar* const jmmcg::LIBJMMCG_VER_NAMESPACE::log_level_strs[] |
Definition at line 34 of file logging.hpp.
Referenced by jmmcg::LIBJMMCG_VER_NAMESPACE::Logger< Except_ >::Log().