Go to the documentation of this file.
48 for (
int w = min_width;
w <=
WIDTH;
w *= 2) {
56 for (
int i = 0;
i <
w;
i++)
57 c_dst[
i] = a_dst[
i] = ~
src[
i];
62 checkasm_check1d(uint8_t, c_dst, a_dst,
w,
"1d");
66 checkasm_check1d_padded(uint8_t, c_dst, a_dst,
w,
"1d_padded", 1, 64);
68 "2d_padded", 1, 1, 16);
106 fprintf(stderr,
"expected %f, got %f\n", x, y);
124 fprintf(stderr,
"expected %f, got %f\n", x, y);
179 for (
int i = 0;
i < 10;
i++) {
184 fprintf(stderr,
"expected %d, got %d\n", x, y);
202 for (
float f = 0.0
f;
f <= 10.0f;
f += 0.5f) {
207 fprintf(stderr,
"expected %d, got %d\n", x, y);
220 for (
float f = 0.0
f;
f <= 10.0f;
f += 0.5f) {
226 fprintf(stderr,
"expected %ld, got %ld\n", x, y);
285 for (
int i = 0;
i < 2;
i++) {
static void selftest_test_double_arg(void)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
#define checkasm_check_func(func,...)
Check if a function should be tested and set up function references.
static CheckasmKey checkasm_key_new
Key identifying the implementation being tested.
#define DEF_COPY_GETTER(FLAG, NAME)
#define CHECKASM_ALIGN(x)
Declare a variable with platform-specific alignment requirements.
#define checkasm_check_rect(rect1,...)
Compare two rectangular buffers.
#define INITIALIZE_BUF(buf)
Fill a fixed size buffer with pathological test data (convenience macro)
static void selftest_test_float_arg(void)
static void selftest_test_retval(void)
static void selftest_test_check_declare(void)
#define checkasm_call(func,...)
Call a function with signal handling.
CHECKASM_API int checkasm_float_near_abs_eps(float a, float b, float eps)
Compare floats using absolute epsilon tolerance.
CHECKASM_API CheckasmKey CHECKASM_API void checkasm_set_func_variant(const char *id,...) CHECKASM_PRINTF(1
Set a custom variant identifier for the next checkasm_check_func() call.
void selftest_test_float(float_func fun, const char *name, const float input)
static DEF_NOOP_FUNC(segfault)
static DEF_COPY_FUNC(overwrite_left)
static int identity_ref(const int x)
#define checkasm_check2d_padded(type,...)
Compare two 2D buffers, including padding regions (detect over-write)
static CheckasmKey checkasm_key_ref
Key identifying the reference implementation.
#define checkasm_func_ref
Function pointer to the reference implementation.
#define checkasm_check_rect_padded(rect1,...)
Compare two rectangular buffers including padding.
#define checkasm_call_ref(...)
Call the reference implementation.
static __device__ float sqrtf(float a)
void() noop_func(int unused)
Do nothing.
static int truncate_c(const float x)
void selftest_test_copy(copy_func fun, const char *name, const int min_width)
@ SELFTEST_CPU_FLAG_BAD_C
#define checkasm_fail()
Mark the current test as failed.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define i(width, name, range_min, range_max)
static int wrapper(int_func *func, int arg)
static int identity_new(const int x)
static DEF_FLOAT_FUNC(sqrt)
static void selftest_test_double(double_func fun, const char *name, const double input)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
#define checkasm_declare(ret,...)
Declare a function signature for testing.
CHECKASM_API void checkasm_report(const char *name,...) CHECKASM_PRINTF(1
Report test outcome for a named group of functions.
double() double_func(double input)
CHECKASM_API CheckasmCpu checkasm_get_cpu_flags(void)
Get the current active set of CPU flags.
static void selftest_test_wrappers(void)
void selftest_check_generic(void)
#define checkasm_check2d(type,...)
Compare two 2D buffers and fail test if different.
#define DEF_NOOP_GETTER(FLAG, NAME)
float() float_func(float input)
void selftest_test_noop(noop_func fun, const char *name)
CHECKASM_API int checkasm_double_near_abs_eps(double a, double b, double eps)
Compare doubles using absolute epsilon tolerance.
static int bad(InterplayACMContext *s, unsigned ind, unsigned col)
CHECKASM_API int checkasm_should_fail(CheckasmCpu cpu_flags)
Mark a block of tests as expected to fail.
#define checkasm_call_new(...)
Call the implementation being tested with validation.
#define checkasm_check_rect_padded_align(rect1,...)
Compare two rectangular buffers, with custom alignment (over-write)
static void selftest_test_variants(void)
void() copy_func(uint8_t *dst, const uint8_t *src, size_t size)
Copy size (power-of-two) bytes from aligned buffers src to dst.
#define BUF_RECT(type, name, w, h)
#define CLEAR_BUF_RECT(name)
Clear a rectangular buffer (including padding)
#define checkasm_bench_new(...)
Benchmark the optimized implementation.