|
checkasm 1.0.1
Assembly testing and benchmarking framework
|
Configuration structure for the checkasm test suite. More...
#include <checkasm.h>

Data Fields | |
| const CheckasmCpuInfo * | cpu_flags |
| List of CPU flags understood by the implementation. | |
| const CheckasmTest * | tests |
| Array of test functions to execute. | |
| CheckasmCpu | cpu |
| Detected CPU flags for the current system. | |
| void(* | set_cpu_flags )(CheckasmCpu new_flags) |
| Callback invoked when active CPU flags change. | |
| const char * | test_pattern |
| Pattern for filtering which tests to run. | |
| const char * | function_pattern |
| Pattern for filtering which functions within tests to run. | |
| int | bench |
| Enable benchmarking. | |
| unsigned | bench_usec |
| Target benchmark duration in microseconds. | |
| CheckasmFormat | format |
| Output format for benchmark results. | |
| int | verbose |
| Enable verbose output. | |
| unsigned | seed |
| Random number generator seed. | |
| unsigned | repeat |
| Number of times to repeat tests. | |
| int | cpu_affinity_set |
| Enable process pinning via cpu_affinity. | |
| unsigned | cpu_affinity |
| CPU core ID for process pinning. | |
Configuration structure for the checkasm test suite.
This structure contains all configuration options for running checkasm tests, including test selection, CPU feature flags, benchmarking options, and output formatting. Initialize this structure with your project's tests and CPU flags before calling checkasm_main() or checkasm_run().
| int CheckasmConfig::bench |
Enable benchmarking.
When nonzero, enables performance benchmarking of tested functions. Set to 1 to enable with default settings.
| unsigned CheckasmConfig::bench_usec |
Target benchmark duration in microseconds.
Target time (in µs) to spend benchmarking each function. Defaults to 1000 µs if left unset when bench is enabled.
| CheckasmCpu CheckasmConfig::cpu |
Detected CPU flags for the current system.
Set this to the detected CPU capabilities of the system. Any extra flags not included in cpu_flags will also be transparently included in checkasm_get_cpu_flags(), and can be used to signal flags that should be assumed to always be enabled (e.g., CPU_FLAG_FAST_* modifiers).
| unsigned CheckasmConfig::cpu_affinity |
CPU core ID for process pinning.
If cpu_affinity_set is nonzero, pin the test process to this CPU core.
| int CheckasmConfig::cpu_affinity_set |
Enable process pinning via cpu_affinity.
If nonzero, the test process will be pinned to the CPU core specified in cpu_affinity.
| const CheckasmCpuInfo* CheckasmConfig::cpu_flags |
List of CPU flags understood by the implementation.
Array of CPU features that will be tested in incremental order, terminated by an entry with CheckasmCpuInfo.flag == 0 (i.e. {0}).
Each test run inherits any active flags from previously tested CPUs. This allows testing progressively more advanced instruction sets.
| const char* CheckasmConfig::function_pattern |
Pattern for filtering which functions within tests to run.
Shell-style wildcard pattern to select specific functions. Matched against the names passed to checkasm_check_func(). NULL means run all functions.
| unsigned CheckasmConfig::repeat |
Number of times to repeat tests.
Repeat the test (and benchmark, if enabled) this many times using successive seeds. Setting to -1 effectively tests every possible seed (useful for exhaustive testing).
| unsigned CheckasmConfig::seed |
Random number generator seed.
If nonzero, use this seed for deterministic random number generation. If zero, a seed will be chosen based on the current time.
| void(* CheckasmConfig::set_cpu_flags) (CheckasmCpu new_flags) |
Callback invoked when active CPU flags change.
If provided, this function will be called whenever the active set of CPU flags changes, with the new set of flags as argument. This includes once at the start of the program with the baseline set of flags.
Use this to update global function pointers, internal static variables, or dispatch tables.
| const char* CheckasmConfig::test_pattern |
Pattern for filtering which tests to run.
Shell-style wildcard pattern (e.g., "video_*") to select tests. NULL means run all tests.
| const CheckasmTest* CheckasmConfig::tests |
Array of test functions to execute.
Array of test functions to execute, terminated by an entry with CheckasmTest.func == NULL (i.e. {0}.
| int CheckasmConfig::verbose |
Enable verbose output.
When nonzero, prints detailed timing information, failure diagnostics, and extra terminal output (including table headers and extra information about the active configuration).