Miscellaneous

Logging should be handled using the C API functions.

class RascalineError : public std::runtime_error

Exception class for all error thrown by rascaline.

Public Functions

inline RascalineError(const std::string &message)

Create a new error with the given message.

RascalineError(const RascalineError&) = default

RascalineError is copy-constructible.

RascalineError(RascalineError&&) = default

RascalineError is move-constructible.

RascalineError &operator=(const RascalineError&) = default

RascalineError can be copy-assigned.

RascalineError &operator=(RascalineError&&) = default

RascalineError can be move-assigned.

class Profiler

Rascaline 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, and Profiler::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 and Profiler::get.

static inline std::string get(const std::string &format)

Extract the current set of data collected for profiling.

See also Profiler::enable and Profiler::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