39#ifndef CHECKASM_CHECKASM_H
40#define CHECKASM_CHECKASM_H
Platform and compiler attribute macros.
#define CHECKASM_API
Symbol visibility attribute for public API functions.
Definition attributes.h:88
uint64_t CheckasmCpu
Opaque type representing a set of CPU feature flags.
Definition checkasm.h:52
CHECKASM_API void checkasm_list_tests(const CheckasmConfig *config)
Print available tests.
uintptr_t CheckasmKey
Opaque type used to identify function implementations.
Definition checkasm.h:60
CHECKASM_API void checkasm_list_functions(const CheckasmConfig *config)
Print available functions within tests.
CheckasmFormat
Output format for benchmark results.
Definition checkasm.h:93
@ CHECKASM_FORMAT_PRETTY
Definition checkasm.h:94
@ CHECKASM_FORMAT_TSV
Definition checkasm.h:96
@ CHECKASM_FORMAT_HTML
Definition checkasm.h:98
@ CHECKASM_FORMAT_CSV
Definition checkasm.h:95
@ CHECKASM_FORMAT_JSON
Definition checkasm.h:97
CHECKASM_API int checkasm_run(const CheckasmConfig *config)
Run all tests and benchmarks matching the specified patterns.
CHECKASM_API void checkasm_list_cpu_flags(const CheckasmConfig *config)
Print available CPU flags to stdout.
CHECKASM_API CheckasmCpu checkasm_get_cpu_flags(void)
Get the current active set of CPU flags.
CHECKASM_API int checkasm_main(CheckasmConfig *config, int argc, const char *argv[])
Main entry point for checkasm test programs.
Configuration structure for the checkasm test suite.
Definition checkasm.h:122
int cpu_affinity_set
Enable process pinning via cpu_affinity.
Definition checkasm.h:234
int verbose
Enable verbose output.
Definition checkasm.h:210
const char * test_pattern
Pattern for filtering which tests to run.
Definition checkasm.h:170
unsigned cpu_affinity
CPU core ID for process pinning.
Definition checkasm.h:241
unsigned repeat
Number of times to repeat tests.
Definition checkasm.h:227
unsigned bench_usec
Target benchmark duration in microseconds.
Definition checkasm.h:198
CheckasmFormat format
Output format for benchmark results.
Definition checkasm.h:201
int bench
Enable benchmarking.
Definition checkasm.h:187
void(* set_cpu_flags)(CheckasmCpu new_flags)
Callback invoked when active CPU flags change.
Definition checkasm.h:162
const CheckasmCpuInfo * cpu_flags
List of CPU flags understood by the implementation.
Definition checkasm.h:132
const char * function_pattern
Pattern for filtering which functions within tests to run.
Definition checkasm.h:179
unsigned seed
Random number generator seed.
Definition checkasm.h:218
CheckasmCpu cpu
Detected CPU flags for the current system.
Definition checkasm.h:150
const CheckasmTest * tests
Array of test functions to execute.
Definition checkasm.h:140
Describes a CPU feature flag/capability.
Definition checkasm.h:69
CheckasmCpu flag
Definition checkasm.h:72
const char * suffix
Definition checkasm.h:71
const char * name
Definition checkasm.h:70
Describes a single test function.
Definition checkasm.h:81
void(* func)(void)
Definition checkasm.h:83
const char * name
Definition checkasm.h:82