This chapter represents documentation about basic elements. More...
Topics | |
| Iterators | |
| simple alternative to boost/iterator_range | |
Namespaces | |
| namespace | MR::BitSetParallel |
Classes | |
| class | MR::SetBitIteratorT< T > |
| iterator to enumerate all indices with set bits in BitSet class or its derivatives More... | |
| class | MR::BitSet |
| class | MR::TypedBitSet< I > |
| struct | MR::IdRange< Id > |
| range of indices [beg, end) More... | |
| class | MR::Buffer< V, I > |
| std::vector<V>-like container that is 1) resized without initialization of its elements, 2) much simplified: no push_back and many other methods More... | |
| class | MR::Heap< T, I, P > |
| stores map from element id in[0, size) to T; More... | |
| class | MR::Logger |
| Make default spd logger. More... | |
| class | MR::LoggingStreambuf |
| A custom streambuf that outputs things directly to the default spdlog logger. More... | |
| class | MR::RestoringStreamsSink |
| class | MR::Timer |
| struct | MR::SimpleTimeRecord |
| struct | MR::TimeRecord |
| struct | MR::ThreadRootTimeRecord |
| class | MR::BaseUnionFind< I > |
| base of union-find data structures: stores only the parent forest and the operations that depend on it alone, so it is shared by the sequential UnionFind and the ParallelUnionFind More... | |
| class | MR::UnionFind< I > |
| Union-find data structure for representing disjoint sets of elements with few very quick operations: 1) union of two sets in one, 2) checking whether two elements pertain to the same set, 3) finding representative element (root) of each set by any set's element. Sequential implementation that selects the root of a united pair by set size for best performance. More... | |
| class | MR::ParallelUnionFind< I > |
| Union-find that supports lock-free concurrent construction via uniteAtomic(). It links by element id (the smaller id becomes the set root), which keeps the forest acyclic without locks; consequently it does not maintain set sizes (use BaseUnionFind::roots() to read the result). More... | |
| class | MR::Vector< T, I > |
| Vector<T> is indexed by size_t. More... | |
Functions | |
| size_t | MR::countSetBits (const BitSet::block_type *blocks, size_t numBlocks) noexcept |
| returns the number of set bits in given blocks; uses the popcnt instruction on x86-64 CPUs having it | |
| size_t | MR::heapBytes (const BitSet &bs) |
| returns the amount of memory given BitSet occupies on heap | |
| bool | MR::operator== (const BitSet &a, const BitSet &b) |
| compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off) | |
| template<typename I> | |
| bool | MR::operator== (const TypedBitSet< I > &a, const TypedBitSet< I > &b) |
| template<typename T, typename U> | |
| void | MR::operator== (const TypedBitSet< T > &a, const TypedBitSet< U > &b)=delete |
| prohibit comparison of unrelated sets | |
| template<typename I> | |
| std::function< bool(I)> | MR::makePredicate (const TypedBitSet< I > *bitset) |
| template<typename I> | |
| std::function< bool(I)> | MR::makePredicate (const TypedBitSet< I > &bitset) |
| template<typename I> | |
| bool | MR::contains (const TypedBitSet< I > *bitset, I id) |
| template<typename I> | |
| bool | MR::contains (const TypedBitSet< I > &bitset, I id) |
| template<typename I> | |
| void | MR::fillVectorWithSeqNums (const TypedBitSet< I > &bs, Vector< int, I > &vec) |
| for each set bit of input bitset, writes its sequential number starting from 0 in the given vector that shall have appropriate size | |
| template<typename I> | |
| Vector< int, I > | MR::makeVectorWithSeqNums (const TypedBitSet< I > &bs) |
| creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits | |
| template<typename I> | |
| Vector< I > | MR::listSetBits (const TypedBitSet< I > &bs) |
| returns the ids of all set bits in increasing order, i.e. the inverse of makeVectorWithSeqNums(...) | |
| HashMap< size_t, size_t > | MR::makeHashMapWithSeqNums (const BitSet &bs) |
| creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned | |
| template<typename I> | |
| HashMap< I, int > | MR::makeHashMapWithSeqNums (const TypedBitSet< I > &bs) |
| creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned | |
| BitSet | MR::operator& (const BitSet &a, const BitSet &b) |
| BitSet | MR::operator| (const BitSet &a, const BitSet &b) |
| BitSet | MR::operator^ (const BitSet &a, const BitSet &b) |
| BitSet | MR::operator- (const BitSet &a, const BitSet &b) |
| BitSet | MR::operator& (BitSet &&a, const BitSet &b) |
| BitSet | MR::operator| (BitSet &&a, const BitSet &b) |
| BitSet | MR::operator^ (BitSet &&a, const BitSet &b) |
| BitSet | MR::operator- (BitSet &&a, const BitSet &b) |
| BitSet | MR::operator& (const BitSet &a, BitSet &&b) |
| BitSet | MR::operator| (const BitSet &a, BitSet &&b) |
| BitSet | MR::operator^ (const BitSet &a, BitSet &&b) |
| BitSet | MR::operator& (BitSet &&a, BitSet &&b) |
| BitSet | MR::operator| (BitSet &&a, BitSet &&b) |
| BitSet | MR::operator^ (BitSet &&a, BitSet &&b) |
| template<typename BS, typename ... F> | |
| auto | MR::BitSetParallelForAllRanged (const BS &bs, F &&... f) |
| template<typename BS, typename L, typename ... F> | |
| auto | MR::BitSetParallelForAllRanged (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&... f) |
| template<typename BS, typename F, typename ... Cb> | |
| auto | MR::BitSetParallelForAll (const BS &bs, F &&f, Cb &&... cb) |
| template<typename BS, typename F> | |
| void | MR::BitSetParallelForAll (const BS &bs, F &&f, tbb::task_group_context &tgc) |
| template<typename BS, typename L, typename F, typename ... Cb> | |
| auto | MR::BitSetParallelForAll (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb) |
| template<typename BS, typename F, typename ... Cb> | |
| auto | MR::BitSetParallelFor (const BS &bs, F &&f, Cb &&... cb) |
| template<typename BS, typename F> | |
| void | MR::BitSetParallelFor (const BS &bs, F &&f, tbb::task_group_context &tgc) |
| template<typename BS, typename L, typename F, typename ... Cb> | |
| auto | MR::BitSetParallelFor (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb) |
| template<typename In, typename Res, typename Visit> | |
| void | MR::BitSetWalk (const In &input, Res &res, bool parallel, Visit &&visit) |
| template<typename T> | |
| size_t | MR::heapBytes (const std::vector< T > &vec) |
| returns the amount of memory given vector occupies on heap | |
| template<typename T, typename U> | |
| size_t | MR::heapBytes (const Vector< T, U > &vec) |
| template<typename T> | |
| size_t | MR::heapBytes (const std::unique_ptr< T > &ptr) |
| returns the amount of memory this smart pointer and its pointed object own together on heap | |
| template<typename T> | |
| size_t | MR::heapBytes (const std::shared_ptr< T > &ptr) |
| returns the amount of memory this smart pointer and its pointed object own together on heap | |
| template<typename T> | |
| size_t | MR::heapBytes (const std::function< T > &) |
| template<typename ... Ts> | |
| size_t | MR::heapBytes (const phmap::flat_hash_map< Ts... > &hashMap) |
| returns the amount of memory given HashMap occupies on heap | |
| void | MR::parallelFor (size_t begin, size_t end, FunctionRef< void(size_t)> f) |
| void | MR::parallelFor (size_t begin, size_t end, FunctionRef< void(size_t)> f, tbb::task_group_context &tgc) |
| void | MR::parallelFor (size_t begin, size_t end, FunctionRef< void(size_t, void *)> f, FunctionRef< void *()> ctx) |
| bool | MR::parallelFor (size_t begin, size_t end, FunctionRef< void(size_t, void *)> f, FunctionRef< void *()> ctx, const ProgressCallback &cb, size_t reportProgressEvery=1024) |
| template<typename I, typename F, typename ... Cb> | |
| auto | MR::ParallelFor (I begin, I end, F &&f, Cb &&... cb) |
| template<typename I, typename F> | |
| void | MR::ParallelFor (I begin, I end, F &&f, tbb::task_group_context &tgc) |
| template<typename I, typename L, typename F, typename ... Cb> | |
| auto | MR::ParallelFor (I begin, I end, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb) |
| template<typename T, typename ... F> | |
| auto | MR::ParallelFor (const std::vector< T > &v, F &&... f) |
| template<typename T, typename I, typename ... F> | |
| auto | MR::ParallelFor (const Vector< T, I > &v, F &&... f) |
| template<typename T, typename I, typename ... F> | |
| auto | MR::ParallelFor (const Buffer< T, I > &buf, F &&... f) |
| void | MR::vertMapsComposition (VertMap &a2b, const VertMap &b2c) |
| updates a2b map to a2c map using b2c map | |
| VertMap | MR::vertMapsComposition (const VertMap &a2b, const VertMap &b2c) |
| returns map a2c from a2b and b2c maps | |
| void | MR::edgeMapsComposition (EdgeMap &a2b, const EdgeMap &b2c) |
| updates a2b map to a2c map using b2c map | |
| EdgeMap | MR::edgeMapsComposition (const EdgeMap &a2b, const EdgeMap &b2c) |
| returns map a2c from a2b and b2c maps | |
| void | MR::faceMapsComposition (FaceMap &a2b, const FaceMap &b2c) |
| updates a2b map to a2c map using b2c map | |
| FaceMap | MR::faceMapsComposition (const FaceMap &a2b, const FaceMap &b2c) |
| returns map a2c from a2b and b2c maps | |
| void | MR::redirectSTDStreamsToLogger () |
| size_t | MR::findSubstringCaseInsensitive (const std::string &string, const std::string &substring) |
| int | MR::calcDamerauLevenshteinDistance (const std::string &stringA, const std::string &stringB, bool caseSensitive=true, int *outLeftRightAddition=nullptr) |
| char32_t | MR::caseFold (char32_t ch) |
| int | MR::calcDamerauLevenshteinDistance (const std::u32string &stringA, const std::u32string &stringB, bool caseSensitive=true, int *outLeftRightAddition=nullptr) |
| std::vector< std::string > | MR::split (const std::string &string, const std::string &delimiter) |
| std::wstring | MR::utf8ToWide (const char *utf8) |
| converts UTF8-encoded string into UTF16-encoded string | |
| std::string | MR::systemToUtf8 (const std::string &system) |
| converts system encoded string to UTF8-encoded string | |
| std::string | MR::utf8ToSystem (const std::string &utf8) |
| std::string | MR::wideToUtf8 (const wchar_t *wide) |
| converts wide null terminating string to UTF8-encoded string | |
| const std::string & | MR::asString (const std::string &s) |
| const std::string & | MR::asU8String (const std::string &s) |
| std::string | MR::asString (std::string &&s) |
| std::string | MR::asU8String (std::string &&s) |
| std::filesystem::path | MR::pathFromUtf8 (const std::string &s) |
| std::filesystem::path | MR::pathFromUtf8 (const char *s) |
| std::string | MR::utf8string (const std::filesystem::path &path) |
| returns filename as UTF8-encoded string | |
| std::string | MR::utf8string (const std::string &)=delete |
| it is a mistake to call the function with implicit construction of path from string | |
| std::string | MR::utf8substr (const char *s, size_t pos, size_t count) |
| std::pair< char32_t, size_t > | MR::utf8ToCodepoint (const char *s, size_t size) |
| std::u32string | MR::utf8ToUtf32 (std::string_view str) |
| Converts the given UTF-8 encoded string to a UTF-32 encoded string. | |
| void | MR::appendUtf8 (std::string &str, char32_t cp) |
| std::string | MR::utf32ToUtf8 (std::u32string_view str) |
| Converts the given UTF-32 encoded string to a UTF-8 encoded string. | |
| std::string | MR::bytesString (size_t size) |
| bool | MR::isProhibitedChar (char c) |
| bool | MR::hasProhibitedChars (const std::string &line) |
| returns true if line contains at least one character (c) for which isProhibitedChar(c)==true | |
| std::string | MR::replaceProhibitedChars (const std::string &line, char replacement='_') |
| replace all characters (c), where isProhibitedChar(c)==true, with replacement char | |
| template<typename T> | |
| Expected< T > | MR::addFileNameInError (Expected< T > v, const std::filesystem::path &file) |
| if (v) contains an error, then appends given file name to that error | |
| std::string | MR::commonFilesName (const std::vector< std::filesystem::path > &files) |
| char * | MR::formatNoTrailingZeros (char *fmt, double v, int digitsAfterPoint, int precision=6) |
| double | MR::roundToPrecision (double v, int precision) |
| returns given value rounded to given number of decimal digits | |
| float | MR::roundToPrecision (float v, int precision) |
| returns given value rounded to given number of decimal digits | |
| std::string | MR::getCancelMessage (const std::filesystem::path &path) |
| Returns message showed when loading is canceled. | |
| char | MR::toLower (char ch) |
| char32_t | MR::toLower (char32_t ch) |
| convert an alphabetic ASCII codepoint to lower-case, other codepoints are returned unchanged | |
| std::string | MR::toLower (std::string str) |
| return a copy of the string with all alphabetic ASCII characters replaced with lower-case variants | |
| void | MR::printTimingTreeAtEnd (bool on, double minTimeSec=0.1) |
| void | MR::printCurrentTimerBranch () |
| prints current timer branch | |
| void | MR::printTimingTree (double minTimeSec=0.1) |
| void | MR::registerThreadRootTimeRecord (ThreadRootTimeRecord &root) |
| installs given record in the current thread (no record must be installed before) | |
| void | MR::unregisterThreadRootTimeRecord (ThreadRootTimeRecord &root) |
| un-installs given record in the current thread | |
| template<typename M> | |
| TypedBitSet< I > | MR::TypedBitSet< I >::getMapping (const M &map) const |
| template<typename M> | |
| TypedBitSet< I > | MR::TypedBitSet< I >::getMapping (const M &map, size_t resSize) const |
| MR::Heap< T, I, P >::Heap (size_t size, T def={}, P pred={}) | |
| constructs heap for given number of elements, assigning given default value to each element | |
| MR::Heap< T, I, P >::Heap (std::vector< Element > elms, P pred={}) | |
| constructs heap from given elements (id's shall not repeat, but can have spaces and be arbitrary shuffled) | |
| void | MR::Heap< T, I, P >::resize (size_t size, T def MR_LIFETIME_CAPTURE_BY_NESTED(this)={}) |
| increases the size of the heap by adding elements at the end | |
| void | MR::Heap< T, I, P >::push (I elemId, const T &val MR_LIFETIME_CAPTURE_BY_NESTED(this)) |
| adds given element, which is not present in the heap yet | |
| void | MR::Heap< T, I, P >::erase (I elemId) |
| removes given element from the heap | |
| void | MR::Heap< T, I, P >::setValue (I elemId, const T &newVal MR_LIFETIME_CAPTURE_BY_NESTED(this)) |
| sets new value to given element | |
| void | MR::Heap< T, I, P >::setLargerValue (I elemId, const T &newVal MR_LIFETIME_CAPTURE_BY_NESTED(this)) |
| sets new value to given element, which shall be larger/smaller than the current value | |
| void | MR::Heap< T, I, P >::setSmallerValue (I elemId, const T &newVal MR_LIFETIME_CAPTURE_BY_NESTED(this)) |
This chapter represents documentation about basic elements.
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
if (v) contains an error, then appends given file name to that error
| void MR::appendUtf8 | ( | std::string & | str, |
| char32_t | cp ) |
#include <MRMesh/MRStringConvert.h>
Appends the given code point to the string in UTF-8 encoding; the code points not representable in UTF-8 are replaced with U+FFFD.
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for every set bit in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for every set bit in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in bit-set is processed by one thread only; tbb::task_group_context can be used to interrupt execution prematurely
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for every set bit in bs IdRange or BitSet (bs) parallel threads, passing e.local() (evaluated once for each sub-range) as the second argument to f; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for each index in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in BitSet is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for each index in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in BitSet is processed by one thread only; tbb::task_group_context can be used to interrupt execution prematurely
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f for each index in IdRange or BitSet (bs) in parallel threads passing e.local() (evaluated once for each sub-range) as the second argument to f; it is guaranteed that every individual block in BitSet is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f( bit, subBitRange ) for each bit in bitRange in parallel threads, where (subBitRange) are the bits that will be processed by the same thread; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRBitSetParallelFor.h>
executes given function f( bit, subBitRange, tls ) for each bit in IdRange or BitSet (bs) in parallel threads, where subBitRange are the bits that will be processed by the same thread, tls=e.local() (evaluated once for each subBitRange); it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report
| void MR::BitSetWalk | ( | const In & | input, |
| Res & | res, | ||
| bool | parallel, | ||
| Visit && | visit ) |
#include <MRMesh/MRBitSetParallelFor.h>
calls visit( x, add ) for every set bit x of (input), where add( i ) sets bit i in (res): serially in the order of bits, or in parallel threads, where add sets the bit atomically, since several threads may write in the same block of (res)
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
converts given size in string: [0,1024) -> nnn bytes [1024,1024*1024) -> nnn.nn Kb [1024*1024,1024*1024*1024) -> nnn.nn Mb ...
|
nodiscard |
#include <MRMesh/MRString.h>
Calculates Damerau-Levenshtein distance between to strings
| outLeftRightAddition | if provided return amount of insertions to the left and to the right |
|
nodiscard |
#include <MRMesh/MRString.h>
Calculates Damerau-Levenshtein distance between two UTF-32 strings, in codepoints
| outLeftRightAddition | if provided return amount of insertions to the left and to the right |
|
nodiscard |
#include <MRMesh/MRString.h>
Returns the simple Unicode case folding of a codepoint (per CaseFolding.txt, statuses C + S), for case-insensitive comparison. Simple folding is 1:1, so string length is preserved. Codepoints without a folding (and all case-less scripts) are returned unchanged.
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
in case of empty vector, returns "Empty" in case of single input file.ext, returns ".EXT" in case of multiple files with same extension, returns ".EXTs" otherwise returns "Files"
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
|
nodiscardnoexcept |
#include <MRMesh/MRBitSet.h>
returns the number of set bits in given blocks; uses the popcnt instruction on x86-64 CPUs having it
|
nodiscard |
#include <MRMesh/MRPrimitiveMapsComposition.h>
returns map a2c from a2b and b2c maps
| void MR::edgeMapsComposition | ( | EdgeMap & | a2b, |
| const EdgeMap & | b2c ) |
#include <MRMesh/MRPrimitiveMapsComposition.h>
updates a2b map to a2c map using b2c map
| void MR::Heap< T, I, P >::erase | ( | I | elemId | ) |
#include <MRMesh/MRHeap.h>
removes given element from the heap
|
nodiscard |
#include <MRMesh/MRPrimitiveMapsComposition.h>
returns map a2c from a2b and b2c maps
| void MR::faceMapsComposition | ( | FaceMap & | a2b, |
| const FaceMap & | b2c ) |
#include <MRMesh/MRPrimitiveMapsComposition.h>
updates a2b map to a2c map using b2c map
| void MR::fillVectorWithSeqNums | ( | const TypedBitSet< I > & | bs, |
| Vector< int, I > & | vec ) |
#include <MRMesh/MRBitSet.h>
for each set bit of input bitset, writes its sequential number starting from 0 in the given vector that shall have appropriate size
|
nodiscard |
#include <MRMesh/MRString.h>
Finds the substring in the string.
| char * MR::formatNoTrailingZeros | ( | char * | fmt, |
| double | v, | ||
| int | digitsAfterPoint, | ||
| int | precision = 6 ) |
#include <MRMesh/MRStringConvert.h>
returns printf-format for floating-point value in decimal notation with given precision in digits and without trailing zeros after the decimal point
| fmt | preallocated buffer of 5 bytes |
| v | value to print |
| digitsAfterPoint | maximal number of digits after decimal point |
| precision | maximal number of not-zero decimal digits |
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
Returns message showed when loading is canceled.
|
nodiscard |
#include <MRMesh/MRBitSet.h>
|
nodiscard |
#include <MRMesh/MRBitSet.h>
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
returns true if line contains at least one character (c) for which isProhibitedChar(c)==true
|
explicit |
#include <MRMesh/MRHeap.h>
constructs heap for given number of elements, assigning given default value to each element
|
explicit |
#include <MRMesh/MRHeap.h>
constructs heap from given elements (id's shall not repeat, but can have spaces and be arbitrary shuffled)
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
returns the amount of memory given BitSet occupies on heap
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
returns the amount of memory given HashMap occupies on heap
from parallel_hashmap/phmap.h: The control state and slot array are stored contiguously in a shared heap allocation. The layout of this allocation is: capacity() control bytes, one sentinel control byte, Group::kWidth - 1 cloned control bytes, <possible padding>, capacity() slots
the usage of phmap::priv::Group::kWidth here will require inclusion of phmap.h
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
Needed for generic code, always returns zero. The constraint is needed to avoid hard errors in C bindings when using MSVC STL when calling heapBytes<SomeNonfuncType>(...).
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
returns the amount of memory this smart pointer and its pointed object own together on heap
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
returns the amount of memory this smart pointer and its pointed object own together on heap
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
returns the amount of memory given vector occupies on heap
|
inlinenodiscard |
#include <MRMesh/MRHeapBytes.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
returns true if the given character is any of prohibited in filenames in any of OSes https://stackoverflow.com/q/1976007/7325599
|
nodiscard |
#include <MRMesh/MRBitSet.h>
returns the ids of all set bits in increasing order, i.e. the inverse of makeVectorWithSeqNums(...)
#include <MRMesh/MRBitSet.h>
creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned
|
nodiscard |
#include <MRMesh/MRBitSet.h>
creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
|
nodiscard |
#include <MRMesh/MRBitSet.h>
creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off)
|
inlinenodiscard |
#include <MRMesh/MRBitSet.h>
|
delete |
#include <MRMesh/MRBitSet.h>
prohibit comparison of unrelated sets
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
#include <MRMesh/MRBitSet.h>
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each vector element in parallel threads; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each vector element in parallel threads; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each vector element in parallel threads; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each span element [begin, end); optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each span element [begin, end); tbb::task_group_context can be used to interrupt execution prematurely
|
inline |
#include <MRMesh/MRParallelFor.h>
executes given function f for each span element [begin, end) passing e.local() (evaluated once for each sub-range) as the second argument to f; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report
| void MR::parallelFor | ( | size_t | begin, |
| size_t | end, | ||
| FunctionRef< void(size_t)> | f ) |
#include <MRMesh/MRParallelFor.h>
| void MR::parallelFor | ( | size_t | begin, |
| size_t | end, | ||
| FunctionRef< void(size_t)> | f, | ||
| tbb::task_group_context & | tgc ) |
#include <MRMesh/MRParallelFor.h>
| void MR::parallelFor | ( | size_t | begin, |
| size_t | end, | ||
| FunctionRef< void(size_t, void *)> | f, | ||
| FunctionRef< void *()> | ctx ) |
#include <MRMesh/MRParallelFor.h>
| bool MR::parallelFor | ( | size_t | begin, |
| size_t | end, | ||
| FunctionRef< void(size_t, void *)> | f, | ||
| FunctionRef< void *()> | ctx, | ||
| const ProgressCallback & | cb, | ||
| size_t | reportProgressEvery = 1024 ) |
#include <MRMesh/MRParallelFor.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
| void MR::printCurrentTimerBranch | ( | ) |
#include <MRMesh/MRTimer.h>
prints current timer branch
| void MR::printTimingTree | ( | double | minTimeSec = 0.1 | ) |
#include <MRMesh/MRTimer.h>
prints the current timing tree
| minTimeSec | omit printing records with time spent less than given value in seconds |
| void MR::printTimingTreeAtEnd | ( | bool | on, |
| double | minTimeSec = 0.1 ) |
#include <MRMesh/MRTimer.h>
enables or disables printing of timing tree when application terminates
| minTimeSec | omit printing records with time spent less than given value in seconds |
| void MR::Heap< T, I, P >::push | ( | I | elemId, |
| const T &val | MR_LIFETIME_CAPTURE_BY_NESTEDthis ) |
#include <MRMesh/MRHeap.h>
adds given element, which is not present in the heap yet
| void MR::redirectSTDStreamsToLogger | ( | ) |
#include <MRMesh/MRRestoringStreamsSink.h>
Redirects stdcout stdcerr stdclog to default logger
| void MR::registerThreadRootTimeRecord | ( | ThreadRootTimeRecord & | root | ) |
#include <MRMesh/MRTimeRecord.h>
installs given record in the current thread (no record must be installed before)
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
replace all characters (c), where isProhibitedChar(c)==true, with replacement char
| void MR::Heap< T, I, P >::resize | ( | size_t | size, |
| T def | MR_LIFETIME_CAPTURE_BY_NESTEDthis = {} ) |
#include <MRMesh/MRHeap.h>
increases the size of the heap by adding elements at the end
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
returns given value rounded to given number of decimal digits
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
returns given value rounded to given number of decimal digits
| void MR::Heap< T, I, P >::setLargerValue | ( | I | elemId, |
| const T &newVal | MR_LIFETIME_CAPTURE_BY_NESTEDthis ) |
#include <MRMesh/MRHeap.h>
sets new value to given element, which shall be larger/smaller than the current value
| void MR::Heap< T, I, P >::setSmallerValue | ( | I | elemId, |
| const T &newVal | MR_LIFETIME_CAPTURE_BY_NESTEDthis ) |
#include <MRMesh/MRHeap.h>
| void MR::Heap< T, I, P >::setValue | ( | I | elemId, |
| const T &newVal | MR_LIFETIME_CAPTURE_BY_NESTEDthis ) |
#include <MRMesh/MRHeap.h>
sets new value to given element
|
nodiscard |
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
converts system encoded string to UTF8-encoded string
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
convert an alphabetic ASCII character to lower-case, other characters are returned unchanged (unlike std::tolower, well-defined for negative char values)
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
convert an alphabetic ASCII codepoint to lower-case, other codepoints are returned unchanged
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
return a copy of the string with all alphabetic ASCII characters replaced with lower-case variants
| void MR::unregisterThreadRootTimeRecord | ( | ThreadRootTimeRecord & | root | ) |
#include <MRMesh/MRTimeRecord.h>
un-installs given record in the current thread
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
Converts the given UTF-32 encoded string to a UTF-8 encoded string.
|
inlinenodiscard |
#include <MRMesh/MRStringConvert.h>
returns filename as UTF8-encoded string
|
delete |
#include <MRMesh/MRStringConvert.h>
it is a mistake to call the function with implicit construction of path from string
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
given on input a valid utf8-encoded string, returns its substring starting at pos unicode symbol, and containing at most count unicode symbols (but res.size() can be more than count since a unicode symbol can be represented by more than 1 byte)
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
Reads the first code point from the given UTF-8 encoded string and returns the code point and a number of consumed bytes. If the string starts from an invalid UTF-8 sequence, the replacement character (U+FFFD) is returned. Note that the function checks neither for the null pointer nor for the null character; it is user responsibility to pass correct values.
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
converts UTF8-encoded string to system encoded string, returns empty string if such conversion cannot be made
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
Converts the given UTF-8 encoded string to a UTF-32 encoded string.
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
converts UTF8-encoded string into UTF16-encoded string
|
nodiscard |
#include <MRMesh/MRPrimitiveMapsComposition.h>
returns map a2c from a2b and b2c maps
| void MR::vertMapsComposition | ( | VertMap & | a2b, |
| const VertMap & | b2c ) |
#include <MRMesh/MRPrimitiveMapsComposition.h>
updates a2b map to a2c map using b2c map
|
nodiscard |
#include <MRMesh/MRStringConvert.h>
converts wide null terminating string to UTF8-encoded string