#include <algorithm>
#include <iomanip>
#include <string>
#include <sstream>
#include <filesystem>
#include "config_data.h"
#include "performance_evaluator.h"
Go to the source code of this file.
|
#define | DEFINE_ENUM_CLASS_OR_OPERATOR(class_name) |
| This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator| for that class. More...
|
|
#define | DEFINE_ENUM_CLASS_AND_OPERATOR(class_name) |
| This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator& for that class. More...
|
|
#define | DEFINE_ENUM_CLASS_FLAGS(class_name, ...) |
|
#define | LOG(message, instructions) std::cout << (message) << "... "; instructions std::cout << "done.\n" |
|
#define | TLOG(message, instructions) std::cout << (message) << "... "; tlog_pe.start(); instructions std::cout << "done. " << tlog_pe.stop() << " ms.\n"; |
|
|
std::string | binary (size_t u, size_t nbits) |
|
template<typename T > |
std::string | zerostr (const T &val, size_t n) |
|
template<typename T > |
void | StringSplit (const std::string &str, T &cont, char delim='+') |
|
◆ DEFINE_ENUM_CLASS_AND_OPERATOR
#define DEFINE_ENUM_CLASS_AND_OPERATOR |
( |
|
class_name | ) |
|
Value:constexpr
bool operator&(
const enum class_name self_value,
const enum class_name in_value) { \
return static_cast<bool>(static_cast<uint32_t>(self_value) & static_cast<uint32_t>(in_value)); \
} \
constexpr bool operator&(const enum GenerateConditionActionCodeFlags self_value, const enum GenerateConditionActionCodeFlags in_value)
This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator& for that class.
Definition at line 36 of file utilities.h.
◆ DEFINE_ENUM_CLASS_FLAGS
#define DEFINE_ENUM_CLASS_FLAGS |
( |
|
class_name, |
|
|
|
... |
|
) |
| |
Value:enum class class_name : uint32_t { \
__VA_ARGS__ \
}; \
DEFINE_ENUM_CLASS_OR_OPERATOR(class_name) \
DEFINE_ENUM_CLASS_AND_OPERATOR(class_name) \
Definition at line 41 of file utilities.h.
◆ DEFINE_ENUM_CLASS_OR_OPERATOR
#define DEFINE_ENUM_CLASS_OR_OPERATOR |
( |
|
class_name | ) |
|
Value:constexpr enum class_name operator|(const enum class_name self_value, const enum class_name in_value) { \
return static_cast<enum class_name>(static_cast<uint32_t>(self_value) | static_cast<uint32_t>(in_value)); \
} \
This macro serves to simplify the definition of flags, it takes the name of an enum class as input and defines the operator| for that class.
Definition at line 28 of file utilities.h.
◆ LOG
#define LOG |
( |
|
message, |
|
|
|
instructions |
|
) |
| std::cout << (message) << "... "; instructions std::cout << "done.\n" |
◆ TLOG
#define TLOG |
( |
|
message, |
|
|
|
instructions |
|
) |
| std::cout << (message) << "... "; tlog_pe.start(); instructions std::cout << "done. " << tlog_pe.stop() << " ms.\n"; |
◆ uint
◆ binary()
std::string binary |
( |
size_t |
u, |
|
|
size_t |
nbits |
|
) |
| |
◆ StringSplit()
template<typename T >
void StringSplit |
( |
const std::string & |
str, |
|
|
T & |
cont, |
|
|
char |
delim = '+' |
|
) |
| |
◆ zerostr()
template<typename T >
std::string zerostr |
( |
const T & |
val, |
|
|
size_t |
n |
|
) |
| |
◆ conf