FFmpeg
Loading...
Searching...
No Matches
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
40
49
50typedef struct CheckasmFunc {
51 struct CheckasmFunc *child[2];
52 struct CheckasmFunc *prev; /* previous function in current report group */
54 const char *test_name;
56 int report_idx; /* when was this function last reported? */
57 uint8_t color; /* 0 = red, 1 = black */
58 char name[];
60
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 */
uintptr_t CheckasmKey
Opaque type used to identify function implementations.
Definition checkasm.h:96
CheckasmFuncTree tree
Definition checkasm.c:79
void checkasm_func_tree_uninit(CheckasmFuncTree *tree)
Definition function.c:59
CheckasmFuncState
Definition function.h:35
@ CHECKASM_FUNC_FAILED
Definition function.h:37
@ CHECKASM_FUNC_CRASHED
Definition function.h:38
@ CHECKASM_FUNC_OK
Definition function.h:36
CheckasmFunc * checkasm_func_get(CheckasmFuncTree *tree, const char *name)
Definition function.c:141
const char * name
Definition qsvenc.c:142
Describes a CPU feature flag/capability.
Definition checkasm.h:105
CheckasmFunc * root
Definition function.h:62
CheckasmKey key
Definition function.h:45
CheckasmFuncState state
Definition function.h:47
CheckasmMeasurement cycles
Definition function.h:46
const CheckasmCpuInfo * cpu
Definition function.h:43
struct CheckasmFuncVersion * next
Definition function.h:42
char * report_name
Definition function.h:55
uint8_t color
Definition function.h:57
struct CheckasmFunc * child[2]
Definition function.h:51
int report_idx
Definition function.h:56
char name[]
Definition function.h:58
CheckasmFuncVersion versions
Definition function.h:53
const char * test_name
Definition function.h:54
struct CheckasmFunc * prev
Definition function.h:52