39#ifndef CHECKASM_CHECKASM_H
40#define CHECKASM_CHECKASM_H
72#ifndef CHECKASM_HAVE_GENERIC
73 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
74 #define CHECKASM_HAVE_GENERIC 1
76 #define CHECKASM_HAVE_GENERIC 0
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:88
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:96
CHECKASM_API void checkasm_list_functions(const CheckasmConfig *config)
Print available functions within tests.
CheckasmFormat
Output format for benchmark results.
Definition checkasm.h:129
@ CHECKASM_FORMAT_PRETTY
Definition checkasm.h:130
@ CHECKASM_FORMAT_TSV
Definition checkasm.h:132
@ CHECKASM_FORMAT_HTML
Definition checkasm.h:134
@ CHECKASM_FORMAT_CSV
Definition checkasm.h:131
@ CHECKASM_FORMAT_JSON
Definition checkasm.h:133
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:158
int cpu_affinity_set
Enable process pinning via cpu_affinity.
Definition checkasm.h:270
int verbose
Enable verbose output.
Definition checkasm.h:246
const char * test_pattern
Pattern for filtering which tests to run.
Definition checkasm.h:206
unsigned cpu_affinity
CPU core ID for process pinning.
Definition checkasm.h:277
unsigned repeat
Number of times to repeat tests.
Definition checkasm.h:263
unsigned bench_usec
Target benchmark duration in microseconds.
Definition checkasm.h:234
CheckasmFormat format
Output format for benchmark results.
Definition checkasm.h:237
int bench
Enable benchmarking.
Definition checkasm.h:223
void(* set_cpu_flags)(CheckasmCpu new_flags)
Callback invoked when active CPU flags change.
Definition checkasm.h:198
const CheckasmCpuInfo * cpu_flags
List of CPU flags understood by the implementation.
Definition checkasm.h:168
const char * function_pattern
Pattern for filtering which functions within tests to run.
Definition checkasm.h:215
unsigned seed
Random number generator seed.
Definition checkasm.h:254
CheckasmCpu cpu
Detected CPU flags for the current system.
Definition checkasm.h:186
const CheckasmTest * tests
Array of test functions to execute.
Definition checkasm.h:176
Describes a CPU feature flag/capability.
Definition checkasm.h:105
CheckasmCpu flag
Definition checkasm.h:108
const char * suffix
Definition checkasm.h:107
const char * name
Definition checkasm.h:106
Describes a single test function.
Definition checkasm.h:117
void(* func)(void)
Definition checkasm.h:119
const char * name
Definition checkasm.h:118