![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <CL/cl.h>#include <ctype.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>
Include dependency graph for opencl-math-accuracy.c:Go to the source code of this file.
Data Structures | |
| struct | option_set_t |
Macros | |
| #define | CL_TARGET_OPENCL_VERSION 300 |
| #define | NSAMPLES 200000 |
| #define | XMIN (-8.0f) |
| #define | XMAX (8.0f) |
| #define | FAIL_THRESHOLD 1e-4 |
| #define | BROKEN_THRESHOLD 1e-2 |
| #define | N_OPTION_SETS ((int)(sizeof(OPTION_SETS) / sizeof(OPTION_SETS[0]))) |
Enumerations | |
| enum | op_t { OP_ERF = 0 , OP_GELU , OP_EXP , OP_LOG , OP_TANH , OP_POW , OP_SQRT , OP_DIV , N_OPS } |
Functions | |
| static double | reference (const op_t op, const double x) |
| static void | host_probe (const float *const in, float *const out, const int n, const op_t op) |
| static void | canonical_name (const char *in, char *out, const size_t maxlen) |
| static double | max_error (const float *const got, const float *const in, const int n, const op_t op) |
| static void | print_header (void) |
| int | main (void) |
Variables | |
| static const char * | KERNEL_SRC |
| static const char * | OP_NAME [N_OPS] = { "erf", "GELU", "exp", "log", "tanh", "pow", "sqrt", "divide" } |
| static const option_set_t | OPTION_SETS [] |
| #define BROKEN_THRESHOLD 1e-2 |
Definition at line 65 of file opencl-math-accuracy.c.
| #define CL_TARGET_OPENCL_VERSION 300 |
Definition at line 43 of file opencl-math-accuracy.c.
| #define FAIL_THRESHOLD 1e-4 |
Definition at line 62 of file opencl-math-accuracy.c.
| #define N_OPTION_SETS ((int)(sizeof(OPTION_SETS) / sizeof(OPTION_SETS[0]))) |
Definition at line 154 of file opencl-math-accuracy.c.
| #define NSAMPLES 200000 |
Definition at line 55 of file opencl-math-accuracy.c.
| #define XMAX (8.0f) |
Definition at line 57 of file opencl-math-accuracy.c.
| #define XMIN (-8.0f) |
Definition at line 56 of file opencl-math-accuracy.c.
| enum op_t |
| Enumerator | |
|---|---|
| OP_ERF | |
| OP_GELU | |
| OP_EXP | |
| OP_LOG | |
| OP_TANH | |
| OP_POW | |
| OP_SQRT | |
| OP_DIV | |
| N_OPS | |
Definition at line 88 of file opencl-math-accuracy.c.
|
static |
| int main | ( | void | ) |
Definition at line 209 of file opencl-math-accuracy.c.
References BROKEN_THRESHOLD, canonical_name(), d, f, FAIL_THRESHOLD, flags, host_probe(), i, kernel(), KERNEL_SRC, max_error(), N_OPS, N_OPTION_SETS, name, NSAMPLES, OPTION_SETS, out, p, print_header(), XMAX, and XMIN.
|
static |
Definition at line 178 of file opencl-math-accuracy.c.
References i, n, and reference().
Referenced by dt_iop_channelmixer_shared_roundtrip_error(), and main().
Definition at line 95 of file opencl-math-accuracy.c.
References log, OP_DIV, OP_ERF, OP_EXP, OP_GELU, OP_LOG, OP_POW, OP_SQRT, OP_TANH, and x.
Referenced by _affine_point_from_polar(), _affine_polar_from_point(), _coverage_runs(), _ellipse_sanitize_config(), _modulegroups_sync_section_label_margins(), _white_preserving_point_from_polar(), _white_preserving_polar_from_point(), _write_missing_map(), extract_color_checker(), and max_error().
|
static |
Definition at line 67 of file opencl-math-accuracy.c.
Referenced by main().
|
static |
Definition at line 90 of file opencl-math-accuracy.c.
Referenced by print_header().
|
static |
Definition at line 142 of file opencl-math-accuracy.c.
Referenced by main().