FFmpeg
function.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2025, Niklas Haas
3  * Copyright © 2018, VideoLAN and dav1d authors
4  * Copyright © 2018, Two Orioles, LLC
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef CHECKASM_FUNCTION_H
30 #define CHECKASM_FUNCTION_H
31 
32 #include "checkasm/checkasm.h"
33 #include "stats.h"
34 
35 typedef enum CheckasmFuncState {
38  CHECKASM_FUNC_CRASHED, /* signal handler triggered */
40 
41 typedef struct CheckasmFuncVersion {
44  char *suffix; /* optional custom suffix */
49 
50 typedef struct CheckasmFunc {
51  struct CheckasmFunc *child[2];
52  struct CheckasmFunc *prev; /* previous function in current report group */
54  const char *test_name;
55  char *report_name;
56  int report_idx; /* when was this function last reported? */
57  uint8_t color; /* 0 = red, 1 = black */
58  char name[];
59 } CheckasmFunc;
60 
61 typedef struct CheckasmFuncTree {
64 
65 /* Free all resources associated with a function tree and set it to {0}. */
67 
68 /* Get the node for a given function name, creating it if it doesn't exist. */
70 
71 #endif /* CHECKASM_FUNCTION_H */
name
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
Definition: writing_filters.txt:88
CheckasmFuncTree::root
CheckasmFunc * root
Definition: function.h:62
CheckasmFunc::test_name
const char * test_name
Definition: function.h:54
CheckasmFunc
Definition: function.h:50
CheckasmFunc::child
struct CheckasmFunc * child[2]
Definition: function.h:51
CheckasmFuncVersion::suffix
char * suffix
Definition: function.h:44
CheckasmFuncState
CheckasmFuncState
Definition: function.h:35
CheckasmFuncVersion::key
CheckasmKey key
Definition: function.h:45
CheckasmCpuInfo
Describes a CPU feature flag/capability.
Definition: checkasm.h:105
CheckasmFuncVersion
Definition: function.h:41
CheckasmFunc::report_idx
int report_idx
Definition: function.h:56
CheckasmFuncTree
Definition: function.h:61
CheckasmFunc::prev
struct CheckasmFunc * prev
Definition: function.h:52
stats.h
checkasm_func_tree_uninit
void checkasm_func_tree_uninit(CheckasmFuncTree *tree)
Definition: function.c:59
CHECKASM_FUNC_OK
@ CHECKASM_FUNC_OK
Definition: function.h:36
CheckasmFunc::color
uint8_t color
Definition: function.h:57
CHECKASM_FUNC_FAILED
@ CHECKASM_FUNC_FAILED
Definition: function.h:37
CheckasmFunc::report_name
char * report_name
Definition: function.h:55
CheckasmFuncVersion::cpu
const CheckasmCpuInfo * cpu
Definition: function.h:43
CheckasmMeasurement
Definition: stats.h:122
CheckasmFuncVersion::next
struct CheckasmFuncVersion * next
Definition: function.h:42
CHECKASM_FUNC_CRASHED
@ CHECKASM_FUNC_CRASHED
Definition: function.h:38
CheckasmKey
uintptr_t CheckasmKey
Opaque type used to identify function implementations.
Definition: checkasm.h:96
tree
CheckasmFuncTree tree
Definition: checkasm.c:79
CheckasmFunc::name
char name[]
Definition: function.h:58
checkasm_func_get
CheckasmFunc * checkasm_func_get(CheckasmFuncTree *tree, const char *name)
Definition: function.c:141
CheckasmFuncVersion::cycles
CheckasmMeasurement cycles
Definition: function.h:46
CheckasmFunc::versions
CheckasmFuncVersion versions
Definition: function.h:53
CheckasmFuncVersion::state
CheckasmFuncState state
Definition: function.h:47