![]() |
ATLAS Offline Software
|
Namespaces | |
| namespace | detail |
| namespace | fpcompare |
| namespace | fpcompare_fn |
| namespace | vecDetail |
Classes | |
| class | Array |
| Read-only multidimensional array. More... | |
| class | Array< 0 > |
Read-only multidimensional array, specialized for N=0. More... | |
| class | ArrayIterator |
Iterator class for Array<N>. More... | |
| class | ArrayIteratorChooser |
Helper for defining iterators over Array's. More... | |
| class | ArrayIteratorChooser< 1 > |
Helper for defining iterators over Array's, specialized for N == 1. More... | |
| class | Arrayrep |
| Representation class for Array's. More... | |
| class | ArrayScanner |
| Helper class for converting strings to Array's. More... | |
| class | BitPacker |
| Pack a set of values bitwise into a stream. More... | |
| class | BitPacker16 |
| Pack a set of values bitwise into a stream. More... | |
| class | BitPacker8 |
| Pack a set of values bitwise into a stream. More... | |
| class | BitUnpacker |
| Helper to unpack a set of values bitwise from a stream. More... | |
| class | BitUnpacker16 |
| Helper to unpack a set of values bitwise from a stream. More... | |
| class | BitUnpacker8 |
| Helper to unpack a set of values bitwise from a stream. More... | |
| union | CachedPointer |
| Cached pointer with atomic update. More... | |
| class | CachedUniquePtrT |
| Cached pointer with atomic update. More... | |
| class | CachedValue |
| Cached value with atomic update. More... | |
| class | ClassName |
| Recursively separate out template arguments in a C++ class name. More... | |
| class | CMurmurHash2A |
| class | ConcurrentBitset |
| Variable-sized bitset allowing (mostly) concurrent access. More... | |
| class | ConcurrentMap |
| Hash map from integers/pointers allowing concurrent, lockless reads. More... | |
| class | ConcurrentPtrSet |
| A set of pointers, allowing concurrent, lockless queries. More... | |
| class | ConcurrentRangeMap |
| Map from range to payload object, allowing concurrent, lockless reads. More... | |
| class | ConcurrentStrMap |
| Hash map from strings allowing concurrent, lockless reads. More... | |
| class | ConcurrentStrToValMap |
| Hash map from strings to arbitrary objects allowing concurrent, lockless reads. More... | |
| class | ConcurrentToValMap |
| Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads. More... | |
| class | CRCTable |
| Precomputed tables and constants for the CRC calculation. More... | |
| struct | extrace_init |
| class | FloatCompressor |
| Class implementing a lossy float compression. More... | |
| class | FloatPacker |
| Pack/unpack floating-point data from/to a given number of bits. More... | |
| class | IRangeMapPayloadDeleter |
| Helper to delete payload objects for ConcurrentRangeMap. More... | |
| class | iterator_range |
| Simple range from a pair of iterators. More... | |
| class | LockedPointer |
| A pointer together with a movable lock. More... | |
| class | PackedArray |
| An array of unsigned values of some bit size, packed tightly. More... | |
| class | pointer_list |
| A fast way to store a variable-sized collection of pointers. More... | |
| class | pointer_list_base |
| A fast way to store a variable-sized collection of pointers. More... | |
| class | range_with_at |
| Add at() methods to a range class. More... | |
| class | range_with_conv |
| Add to a range class conversions to containers. More... | |
| class | RedirStderr |
| class | RefCountedPtr |
| Simple smart pointer for Gaudi-style refcounted objects. More... | |
| class | releasing_iterator |
| Adapter to retrieve elements from a unique_ptr iterator via release(). More... | |
| class | reverse_wrapper |
| Adapter for a container-like class to be used in a range-for so as to iterate in the reverse direction. More... | |
| class | Ring |
| A very simple ring buffer. More... | |
| class | SimpleUpdater |
| Simple (non-deleting) Updater implementation. More... | |
| struct | sincos |
| Helper to simultaneously calculate sin and cos of the same angle. More... | |
| class | span |
| Simplified version of the C++20 std::span. More... | |
| struct | vec_fb |
| class | WritableArray |
| Read-write multidimensional array. More... | |
| class | WritableArray< 0 > |
| class | WritableArrayData |
Typedefs | |
| template<class T, size_t Alignment = 1> | |
| using | aligned_vector = std::vector<T, boost::alignment::aligned_allocator<T, Alignment> > |
A std::vector with extra alignment. | |
| template<class T> | |
| using | vec_aligned_vector = aligned_vector<T, 64> |
A std::vector with alignment sufficient for any vector instructions on this platform. | |
| template<class T> | |
| using | CachedUniquePtr = CachedUniquePtrT<const T> |
| template<std::ranges::input_range SPAN, class XFORM> | |
| using | transform_view_with_at |
| Helper to add at() methods to a transform_view. | |
| template<typename T, size_t N> | |
| using | vec = typename vecDetail::vec_typedef<T,N>::type |
| Define a nice alias for the vectorized type. | |
| template<class VEC> | |
| using | vec_type_t = typename vecDetail::vec_type<VEC>::type |
| Define a nice alias for the element type of a vectorized type. | |
| template<class VEC> | |
| using | vec_mask_type_t = typename vecDetail::vec_mask_type<VEC>::type |
| Define a nice alias for the mask type for a vectorized type. | |
| template<typename T, size_t N> | |
| using | ivec = vec_fb<typename boost::int_t<sizeof(T) * 8>::exact, N> |
| typedef float | Arrayelt |
The type of an element of an Array. | |
Enumerations | |
| enum | CacheState : unsigned char { INVALID = 0 , UPDATING = 1 , VALID = 2 } |
| State of the cached value; see below. More... | |
| enum | { CacheLineSize = 64 } |
| While it is possible to determine cache line size at run time (e.g. More... | |
Functions | |
| template<unsigned int N> | |
| std::ostream & | operator<< (std::ostream &s, const Array< N > &a) |
| template<class T> requires std::assignable_from<T&, float> | |
| void | fromArrayrep (const CaloRec::Arrayrep &rep, T &x) |
| Helper to convert from an @x Arrayrep to a scalar type. | |
| template<unsigned int N> | |
| void | fromArrayrep (const CaloRec::Arrayrep &rep, CxxUtils::Array< N > &x) |
Helper to convert from an @x Arrayrep to an Array. | |
| template<class T> | |
| const T * | as_const_ptr (const T *p) |
| Helper for getting a const version of a pointer. | |
| template<class T> | |
| T | atomic_bounded_decrement (std::atomic< T > *a, T bound=0, T decr=1, std::memory_order memorder=std::memory_order_seq_cst) |
| Atomically decrement a value with a lower bound. | |
| template<class T> | |
| T | atomic_fetch_max (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst) |
| Atomically calculate maximum. | |
| template<class T> | |
| T | atomic_fetch_min (std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst) |
| Atomically calculate minimum. | |
| std::string | base64_encode (const unsigned char *, unsigned int) |
| std::vector< unsigned char > | base64_decode (const std::string &) |
| template<class E> | |
| constexpr std::enable_if_t< is_bitmask_v< E >, E & > | set (E &lhs, E rhs) |
| Convenience function to set bits in a class enum bitmask. | |
| template<class E> | |
| constexpr std::enable_if_t< is_bitmask_v< E >, E & > | reset (E &lhs, E rhs) |
| Convenience function to clear bits in a class enum bitmask. | |
| template<class E> | |
| constexpr std::enable_if_t< is_bitmask_v< E >, bool > | test (E lhs, E rhs) |
| Convenience function to test bits in a class enum bitmask. | |
| template<std::integral T> | |
| constexpr T | byteswap (T value) noexcept |
| Reverse the bytes in n. | |
| template<typename T> | |
| bool | close_to_zero (T value, T eps=std::numeric_limits< T >::epsilon()) |
| template<class InputIterator, class OutputIterator, class InputTag, class OutputTag> | |
| OutputIterator | copy_bounded1 (InputIterator begi, InputIterator endi, OutputIterator bego, OutputIterator endo, const InputTag &, const OutputTag &) |
| Copy a range with bounds restriction; generic version. | |
| template<class InputIterator, class OutputIterator> | |
| OutputIterator | copy_bounded1 (InputIterator begi, InputIterator endi, OutputIterator bego, OutputIterator endo, const std::random_access_iterator_tag &, const std::random_access_iterator_tag &) |
| Copy a range with bounds restriction; random_access_iterator version. | |
| template<std::input_iterator InputIterator, std::output_iterator< typename std::iterator_traits< InputIterator >::value_type > OutputIterator> | |
| OutputIterator | copy_bounded (InputIterator begi, InputIterator endi, OutputIterator bego, OutputIterator endo) |
| Copy a range with bounds restriction. | |
| template<class InputRange, class OutputRange> | |
| auto | copy_bounded (const InputRange &input, OutputRange &output) -> decltype(std::begin(output)) |
| Copy a range with bounds restriction. | |
| template<class InputRange, class OutputRange> | |
| auto | copy_bounded (const InputRange &input, OutputRange &&output) -> decltype(std::begin(output)) |
| Copy a range with bounds restriction. | |
| void | deleteCRCTable (CxxUtils::CRCTable *table) |
| Delete a CRCTable object. | |
| std::unique_ptr< CRCTable > | makeCRCTable (uint64_t p, uint64_t initial=0xffffffffffffffff) |
| Initialize CRC tables and constants. | |
| uint64_t | crc64_bytewise (const CRCTable &table, const char *data, size_t data_len) |
| Find the CRC-64 of a string, using a byte-by-byte algorithm. | |
| uint64_t | crc64_bytewise (const char *data, size_t data_len) |
| Find the CRC-64 of a string, using a byte-by-byte algorithm, with the default CRC. | |
| uint64_t | crc64_bytewise (const std::string &s) |
| Find the CRC-64 of a string, using a byte-by-byte algorithm, with the default CRC. | |
| uint64_t | crc64 (const CRCTable &table, const char *data, size_t data_len) |
| Find the CRC-64 of a string,. | |
| uint64_t | crc64 (const char *data, size_t data_len) |
| Find the CRC-64 of a string, with the default CRC. | |
| uint64_t | crc64 (const std::string &s) |
| Find the CRC-64 of a string, using the default polynomial. | |
| uint64_t | crc64addint (uint64_t crc, uint64_t x) |
| Extend a previously-calculated CRC to include an int. | |
| std::string | crc64format (uint64_t crc) |
| Format a CRC-64 as a string. | |
| std::string | crc64digest (const std::string &str) |
| Return a CRC-64 digest of a string. | |
| void | exctrace (const std::exception &e, IOFD fd=IOFD_INVALID) |
| Print out information for the last exception. | |
| uint16_t | le16toh (uint16_t x) |
| uint32_t | le32toh (uint32_t x) |
| uint64_t | le64toh (uint64_t x) |
| uint16_t | get_unaligned16 (const uint8_t *ATH_RESTRICT &p) |
| Read a 2-byte little-endian value from a possibly unaligned pointer. | |
| uint32_t | get_unaligned32 (const uint8_t *ATH_RESTRICT &p) |
| Read a 4-byte little-endian value from a possibly unaligned pointer. | |
| uint64_t | get_unaligned64 (const uint8_t *ATH_RESTRICT &p) |
| Read an 8-byte little-endian value from a possibly unaligned pointer. | |
| float | get_unaligned_float (const uint8_t *ATH_RESTRICT &p) |
| Read a little-endian float value from a possibly unaligned pointer. | |
| double | get_unaligned_double (const uint8_t *ATH_RESTRICT &p) |
| Read a little-endian double value from a possibly unaligned pointer. | |
| template<class T> | |
| T | get_unaligned (const uint8_t *ATH_RESTRICT &p) |
| Define templated versions of the above functions. | |
| template<> | |
| uint8_t | get_unaligned< uint8_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| uint16_t | get_unaligned< uint16_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| uint32_t | get_unaligned< uint32_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| uint64_t | get_unaligned< uint64_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| float | get_unaligned< float > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| double | get_unaligned< double > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| int8_t | get_unaligned< int8_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| int16_t | get_unaligned< int16_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| int32_t | get_unaligned< int32_t > (const uint8_t *ATH_RESTRICT &p) |
| template<> | |
| int64_t | get_unaligned< int64_t > (const uint8_t *ATH_RESTRICT &p) |
| void | hexdump (std::ostream &s, const void *addr, size_t n, size_t offset=0) |
| Make a hex dump of memory. | |
| void | safeHexdump (std::ostream &s, const void *addr, size_t n, size_t offset=0) |
| Make a hex dump of memory, protected against bad reads. | |
| template<class RANGE, class FUNC> | |
| auto | min_transformed_element (RANGE &&r, FUNC &&f) |
| Find the minimum transformed element in a range. | |
| template<class RANGE, class FUNC> | |
| auto | max_transformed_element (RANGE &&r, FUNC &&f) |
| Find the maximum transformed element in a range. | |
| uint32_t | MurmurHash2 (const void *key, int len, uint32_t seed) |
| uint64_t | MurmurHash64A (const void *key, int len, uint64_t seed) |
| uint64_t | MurmurHash64B (const void *key, int len, uint64_t seed) |
| uint32_t | MurmurHash2A (const void *key, int len, uint32_t seed) |
| uint32_t | MurmurHashNeutral2 (const void *key, int len, uint32_t seed) |
| uint32_t | MurmurHashAligned2 (const void *key, int len, uint32_t seed) |
| std::string | normalizeFunctionName (const std::string &fname) |
| Normalize a pretty-printed C++ function name. | |
| template<class T> | |
| constexpr T | ones (unsigned int n) |
| Return a bit mask with the lower n bits set. | |
| template<typename T> | |
| T | wrapToPi (T phi) |
| Wrap angle in radians to [-pi, pi]. | |
| template<typename T> | |
| T | deltaPhi (T phiA, T phiB) |
| Return difference phiA - phiB in range [-pi, pi]. | |
| template<typename T> | |
| T | phiMean (T phiA, T phiB) |
| Calculate average of two angles. | |
| template<typename T> | |
| T | phiBisect (T phiA, T phiB) |
| Bisect (average) the angle spanned by phiA and phiB. | |
| void | prefetchOne (const void *address) |
| Generic prefetch method. | |
| template<size_t N> | |
| void | prefetchN (const void *ptr) |
| Prefetch an N-byte block of memory. | |
| template<typename T> | |
| void | prefetchObj (const T *ptr) |
| Generic prefetch of the object of specific types (sizes). | |
| template<typename Iter> | |
| void | prefetchNext (Iter iter, Iter endIter) |
| Prefetch next object in sequence. | |
| template<typename Iter> | |
| void | prefetchTwo (Iter iter, Iter endIter) |
| Prefetch two objects. | |
| template<class T> | |
| auto | begin (range_with_at< T > &s) |
| template<class T> | |
| auto | begin (const range_with_at< T > &s) |
| template<class T> | |
| auto | end (range_with_at< T > &s) |
| template<class T> | |
| auto | end (const range_with_at< T > &s) |
| template<class T> | |
| auto | begin (range_with_conv< T > &s) |
| template<class T> | |
| auto | begin (const range_with_conv< T > &s) |
| template<class T> | |
| auto | end (range_with_conv< T > &s) |
| template<class T> | |
| auto | end (const range_with_conv< T > &s) |
| template<class CONT, class RANGE> | |
| CONT | to (RANGE &&r) |
| template<class T> | |
| auto | make_reverse_wrapper (T &r) |
Make a reverse_wrapper for a given container-like object. | |
| uint16_t | htole16 (uint16_t x) |
| uint32_t | htole32 (uint32_t x) |
| uint64_t | htole64 (uint64_t x) |
| void | set_unaligned16 (uint8_t *ATH_RESTRICT &p, uint16_t val) |
| Write a 2-byte little-endian value to a possibly unaligned pointer. | |
| void | set_unaligned32 (uint8_t *ATH_RESTRICT &p, uint32_t val) |
| Write a 4-byte little-endian value to a possibly unaligned pointer. | |
| void | set_unaligned64 (uint8_t *ATH_RESTRICT &p, uint64_t val) |
| Write an 8-byte little-endian value to a possibly unaligned pointer. | |
| void | set_unaligned_float (uint8_t *ATH_RESTRICT &p, float val) |
| Write a little-endian float value to a possibly unaligned pointer. | |
| void | set_unaligned_double (uint8_t *ATH_RESTRICT &p, double val) |
| Write a little-endian double value to a possibly unaligned pointer. | |
| template<class T> | |
| void | set_unaligned (uint8_t *ATH_RESTRICT &p, T val) |
| Define templated versions of the above functions. | |
| template<> | |
| void | set_unaligned< uint8_t > (uint8_t *ATH_RESTRICT &p, uint8_t val) |
| template<> | |
| void | set_unaligned< uint16_t > (uint8_t *ATH_RESTRICT &p, uint16_t val) |
| template<> | |
| void | set_unaligned< uint32_t > (uint8_t *ATH_RESTRICT &p, uint32_t val) |
| template<> | |
| void | set_unaligned< uint64_t > (uint8_t *ATH_RESTRICT &p, uint64_t val) |
| template<> | |
| void | set_unaligned< float > (uint8_t *ATH_RESTRICT &p, float f) |
| template<> | |
| void | set_unaligned< double > (uint8_t *ATH_RESTRICT &p, double f) |
| template<> | |
| void | set_unaligned< int8_t > (uint8_t *ATH_RESTRICT &p, int8_t val) |
| template<> | |
| void | set_unaligned< int16_t > (uint8_t *ATH_RESTRICT &p, int16_t val) |
| template<> | |
| void | set_unaligned< int32_t > (uint8_t *ATH_RESTRICT &p, int32_t val) |
| template<> | |
| void | set_unaligned< int64_t > (uint8_t *ATH_RESTRICT &p, int64_t val) |
| template<class T> | |
| span (T *ptr, std::size_t sz) -> span< T > | |
| A couple needed deduction guides. | |
| template<class T> | |
| span (T *beg, T *end) -> span< T > | |
| template<detail::IsContiguousContainer CONTAINER> | |
| auto | make_span (CONTAINER &c) |
| Helper to make a span from a container. | |
| template<class T> | |
| auto | begin (span< T > &s) |
| template<class T> | |
| auto | begin (const span< T > &s) |
| template<class T> | |
| auto | end (span< T > &s) |
| template<class T> | |
| auto | end (const span< T > &s) |
| void | stall () |
| Emit stall instruction for use in a spin loop. | |
| std::string | strformat (const char *fmt,...) |
| return a std::string according to a format fmt and varargs | |
| int | atoi (std::string_view str) |
| Helper functions to unpack numbers decoded in string into integers and doubles The strings are required to contain only digits, a floating point dot, the signs +- or a whitespace Exceptions are thrown otherwise. | |
| double | atof (std::string_view str) |
| Converts a string into a double / float. | |
| std::string_view | eraseWhiteSpaces (std::string_view str) |
| Removes all trailing and starting whitespaces from a string. | |
| std::vector< std::string > | tokenize (const std::string &the_str, std::string_view delimiters) |
| Splits the string into smaller substrings. | |
| std::vector< double > | tokenizeDouble (const std::string &the_str, std::string_view delimiter) |
| std::vector< int > | tokenizeInt (const std::string &the_str, std::string_view delimiter) |
| void | throw_out_of_range (const std::string &what, size_t index, size_t size, const void *obj) |
Throw an out_of_range exception. | |
| void | throw_out_of_range (const char *what, size_t index, size_t size, const void *obj) |
Throw an out_of_range exception. | |
| void | ubsan_suppress (void(*func)()) |
| Helper for suppressing ubsan warnings. | |
| template<class VEC> | |
| ATH_ALWAYS_INLINE constexpr size_t | vec_size () |
| Return the number of elements in a vectorized type. | |
| template<class VEC> | |
| ATH_ALWAYS_INLINE constexpr size_t | vec_size (const VEC &) |
| Return the number of elements in a vectorized type. | |
| template<typename VEC, typename T> | |
| ATH_ALWAYS_INLINE void | vbroadcast (VEC &v, T x) |
| Copy a scalar to each element of a vectorized type. | |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE void | vload (VEC &dst, vec_type_t< VEC > const *src) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE void | vstore (vec_type_t< VEC > *dst, const VEC &src) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE void | vselect (VEC &dst, const VEC &a, const VEC &b, const vec_mask_type_t< VEC > &mask) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE void | vmin (VEC &dst, const VEC &a, const VEC &b) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE void | vmax (VEC &dst, const VEC &a, const VEC &b) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE bool | vany (const VEC &mask) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE bool | vnone (const VEC &mask) |
| template<typename VEC> | |
| ATH_ALWAYS_INLINE bool | vall (const VEC &mask) |
| template<typename VEC1, typename VEC2> | |
| ATH_ALWAYS_INLINE void | vconvert (VEC1 &dst, const VEC2 &src) |
| performs dst is the result of a static cast of each element of src | |
| template<size_t... Indices, typename VEC, typename VEC1> | |
| ATH_ALWAYS_INLINE void | vpermute (VEC1 &dst, const VEC &src) |
| vpermute function. | |
| template<size_t... Indices, typename VEC, typename VEC1> | |
| ATH_ALWAYS_INLINE void | vpermute2 (VEC1 &dst, const VEC &src1, const VEC &src2) |
| vpermute2 function. | |
| template<typename T, size_t N> | |
| ivec< T, N > | operator! (const vec_fb< T, N > &a) |
| Negation. | |
| template<typename T, size_t N> | |
| ivec< T, N > | operator&& (const vec_fb< T, N > &a, const vec_fb< T, N > &b) |
| V1 && V2. | |
| template<typename T, size_t N, class U> | |
| ivec< T, N > | operator&& (U a, const vec_fb< T, N > &b) |
| S && V. | |
| template<typename T, size_t N, class U> | |
| ivec< T, N > | operator&& (const vec_fb< T, N > &a, U b) |
| V && S. | |
| template<typename T, size_t N> | |
| ivec< T, N > | operator|| (const vec_fb< T, N > &a, const vec_fb< T, N > &b) |
| V1 || V2. | |
| void * | xmalloc (size_t size) |
| Trapping version of malloc. | |
| std::string | clean_allocator (std::string f) |
| Clean ‘allocator’ template arguments from the function f. | |
| std::string | munge_string_name (const std::string &str_in) |
| std::string | munge_punct (const std::string &str_in) |
| std::string | do_replace (std::string s, const std::string &pat, const std::string &rep) |
| std::string | munge_names (const std::string &str_in) |
| template<class dType> | |
| void | convertToNumber (std::string_view str, dType &number) |
Variables | |
| constexpr size_t | dynamic_extent = static_cast<size_t>(-1) |
| Used to specify a subrange of indefinite size in subspan(). | |
| template<class T, class U> | |
| constexpr bool | valid_span_type_v = std::is_convertible_v<U(*)[], T(*)[]> |
| Is U* a valid type to use to initialize a span<T>? | |
| const CRCTable | defaultCRCTable (0xad93d23594c935a9) |
| using CxxUtils::aligned_vector = std::vector<T, boost::alignment::aligned_allocator<T, Alignment> > |
A std::vector with extra alignment.
The alignment for the payload will be at least either that required by T or Alignment, whichever is greater.
Definition at line 39 of file aligned_vector.h.
| typedef float CaloRec::Arrayelt |
The type of an element of an Array.
Definition at line 26 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
| using CxxUtils::CachedUniquePtr = CachedUniquePtrT<const T> |
Definition at line 114 of file CachedUniquePtr.h.
| using CxxUtils::ivec = vec_fb<typename boost::int_t<sizeof(T) * 8>::exact, N> |
| using CxxUtils::transform_view_with_at |
Helper to add at() methods to a transform_view.
Definition at line 58 of file range_with_at.h.
| using CxxUtils::vec = typename vecDetail::vec_typedef<T,N>::type |
| using CxxUtils::vec_aligned_vector = aligned_vector<T, 64> |
A std::vector with alignment sufficient for any vector instructions on this platform.
For now, just hard code 64, which is sufficient for a 512-bit vector, the largest supported by any x86 processors. We may want to make this platform-dependent in the future.
Definition at line 51 of file aligned_vector.h.
| using CxxUtils::vec_mask_type_t = typename vecDetail::vec_mask_type<VEC>::type |
| using CxxUtils::vec_type_t = typename vecDetail::vec_type<VEC>::type |
| anonymous enum |
While it is possible to determine cache line size at run time (e.g.
using sysconf(_SC_LEVEL1_DCACHE_LINESIZE) on Linux or sysctlbyname("hw.cachelinesize", ...) on Apple systems) that approach creates more problems: the location that stores cache line size will probably be out of cache when one needs to know it. This is why we use a compile time constant for cache line size. Cache line size is 64 for the current generation of Intel/AMD CPUs.
If an object spans multiple cache lines then prefetching whole object should be done by prefetching at least one address from each of the cache lines that object occupies. How many lines are needed depends on three things: object size, cache line size, and object starting address. If CacheLineSize is lower than the actual line size then more prefetches than necessary will be generated (2, 4, or more per cache line if cache line size is power of 2). This may be somewhat wasteful so this number may need to be adjusted in the far future when all CPUs have wider cache lines.
| Enumerator | |
|---|---|
| CacheLineSize | |
Definition at line 59 of file prefetch.h.
| enum CxxUtils::CacheState : unsigned char |
State of the cached value; see below.
| Enumerator | |
|---|---|
| INVALID | |
| UPDATING | |
| VALID | |
Definition at line 27 of file CachedValue.h.
|
inline |
Helper for getting a const version of a pointer.
| p | Pointer to convert. |
Given T* p, as_const_ptr(p) will return p as a const T*.
This is similar in spirit to std::as_const (which doesn't really do what you might expect for pointers).
Definition at line 32 of file as_const_ptr.h.
| double CxxUtils::atof | ( | std::string_view | str | ) |
Converts a string into a double / float.
Definition at line 91 of file Control/CxxUtils/Root/StringUtils.cxx.
| int CxxUtils::atoi | ( | std::string_view | str | ) |
Helper functions to unpack numbers decoded in string into integers and doubles The strings are required to contain only digits, a floating point dot, the signs +- or a whitespace Exceptions are thrown otherwise.
Converts a string into an integer
Definition at line 85 of file Control/CxxUtils/Root/StringUtils.cxx.
|
inline |
Atomically decrement a value with a lower bound.
| a | Pointer to the atomic value. |
| bound | Lower bound for a. |
| decr | The amount by which to decrement. |
| memorder | Memory ordering. |
Atomically decrement A by DECR, provided the result is not less than BOUND. I.e., the atomic equivalent of:
Returns in any case the original value of the atomic variable.
Definition at line 41 of file atomic_bounded_decrement.h.
|
inline |
Atomically calculate maximum.
| a | Pointer to the atomic value. |
| v | The other value. |
| memorder | Memory ordering. |
Computes max(*a, v) and stores it in *a. Returns the original value of *a.
Definition at line 42 of file atomic_fetch_minmax.h.
|
inline |
Atomically calculate minimum.
| a | Pointer to the atomic value. |
| v | The other value. |
| memorder | Memory ordering. |
Computes min(*a, v) and stores it in *a. Returns the original value of *a.
Definition at line 63 of file atomic_fetch_minmax.h.
| std::vector< unsigned char > CxxUtils::base64_decode | ( | const std::string & | encoded_string | ) |
Definition at line 97 of file base64.cxx.
| std::string CxxUtils::base64_encode | ( | const unsigned char * | bytes_to_encode, |
| unsigned int | in_len ) |
Definition at line 55 of file base64.cxx.
| auto CxxUtils::begin | ( | const range_with_at< T > & | s | ) |
Definition at line 67 of file range_with_at.h.
| auto CxxUtils::begin | ( | const range_with_conv< T > & | s | ) |
Definition at line 61 of file range_with_conv.h.
| auto CxxUtils::begin | ( | const span< T > & | s | ) |
| auto CxxUtils::begin | ( | range_with_at< T > & | s | ) |
Definition at line 65 of file range_with_at.h.
| auto CxxUtils::begin | ( | range_with_conv< T > & | s | ) |
Definition at line 59 of file range_with_conv.h.
| auto CxxUtils::begin | ( | span< T > & | s | ) |
|
constexprnoexcept |
Reverse the bytes in n.
Copied from the example implementation given in https://en.cppreference.com/w/cpp/numeric/byteswap
Definition at line 42 of file byteswap.h.
| std::string CxxUtils::clean_allocator | ( | std::string | f | ) |
Clean ‘allocator’ template arguments from the function f.
| f | Name of the function to clean. |
Definition at line 24 of file normalizeFunctionName.cxx.
| bool CxxUtils::close_to_zero | ( | T | value, |
| T | eps = std::numeric_limits<T>::epsilon() ) |
Definition at line 48 of file close_to_zero.h.
| void CxxUtils::convertToNumber | ( | std::string_view | str, |
| dType & | number ) |
Allow for trailing & leading white spaces
To avoid infinite recursion because of string like '42 24' check that white spaces have been indeed removed
Definition at line 65 of file Control/CxxUtils/Root/StringUtils.cxx.
|
inline |
Copy a range with bounds restriction.
| input | Input range |
| output | Output range |
copy_bounded written in terms of iterator ranges.
We have this as a distinct overload in order to be able to pass a CxxUtils::span temporary as the second argument.
Definition at line 121 of file copy_bounded.h.
|
inline |
Copy a range with bounds restriction.
| input | Input range |
| output | Output range |
copy_bounded written in terms of iterator ranges.
Definition at line 99 of file copy_bounded.h.
|
inline |
Copy a range with bounds restriction.
| begi | Start of input range. |
| endi | End of input range. |
| bego | Start of output range. |
| endo | End of output range. |
Like std::copy(begi, endi, bego), except that it will not copy more than std::distance(bego, endo) elements.
Copies exactly n = std::min (std::distance(begi,endi), std::distance(bego,endo)) elements. Returns bego + n.
Definition at line 79 of file copy_bounded.h.
|
inline |
Copy a range with bounds restriction; generic version.
Definition at line 31 of file copy_bounded.h.
|
inline |
Copy a range with bounds restriction; random_access_iterator version.
Definition at line 51 of file copy_bounded.h.
| uint64_t CxxUtils::crc64 | ( | const char * | data, |
| size_t | data_len ) |
Find the CRC-64 of a string, with the default CRC.
| data | Pointer to the string to hash. |
| data_len | Length of the string to hash, in bytes. |
Definition at line 709 of file crc64.cxx.
| uint64_t CxxUtils::crc64 | ( | const CRCTable & | table, |
| const char * | data, | ||
| size_t | data_len ) |
Find the CRC-64 of a string,.
| table | Precomputed CRC tables and constants. |
| data | Pointer to the string to hash. |
| data_len | Length of the string to hash, in bytes. |
This is the default implementation, used on platforms without pclmul.
Definition at line 696 of file crc64.cxx.
| uint64_t CxxUtils::crc64 | ( | const std::string & | s | ) |
Find the CRC-64 of a string, using the default polynomial.
| str | The string to hash. |
| uint64_t CxxUtils::crc64_bytewise | ( | const char * | data, |
| size_t | data_len ) |
Find the CRC-64 of a string, using a byte-by-byte algorithm, with the default CRC.
| table | Precomputed CRC tables and constants. |
| data | Pointer to the string to hash. |
| data_len | Length of the string to hash, in bytes. |
| uint64_t CxxUtils::crc64_bytewise | ( | const CRCTable & | table, |
| const char * | data, | ||
| size_t | data_len ) |
Find the CRC-64 of a string, using a byte-by-byte algorithm.
| table | Precomputed CRC tables and constants. |
| data | Pointer to the string to hash. |
| data_len | Length of the string to hash, in bytes. |
Definition at line 560 of file crc64.cxx.
| uint64_t CxxUtils::crc64_bytewise | ( | const std::string & | s | ) |
Find the CRC-64 of a string, using a byte-by-byte algorithm, with the default CRC.
| table | Precomputed CRC tables and constants. |
| s | String to hash. |
| uint64_t CxxUtils::crc64addint | ( | uint64_t | crc, |
| uint64_t | x ) |
| std::string CxxUtils::crc64digest | ( | const std::string & | str | ) |
Return a CRC-64 digest of a string.
| str | The string to hash. |
| std::string CxxUtils::crc64format | ( | uint64_t | crc | ) |
| void CxxUtils::deleteCRCTable | ( | CxxUtils::CRCTable * | table | ) |
|
inline |
Return difference phiA - phiB in range [-pi, pi].
Definition at line 42 of file phihelper.h.
| std::string CxxUtils::do_replace | ( | std::string | s, |
| const std::string & | pat, | ||
| const std::string & | rep ) |
Definition at line 95 of file normalizeFunctionName.cxx.
| auto CxxUtils::end | ( | const range_with_at< T > & | s | ) |
Definition at line 71 of file range_with_at.h.
| auto CxxUtils::end | ( | const range_with_conv< T > & | s | ) |
Definition at line 65 of file range_with_conv.h.
| auto CxxUtils::end | ( | const span< T > & | s | ) |
| auto CxxUtils::end | ( | range_with_at< T > & | s | ) |
Definition at line 69 of file range_with_at.h.
| auto CxxUtils::end | ( | range_with_conv< T > & | s | ) |
Definition at line 63 of file range_with_conv.h.
| auto CxxUtils::end | ( | span< T > & | s | ) |
| std::string_view CxxUtils::eraseWhiteSpaces | ( | std::string_view | str | ) |
Removes all trailing and starting whitespaces from a string.
Definition at line 44 of file Control/CxxUtils/Root/StringUtils.cxx.
| void CxxUtils::exctrace | ( | const std::exception & | e, |
| IOFD | fd = IOFD_INVALID ) |
Print out information for the last exception.
Prints the supplied exception, plus the backtrace from the last exception, if available.
| e | The exception to print. |
| fd | The file descriptor to which to write. |
Definition at line 59 of file exctrace.cxx.
| void CxxUtils::fromArrayrep | ( | const CaloRec::Arrayrep & | rep, |
| CxxUtils::Array< N > & | x ) |
| void CxxUtils::fromArrayrep | ( | const CaloRec::Arrayrep & | rep, |
| T & | x ) |
| T CxxUtils::get_unaligned | ( | const uint8_t *ATH_RESTRICT & | p | ) |
Define templated versions of the above functions.
|
inline |
Read a 2-byte little-endian value from a possibly unaligned pointer.
| p | Pointer from which to read. Advanced to the next value. |
Reads a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 63 of file get_unaligned.h.
|
inline |
Read a 4-byte little-endian value from a possibly unaligned pointer.
| p | Pointer from which to read. Advanced to the next value. |
Reads a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 83 of file get_unaligned.h.
|
inline |
Read an 8-byte little-endian value from a possibly unaligned pointer.
| p | Pointer from which to read. Advanced to the next value. |
Reads a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 103 of file get_unaligned.h.
|
inline |
Definition at line 195 of file get_unaligned.h.
|
inline |
Definition at line 187 of file get_unaligned.h.
|
inline |
Definition at line 211 of file get_unaligned.h.
|
inline |
Definition at line 219 of file get_unaligned.h.
|
inline |
Definition at line 227 of file get_unaligned.h.
|
inline |
Definition at line 203 of file get_unaligned.h.
|
inline |
Definition at line 163 of file get_unaligned.h.
|
inline |
Definition at line 171 of file get_unaligned.h.
|
inline |
Definition at line 179 of file get_unaligned.h.
|
inline |
Definition at line 155 of file get_unaligned.h.
|
inline |
Read a little-endian double value from a possibly unaligned pointer.
| p | Pointer from which to read. Advanced to the next value. |
Reads a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 140 of file get_unaligned.h.
|
inline |
Read a little-endian float value from a possibly unaligned pointer.
| p | Pointer from which to read. Advanced to the next value. |
Reads a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 123 of file get_unaligned.h.
| void CxxUtils::hexdump | ( | std::ostream & | s, |
| const void * | addr, | ||
| size_t | n, | ||
| size_t | offset = 0 ) |
Make a hex dump of memory.
| s | Stream to which to write the output. |
| addr | Address at which to start dumping. |
| n | Number of byte to dump. |
| offset | Offset by which to shift the printed address (mostly for testing). |
Definition at line 37 of file hexdump.cxx.
|
inline |
Definition at line 42 of file set_unaligned.h.
|
inline |
Definition at line 43 of file set_unaligned.h.
|
inline |
Definition at line 44 of file set_unaligned.h.
|
inline |
Definition at line 42 of file get_unaligned.h.
|
inline |
Definition at line 43 of file get_unaligned.h.
|
inline |
Definition at line 44 of file get_unaligned.h.
| auto CxxUtils::make_reverse_wrapper | ( | T & | r | ) |
Make a reverse_wrapper for a given container-like object.
Definition at line 46 of file reverse_wrapper.h.
| auto CxxUtils::make_span | ( | CONTAINER & | c | ) |
| std::unique_ptr< CRCTable > CxxUtils::makeCRCTable | ( | uint64_t | p, |
| uint64_t | initial = 0xffffffffffffffff ) |
|
inline |
Find the maximum transformed element in a range.
| r | Input range. |
| f | Transform function. |
Evaluates f(x) for each x in r and finds the maximum. Returns a pair (fmax, itmax), where fmax is this maximum value, and itmax is an iterator pointing at the corresponding element in r. If more than one element has the same maximum value, the iterator of the first will be returned.
Precondition: Range r is not empty.
Definition at line 82 of file minmax_transformed_element.h.
|
inline |
Find the minimum transformed element in a range.
| r | Input range. |
| f | Transform function. |
Evaluates f(x) for each x in r and finds the minimum. Returns a pair (fmin, itmin), where fmin is this minimum value, and itmin is an iterator pointing at the corresponding element in r. If more than one element has the same minimum value, the iterator of the first will be returned.
Precondition: Range r is not empty.
Definition at line 50 of file minmax_transformed_element.h.
| std::string CxxUtils::munge_names | ( | const std::string & | str_in | ) |
Definition at line 106 of file normalizeFunctionName.cxx.
| std::string CxxUtils::munge_punct | ( | const std::string & | str_in | ) |
Definition at line 84 of file normalizeFunctionName.cxx.
| std::string CxxUtils::munge_string_name | ( | const std::string & | str_in | ) |
Definition at line 54 of file normalizeFunctionName.cxx.
| uint32_t CxxUtils::MurmurHash2 | ( | const void * | key, |
| int | len, | ||
| uint32_t | seed ) |
Definition at line 42 of file MurmurHash2.cxx.
| uint32_t CxxUtils::MurmurHash2A | ( | const void * | key, |
| int | len, | ||
| uint32_t | seed ) |
Definition at line 220 of file MurmurHash2.cxx.
| uint64_t CxxUtils::MurmurHash64A | ( | const void * | key, |
| int | len, | ||
| uint64_t | seed ) |
Definition at line 103 of file MurmurHash2.cxx.
| uint64_t CxxUtils::MurmurHash64B | ( | const void * | key, |
| int | len, | ||
| uint64_t | seed ) |
Definition at line 155 of file MurmurHash2.cxx.
| uint32_t CxxUtils::MurmurHashAligned2 | ( | const void * | key, |
| int | len, | ||
| uint32_t | seed ) |
Definition at line 324 of file MurmurHash2.cxx.
| uint32_t CxxUtils::MurmurHashNeutral2 | ( | const void * | key, |
| int | len, | ||
| uint32_t | seed ) |
Definition at line 267 of file MurmurHash2.cxx.
| std::string CxxUtils::normalizeFunctionName | ( | const std::string & | fname | ) |
Normalize a pretty-printed C++ function name.
| fname | The name to normalize. |
A C++ compiler can provide a complete printable name of the current function, though for example PRETTY_FUNCTION. This is useful to include in diagnostic messages. However, the exact string generated by different compilers may differ slightly. This can then cause issues if one is trying to compare the output of tests to an expected reference.
This function tries to normalize the function name strings so that they are the same, at least between gcc and clang.
Definition at line 135 of file normalizeFunctionName.cxx.
|
inlineconstexpr |
Negation.
Definition at line 158 of file vec_fb.h.
|
inline |
V1 && V2.
Definition at line 169 of file vec_fb.h.
|
inline |
V && S.
Definition at line 191 of file vec_fb.h.
|
inline |
S && V.
Definition at line 180 of file vec_fb.h.
| std::ostream & CxxUtils::operator<< | ( | std::ostream & | s, |
| const Array< N > & | a ) |
|
inline |
V1 || V2.
Definition at line 202 of file vec_fb.h.
|
inline |
Bisect (average) the angle spanned by phiA and phiB.
The average is calculated by rotating phiA half-way counter-clockwise onto phiB. Note that his method is not symmetric in its arguments. Typical use-cases are to determine the centre of a region in the detector.
The returned value is within the range [-pi, pi].
Definition at line 77 of file phihelper.h.
|
inline |
Calculate average of two angles.
The average is calculated as the angle of the sum of the two unit vectors with angles phiA and phiB. As such it always returns the angle in the narrower of the two complimentary regions spanned by phiA and phiB. If the vector sum is zero, return the angle within [-pi/2, pi/2]. This method is symmetric in its arguments except if |mean| equals pi.
The returned value is within the range [-pi, pi].
Definition at line 60 of file phihelper.h.
|
inline |
Prefetch an N-byte block of memory.
| [in] | ptr | Starting address of the block. |
Definition at line 85 of file prefetch.h.
|
inline |
Prefetch next object in sequence.
| iter | Current iteration position. |
| endIter | End of the sequence. |
Iter is a ForwardIterator over pointers.
Prefetches next object in a collection of pointers. Accepts two iterators: the first iterator is the current iteration position, and the second iterator is the end iterator for the whole sequence. The first iterator must not be equal to the end iterator (this is not checked). This increments the iterator and, if not equal to the end, prefetches the complete object referenced by the pointer.
Definition at line 130 of file prefetch.h.
|
inline |
Generic prefetch of the object of specific types (sizes).
| [in] | address | memory location to prefetch |
This method will prefetch as many cache lines as needed to store the object of the specified type in memory. Type is specified as a template argument.
Definition at line 108 of file prefetch.h.
|
inline |
Generic prefetch method.
| [in] | address | memory location to prefetch |
This is generic method that does not have any extra behavior. It only prefetches the whole cache line which contains the specified memory location. It does not incur any additional overhead and may be the most efficient method for small objects which have a high chance of being on just a single cache line.
Definition at line 73 of file prefetch.h.
|
inline |
Prefetch two objects.
| iter | Current iteration position. |
| endIter | End of the sequence. |
Iter is a ForwardIterator over pointers.
Prefetches the current and next objects in a collection of pointers. Accepts two iterators: the first iterator is the current iteration position, and the second is the end iterator for the whole sequence. If the first iterator is not equal to end the iterator, the object to which it points is prefetched. Then the iterator is incremented and, if not equal to the end iterator, the next objects is also prefetched.
Definition at line 154 of file prefetch.h.
|
constexpr |
| void CxxUtils::safeHexdump | ( | std::ostream & | s, |
| const void * | addr, | ||
| size_t | n, | ||
| size_t | offset = 0 ) |
Make a hex dump of memory, protected against bad reads.
| s | Stream to which to write the output. |
| addr | Address at which to start dumping. |
| n | Number of byte to dump. |
| offset | Offset by which to shift the printed address (mostly for testing). |
This function will skip dumping memory pages that are not readable. It may also start dumping slightly before the requested address, in order to start with an alignment of 16.
Definition at line 104 of file hexdump.cxx.
|
constexpr |
| void CxxUtils::set_unaligned | ( | uint8_t *ATH_RESTRICT & | p, |
| T | val ) |
Define templated versions of the above functions.
|
inline |
Write a 2-byte little-endian value to a possibly unaligned pointer.
| p | Pointer to which to write. Advanced to the next value. |
| val | Value to write. |
Writes a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 64 of file set_unaligned.h.
|
inline |
Write a 4-byte little-endian value to a possibly unaligned pointer.
| p | Pointer to which to write. Advanced to the next value. |
| val | Value to write. |
Writes a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 84 of file set_unaligned.h.
|
inline |
Write an 8-byte little-endian value to a possibly unaligned pointer.
| p | Pointer to which to write. Advanced to the next value. |
| val | Value to write. |
Writes a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 104 of file set_unaligned.h.
|
inline |
Definition at line 197 of file set_unaligned.h.
|
inline |
Definition at line 189 of file set_unaligned.h.
|
inline |
Definition at line 213 of file set_unaligned.h.
|
inline |
Definition at line 221 of file set_unaligned.h.
|
inline |
Definition at line 229 of file set_unaligned.h.
|
inline |
Definition at line 205 of file set_unaligned.h.
|
inline |
Definition at line 165 of file set_unaligned.h.
|
inline |
Definition at line 173 of file set_unaligned.h.
|
inline |
Definition at line 181 of file set_unaligned.h.
|
inline |
Definition at line 157 of file set_unaligned.h.
|
inline |
Write a little-endian double value to a possibly unaligned pointer.
| p | Pointer to which to write. Advanced to the next value. |
| val | Value to write. |
Writes a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 142 of file set_unaligned.h.
|
inline |
Write a little-endian float value to a possibly unaligned pointer.
| p | Pointer to which to write. Advanced to the next value. |
| val | Value to write. |
Writes a little-endian value, regardless of the host byte ordering, and advances the pointer. Should not rely on undefined behavior, regardless of the alignment of p.
If used in a loop, you'll get better code with a restricted pointer.
Definition at line 124 of file set_unaligned.h.
| CxxUtils::span | ( | T * | beg, |
| T * | end ) -> span< T > |
| CxxUtils::span | ( | T * | ptr, |
| std::size_t | sz ) -> span< T > |
A couple needed deduction guides.
|
inline |
Emit stall instruction for use in a spin loop.
For best performance of a spin loop (as used for a spinlock or other MT consistency operations), Intel recommends adding a ‘pause’ instruction within the loop on x86(_64) targets. This function provides a portable way of doing this.
Currently a no-op for anything other than x86(_64) + arm. Support for other architectures can be added if it is useful.
Definition at line 37 of file stall.h.
| std::string CxxUtils::strformat | ( | const char * | fmt, |
| ... ) |
return a std::string according to a format fmt and varargs
Definition at line 49 of file StrFormat.cxx.
|
constexpr |
Convenience function to test bits in a class enum bitmask.
| lhs | Target bitmask. |
| rhs | Bits to test. |
Same as (lhs & rhs) != 0. This function is enabled only for enumerators that have used the ATH_BITMASK macro.
Definition at line 270 of file bitmask.h.
| void CxxUtils::throw_out_of_range | ( | const char * | what, |
| size_t | index, | ||
| size_t | size, | ||
| const void * | obj ) |
Throw an out_of_range exception.
| what | Description of the error. |
| index | The index that was out of range. |
| size | The size of the container. |
| obj | Pointer to the container (or other relevant object). |
Definition at line 43 of file throw_out_of_range.cxx.
| void CxxUtils::throw_out_of_range | ( | const std::string & | what, |
| size_t | index, | ||
| size_t | size, | ||
| const void * | obj ) |
Throw an out_of_range exception.
| what | Description of the error. |
| index | The index that was out of range. |
| size | The size of the container. |
| obj | Pointer to the container (or other relevant object). |
Definition at line 27 of file throw_out_of_range.cxx.
| CONT CxxUtils::to | ( | RANGE && | r | ) |
| std::vector< std::string > CxxUtils::tokenize | ( | const std::string & | the_str, |
| std::string_view | delimiters ) |
Splits the string into smaller substrings.
Definition at line 15 of file Control/CxxUtils/Root/StringUtils.cxx.
| std::vector< double > CxxUtils::tokenizeDouble | ( | const std::string & | the_str, |
| std::string_view | delimiter ) |
Definition at line 34 of file Control/CxxUtils/Root/StringUtils.cxx.
| std::vector< int > CxxUtils::tokenizeInt | ( | const std::string & | the_str, |
| std::string_view | delimiter ) |
Definition at line 55 of file Control/CxxUtils/Root/StringUtils.cxx.
| void CxxUtils::ubsan_suppress | ( | void(* | func )() | ) |
Helper for suppressing ubsan warnings.
| func | Function to call (may be a lambda). |
If ubsan is running, temporarily redirect stderr to /dev/null. Then call func.
For example, we sometimes get a bogus ubsan warning from cling initialization. This can be suppressed by adding something like:
Definition at line 69 of file ubsan_suppress.cxx.
| ATH_ALWAYS_INLINE bool CxxUtils::vall | ( | const VEC & | mask | ) |
Definition at line 402 of file vec.h.
| ATH_ALWAYS_INLINE bool CxxUtils::vany | ( | const VEC & | mask | ) |
| ATH_ALWAYS_INLINE void CxxUtils::vbroadcast | ( | VEC & | v, |
| T | x ) |
Copy a scalar to each element of a vectorized type.
Definition at line 251 of file vec.h.
| ATH_ALWAYS_INLINE void CxxUtils::vconvert | ( | VEC1 & | dst, |
| const VEC2 & | src ) |
performs dst is the result of a static cast of each element of src
Definition at line 428 of file vec.h.
|
constexpr |
Return the number of elements in a vectorized type.
|
constexpr |
Return the number of elements in a vectorized type.
| ATH_ALWAYS_INLINE void CxxUtils::vload | ( | VEC & | dst, |
| vec_type_t< VEC > const * | src ) |
| ATH_ALWAYS_INLINE void CxxUtils::vmax | ( | VEC & | dst, |
| const VEC & | a, | ||
| const VEC & | b ) |
| ATH_ALWAYS_INLINE void CxxUtils::vmin | ( | VEC & | dst, |
| const VEC & | a, | ||
| const VEC & | b ) |
| ATH_ALWAYS_INLINE bool CxxUtils::vnone | ( | const VEC & | mask | ) |
| ATH_ALWAYS_INLINE void CxxUtils::vpermute | ( | VEC1 & | dst, |
| const VEC & | src ) |
vpermute function.
move any element of a vector src into any or multiple position inside dst.
Definition at line 451 of file vec.h.
| ATH_ALWAYS_INLINE void CxxUtils::vpermute2 | ( | VEC1 & | dst, |
| const VEC & | src1, | ||
| const VEC & | src2 ) |
vpermute2 function.
move any element of the vectors src1, src2 into any or multiple position inside dst.
Definition at line 476 of file vec.h.
| ATH_ALWAYS_INLINE void CxxUtils::vselect | ( | VEC & | dst, |
| const VEC & | a, | ||
| const VEC & | b, | ||
| const vec_mask_type_t< VEC > & | mask ) |
| ATH_ALWAYS_INLINE void CxxUtils::vstore | ( | vec_type_t< VEC > * | dst, |
| const VEC & | src ) |
|
inline |
Wrap angle in radians to [-pi, pi].
Odd positive (negative) multiples of pi map to (-)pi.
Definition at line 24 of file phihelper.h.
| void * CxxUtils::xmalloc | ( | size_t | size | ) |
Trapping version of malloc.
| size | Number of bytes to allocate. |
Calls malloc. Throws a std::bad_alloc exception on failure.
If you're writing new code, you probably don't want to use this! Use make_unique/new or STL containers instead. This is intended for compatiblilty with existing code requiring malloc/free.
Definition at line 31 of file xmalloc.cxx.
| const CRCTable CxxUtils::defaultCRCTable(0xad93d23594c935a9) | ( | 0xad93d23594c935a9 | ) |
|
inlineconstexpr |