#include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstdarg>
#include <ctime>
#include <unistd.h>
#include <iostream>
#include <sstream>
#include <new>
#include <optional>
#include <limits>
#include <vector>
#include <tuple>
#include <memory>
#include <utility>
Go to the source code of this file.
|
#define | ITYR_CONCAT_(x, y) x##y |
|
#define | ITYR_CONCAT(x, y) ITYR_CONCAT_(x, y) |
|
#define | ITYR_ANON_NAME(x) ITYR_CONCAT(x, __LINE__) |
|
#define | ITYR_SUBCASE(name) |
|
#define | ITYR_REQUIRE(cond) if (!(cond)) { ityr::common::die("Assertion failed (%s:%d)", __FILE__, __LINE__); } |
|
#define | ITYR_REQUIRE_MESSAGE(cond, msg, ...) if (!(cond)) { ityr::common::die(msg " (%s:%d)", ##__VA_ARGS__, __FILE__, __LINE__); } |
|
#define | ITYR_CHECK(cond) ITYR_REQUIRE(cond) |
|
#define | ITYR_CHECK_MESSAGE(cond, ...) ITYR_REQUIRE_MESSAGE(cond, __VA_ARGS__) |
|
#define | ITYR_CHECK_THROWS_AS(exp, exception) exp |
|
#define | ITYR_ANON_VAR ITYR_CONCAT(anon_, __LINE__) |
|
|
uint64_t | ityr::common::clock_gettime_ns () |
|
| ityr::common::__attribute__ ((noinline)) inline void die(const char *fmt |
|
| ityr::common::va_start (args, fmt) |
|
| ityr::common::vsnprintf (msg, slen, fmt, args) |
|
| ityr::common::va_end (args) |
|
| ityr::common::fprintf (stderr, "\x1b[31m%s\x1b[39m\n", msg) |
|
| ityr::common::fflush (stderr) |
|
template<typename T > |
T | ityr::common::getenv_with_default (const char *env_var, T default_val) |
|
uint64_t | ityr::common::next_pow2 (uint64_t x) |
|
template<typename T > |
bool | ityr::common::is_pow2 (T x) |
|
template<typename T > |
T | ityr::common::round_down_pow2 (T x, T alignment) |
|
template<typename T > |
T * | ityr::common::round_down_pow2 (T *x, uintptr_t alignment) |
|
template<typename T > |
T | ityr::common::round_up_pow2 (T x, T alignment) |
|
template<typename T > |
T * | ityr::common::round_up_pow2 (T *x, uintptr_t alignment) |
|
std::size_t | ityr::common::get_page_size () |
|
move_only_t | ityr::common::operator+ (const move_only_t &mo1, const move_only_t &mo2) |
|
◆ ITYR_ANON_NAME
◆ ITYR_ANON_VAR
◆ ITYR_CHECK
◆ ITYR_CHECK_MESSAGE
◆ ITYR_CHECK_THROWS_AS
#define ITYR_CHECK_THROWS_AS |
( |
|
exp, |
|
|
|
exception |
|
) |
| exp |
◆ ITYR_CONCAT
◆ ITYR_CONCAT_
#define ITYR_CONCAT_ |
( |
|
x, |
|
|
|
y |
|
) |
| x##y |
◆ ITYR_REQUIRE
#define ITYR_REQUIRE |
( |
|
cond | ) |
if (!(cond)) { ityr::common::die("Assertion failed (%s:%d)", __FILE__, __LINE__); } |
◆ ITYR_REQUIRE_MESSAGE
#define ITYR_REQUIRE_MESSAGE |
( |
|
cond, |
|
|
|
msg, |
|
|
|
... |
|
) |
| if (!(cond)) { ityr::common::die(msg " (%s:%d)", ##__VA_ARGS__, __FILE__, __LINE__); } |
◆ ITYR_SUBCASE
#define ITYR_SUBCASE |
( |
|
name | ) |
|