Go to the documentation of this file.
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
unsigned cpu_affinity
CPU core ID for process pinning.
static const char * checkasm_get_cpu_suffix(void)
Get the suffix for the current CPU flag, or "c" if none.
const char * name
Name of the test (used for filtering and reporting)
CHECKASM_API void checkasm_list_functions(const CheckasmConfig *config)
Print available functions within tests.
int bench
Enable benchmarking.
const char * test_pattern
Pattern for filtering which tests to run.
CHECKASM_API void checkasm_list_tests(const CheckasmConfig *config)
Print available tests.
CheckasmFormat
Output format for benchmark results.
@ CHECKASM_FORMAT_JSON
JSON structured output with all measurement data.
Platform and compiler attribute macros.
const CheckasmCpuInfo * cpu_flags
List of CPU flags understood by the implementation.
const CheckasmTest * tests
Array of test functions to execute.
CHECKASM_API int checkasm_run(const CheckasmConfig *config)
Run all tests and benchmarks matching the specified patterns.
Describes a CPU feature flag/capability.
const char * function_pattern
Pattern for filtering which functions within tests to run.
void(* func)(void)
Test function to invoke.
unsigned seed
Random number generator seed.
unsigned bench_usec
Target benchmark duration in microseconds.
const CHECKASM_API CheckasmCpuInfo * checkasm_get_cpu_info(void)
Get the CPU flag currently being tested.
Describes a single test function.
@ CHECKASM_FORMAT_PRETTY
Pretty-printed (colored) text output (default)
@ CHECKASM_FORMAT_TSV
Tab-separated values with optional header.
CHECKASM_API int checkasm_main(CheckasmConfig *config, int argc, const char *argv[])
Main entry point for checkasm test programs.
const char * suffix
Short suffix for function names (e.g., "sse2", "avx2")
Configuration structure for the checkasm test suite.
@ CHECKASM_FORMAT_CSV
Comma-separated values with optional header.
@ CHECKASM_FORMAT_HTML
Interactive HTML report for web viewing.
CheckasmCpu flag
Bitmask flag value for this CPU feature.
int cpu_affinity_set
Enable process pinning via cpu_affinity.
#define CHECKASM_API
Symbol visibility attribute for public API functions.
CHECKASM_API CheckasmCpu checkasm_get_cpu_flags(void)
Get the current active set of CPU flags.
uintptr_t CheckasmKey
Opaque type used to identify function implementations.
int seed_set
Enable using the seed value.
unsigned repeat
Number of times to repeat tests.
CHECKASM_API void checkasm_list_cpu_flags(const CheckasmConfig *config)
Print available CPU flags to stdout.
CheckasmCpu cpu
Detected CPU flags for the current system.
const char * name
Human-readable name (e.g., "SSE2", "AVX2")
CheckasmFormat format
Output format for benchmark results.
uint64_t CheckasmCpu
Opaque type representing a set of CPU feature flags.
void(* set_cpu_flags)(CheckasmCpu new_flags)
Callback invoked when active CPU flags change.
int verbose
Enable verbose output.