ILLIXR: Illinois Extended Reality Testbed
Classes | Typedefs | Enumerations | Functions | Variables
ILLIXR Namespace Reference

RAC_ERRNO_MSG. More...

Classes

struct  display_params
 Display parameters. More...
 
struct  rendering_params
 Rendering parameters. More...
 
class  managed_thread
 An object that manages a std::thread; it joins and exits when the object gets destructed. More...
 
class  phonebook
 A service locator for ILLIXR. More...
 
class  plugin
 A dynamically-loadable plugin for Spindle. More...
 
class  record_header
 Schema of each record. More...
 
class  data_use_indicator
 A helper class that lets one dynamically determine if some data gets used. More...
 
class  record
 This class represents a tuple of fields which get logged by record_logger. More...
 
class  record_logger
 The ILLIXR logging service for structured records. More...
 
class  gen_guid
 This class generates unique IDs. More...
 
class  record_coalescer
 Coalesces logs of the same type to be written back as a single-transaction. More...
 
class  RelativeClock
 Relative clock for all of ILLIXR. More...
 
class  Event
 A boolean condition-variable. More...
 
class  Stoplight
 Start/stop synchronization for the whole application. More...
 
class  switchboard
 A manager for typesafe, threadsafe, named event-streams (called topics). More...
 
class  threadloop
 A reusable threadloop for plugins. More...
 

Typedefs

using ullong = unsigned long long
 
typedef struct ILLIXR::vk_image_handle vk_image_handle
 
using void_ptr = std::unique_ptr< void, std::function< void(void *)> >
 
using plugin_id_t = std::size_t
 
using _clock_rep = long
 
using _clock_period = std::nano
 
using _clock_duration = std::chrono::duration< _clock_rep, _clock_period >
 
using duration = RelativeClock::duration
 
typedef plugin *(* plugin_factory) (phonebook *)
 

Enumerations

enum class  graphics_api { OPENGL , VULKAN , TBD }
 
enum class  swapchain_usage {
  LEFT_SWAPCHAIN , RIGHT_SWAPCHAIN , LEFT_RENDER , RIGHT_RENDER ,
  NA
}
 

Functions

void report_and_clear_errno ([[maybe_unused]] const std::string &file, [[maybe_unused]] const int &line, [[maybe_unused]] const std::string &function, [[maybe_unused]] const std::string &msg="")
 Support function to report errno values when debugging (NDEBUG). More...
 
void abort (const std::string &msg="", [[maybe_unused]] const int error_val=1)
 Exits the application during a fatal error. More...
 
bool str_to_bool (const std::string &var)
 Convert a string containing a (python) boolean to the bool type.
 
std::string getenv_or (const std::string &var, std::string default_)
 Temporary environment variable getter. Not needed once #198 is merged.
 
time_point::duration operator- (const time_point &lhs, const time_point &rhs)
 
time_point operator+ (const time_point &pt, const time_point::duration &d)
 
time_point operator+ (const time_point::duration &d, const time_point &pt)
 
bool operator< (const time_point &lhs, const time_point &rhs)
 
bool operator> (const time_point &lhs, const time_point &rhs)
 
bool operator<= (const time_point &lhs, const time_point &rhs)
 
bool operator>= (const time_point &lhs, const time_point &rhs)
 
bool operator== (const time_point &lhs, const time_point &rhs)
 
bool operator!= (const time_point &lhs, const time_point &rhs)
 
template<typename unit = std::ratio<1>>
double duration2double (duration dur)
 
constexpr duration freq2period (double fps)
 
runtime * runtime_factory ()
 

Variables

const record_header __plugin_start_header
 
const record_header __switchboard_callback_header
 
const record_header __switchboard_topic_stop_header
 
const record_header __threadloop_iteration_header
 

Detailed Description

RAC_ERRNO_MSG.

Typedef Documentation

◆ _clock_rep

using ILLIXR::_clock_rep = typedef long

Mimick of std::chrono::time_point<Clock, Rep> 1.

Can't use std::chrono::time_point<Clock, Rep>, because the Clock must satisfy the Clock interface 2, but RelativeClock cannot satisfy this interface because RelativeClock::now() is a stateful (instance method) not pure (class method). Instead, we will mimick the interface of 1 here.

Function Documentation

◆ abort()

void ILLIXR::abort ( const std::string &  msg = "",
[[maybe_unused] ] const int  error_val = 1 
)
inline

Exits the application during a fatal error.

Switches to using abort during debugging over std::exit so that we can capture SIGABRT for debugging.

NDEBUG

◆ report_and_clear_errno()

void ILLIXR::report_and_clear_errno ( [[maybe_unused] ] const std::string &  file,
[[maybe_unused] ] const int &  line,
[[maybe_unused] ] const std::string &  function,
[[maybe_unused] ] const std::string &  msg = "" 
)
inline

Support function to report errno values when debugging (NDEBUG).

If errno is set, this function will report errno's value and the calling context. It will subsequently clear errno (reset value to 0). Otherwise, this function does nothing.

NDEBUG

Variable Documentation

◆ __plugin_start_header

const record_header ILLIXR::__plugin_start_header
Initial value:
{
"plugin_name",
{
{"plugin_id", typeid(plugin_id_t)},
{"plugin_name", typeid(std::string)},
},
}

◆ __switchboard_callback_header

const record_header ILLIXR::__switchboard_callback_header
Initial value:
{
"switchboard_callback",
{
{"plugin_id", typeid(plugin_id_t)},
{"topic_name", typeid(std::string)},
{"iteration_no", typeid(std::size_t)},
{"cpu_time_start", typeid(std::chrono::nanoseconds)},
{"cpu_time_stop", typeid(std::chrono::nanoseconds)},
{"wall_time_start", typeid(std::chrono::high_resolution_clock::time_point)},
{"wall_time_stop", typeid(std::chrono::high_resolution_clock::time_point)},
}}

@Should be private to Switchboard.

◆ __switchboard_topic_stop_header

const record_header ILLIXR::__switchboard_topic_stop_header
Initial value:
{"switchboard_topic_stop",
{
{"plugin_id", typeid(plugin_id_t)},
{"topic_name", typeid(std::string)},
{"enqueued", typeid(std::size_t)},
{"dequeued", typeid(std::size_t)},
{"idle_cycles", typeid(std::size_t)},
}}

@Should be private to Switchboard.

◆ __threadloop_iteration_header

const record_header ILLIXR::__threadloop_iteration_header
Initial value:
{
"threadloop_iteration",
{
{"plugin_id", typeid(std::size_t)},
{"iteration_no", typeid(std::size_t)},
{"skips", typeid(std::size_t)},
{"cpu_time_start", typeid(std::chrono::nanoseconds)},
{"cpu_time_stop", typeid(std::chrono::nanoseconds)},
{"wall_time_start", typeid(std::chrono::high_resolution_clock::time_point)},
{"wall_time_stop", typeid(std::chrono::high_resolution_clock::time_point)},
}}