Miscellaneous¶
Logging should be handled using the C API functions.
-
class FeatomicError : public std::runtime_error¶
Exception class for all error thrown by featomic.
Public Functions
-
inline FeatomicError(const std::string &message)¶
Create a new error with the given message.
-
FeatomicError(const FeatomicError&) = default¶
FeatomicError is copy-constructible.
-
FeatomicError(FeatomicError&&) = default¶
FeatomicError is move-constructible.
-
FeatomicError &operator=(const FeatomicError&) = default¶
FeatomicError can be copy-assigned.
-
FeatomicError &operator=(FeatomicError&&) = default¶
FeatomicError can be move-assigned.
-
inline FeatomicError(const std::string &message)¶
-
class Profiler¶
Featomic uses the to collect timing information on the calculations. The
Profiler
static class provides access to this functionality.The profiling code collects the total time spent inside the most important functions, as well as the function call graph (which function called which other function).
Public Static Functions
-
static inline void enable(bool enabled)¶
Enable or disable profiling data collection. By default, data collection is disabled.
You can use
Profiler::clear
to reset profiling data to an empty state, andProfiler::get
to extract the profiling data.- Parameters:
enabled – whether data collection should be enabled or not
-
static inline void clear()¶
Clear all collected profiling data
See also
Profiler::enable
andProfiler::get
.
-
static inline std::string get(const std::string &format)¶
Extract the current set of data collected for profiling.
See also
Profiler::enable
andProfiler::clear
.- Parameters:
format – in which format should the data be provided.
"table"
,"short_table"
and"json"
are currently supported- Returns:
the current profiling data, in the requested format
-
static inline void enable(bool enabled)¶