HEBench
hebench::ReportGen::Compiler Namespace Reference

Classes

struct  ReportCompilerConfigC
 Configuration for a compiler run. More...
 
struct  ReportCompilerConfig
 

Functions

int32_t compile (const ReportCompilerConfigC *p_config, char *s_error, size_t s_error_size)
 Runs the compiler using the specified configuration. More...
 
std::vector< std::filesystem::path > extractInputFiles (const std::string &filename)
 

Class Documentation

◆ hebench::ReportGen::Compiler::ReportCompilerConfigC

struct hebench::ReportGen::Compiler::ReportCompilerConfigC

Configuration for a compiler run.

Definition at line 21 of file hebench_report_compiler.h.

Class Members
int32_t b_show_overview If non-zero, the compiled overview will be output to stdout.
int32_t b_silent If non-zero, the run details will be omited. Any warning, error, or important messages are directed to stderr.
const char * input_file C-string containing the input file name.
char time_unit Fallback time unit when no time unit is specified for a specific output.

One of: 0 - (default): an appropriate time unit will be used to keep the values between 1 and 1000. s - seconds ms - milliseconds us - microseconds ns - nanoseconds

char time_unit_overview Time unit for report overview. If 0, the fallback time_unit will be used.
char time_unit_stats Time unit for report statistics. If 0, the fallback time_unit will be used.
char time_unit_summary Time unit for report summaries. If 0, the fallback time_unit will be used.

Function Documentation

◆ compile()

int32_t hebench::ReportGen::Compiler::compile ( const ReportCompilerConfigC p_config,
char *  s_error,
size_t  s_error_size 
)

Runs the compiler using the specified configuration.

Parameters
[in]p_configConfiguration for the compiler execution.
[out]s_errorPointer to buffer to receive any error message. If null, error messages are ignored.
[in]s_error_sizeSize, in bytes, of the memory pointed to by s_error. If zero, error messages are ignored.
Returns
true on success.

If an error occurs, the error message will be saved in the provided buffer s_error. This function will attempt to copy as many bytes from the error message into the buffer. Otherwise, the contents of the buffer will remain unchanged. The buffer can null or the number of bytes pointed to can be zero to indicate that caller is ignoring any error messages.

Definition at line 136 of file hebench_report_compiler.cpp.

◆ extractInputFiles()

std::vector<std::filesystem::path> hebench::ReportGen::Compiler::extractInputFiles ( const std::string &  filename)

Definition at line 77 of file hebench_report_compiler.cpp.