13 #ifndef PLSSVM_DETAIL_PERFORMANCE_TRACKER_HPP_
14 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_HPP_
22 #include "fmt/chrono.h"
24 #include "fmt/ostream.h"
28 #include <string_view>
29 #include <type_traits>
30 #include <unordered_map>
119 template <
typename T>
163 void save(
const std::string &filename);
197 template <
typename T>
227 #if defined(PLSSVM_PERFORMANCE_TRACKER_ENABLED)
229 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_PAUSE() \
230 ::plssvm::detail::global_tracker->pause_tracking()
232 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_RESUME() \
233 ::plssvm::detail::global_tracker->resume_tracking()
235 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_SAVE(filename) \
236 ::plssvm::detail::global_tracker->save(filename)
238 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_ADD_TRACKING_ENTRY(entry) \
239 ::plssvm::detail::global_tracker->add_tracking_entry(entry);
242 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_PAUSE()
243 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_RESUME()
244 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_SAVE(filename)
245 #define PLSSVM_DETAIL_PERFORMANCE_TRACKER_ADD_TRACKING_ENTRY(entry)
Namespace containing implementation details. Should not directly be used by users.
Definition: csvm.hpp:27
std::shared_ptr< performance_tracker > global_tracker
The global performance tracker instance used for the default tracking.
std::ostream & operator<<(std::ostream &out, const execution_range &range)
Output the execution range to the given output-stream out.
constexpr bool is_tracking_entry_v
Definition: performance_tracker.hpp:96
constexpr std::string_view name
The name of the library.
Definition: version.hpp:26
Implements a class encapsulating all necessary parameters for predicting using the C-SVM possibly pro...
Implements a class encapsulating all necessary parameters for scaling a data set possibly provided th...
Implements a class encapsulating all necessary parameters for training the C-SVM possibly provided th...
Sets the value to false since it isn't a tracking entry.
Definition: performance_tracker.hpp:76
Check whether T is a tracking entry. Ignores all top-level const, volatile, and reference qualifiers.
Definition: performance_tracker.hpp:90
A single tracking entry containing a specific category, a unique name, and the actual value to be tra...
Definition: performance_tracker.hpp:40
const std::string_view entry_name
The name of the tracking entry displayed in the YAML file.
Definition: performance_tracker.hpp:53
const std::string entry_category
The category to which this tracking entry belongs; used for grouping in the resulting YAML file.
Definition: performance_tracker.hpp:51
const T entry_value
The tracked value in the YAML file.
Definition: performance_tracker.hpp:55
tracking_entry(const std::string_view category, const std::string_view name, T value)
Create a new tracking entry.
Definition: performance_tracker.hpp:47
Defines some generic type traits used in the PLSSVM library.