Debian Codegraph @

src/gallium/auxiliary/gallivm/lp_bld_logic.h

raw symbols SCIP
1 /**************************************************************************
2 *
3 * Copyright 2009 VMware, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /**
29 * @file
30 * Helper functions for logical operations.
31 *
32 * @author Jose Fonseca <[email protected]>
33 */
34
35
36 #ifndef LP_BLD_LOGIC_H
37 #define LP_BLD_LOGIC_H
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #include <llvm-c/Core.h>
44
45 #include "pipe/p_defines.h" /* For PIPE_FUNC_xxx */
46
47
48 struct lp_type;
49 struct gallivm_state;
50 struct lp_build_context;
51
52
53 LLVMValueRef
54 lp_build_compare(struct gallivm_state *gallivm,
55 const struct lp_type type,
56 enum pipe_compare_func func,
57 LLVMValueRef a,
58 LLVMValueRef b);
59
60
61 /**
62 * @param func is one of PIPE_FUNC_xxx
63 */
64 LLVMValueRef
65 lp_build_cmp(struct lp_build_context *bld,
66 enum pipe_compare_func func,
67 LLVMValueRef a,
68 LLVMValueRef b);
69
70 LLVMValueRef
71 lp_build_cmp_ordered(struct lp_build_context *bld,
72 enum pipe_compare_func func,
73 LLVMValueRef a,
74 LLVMValueRef b);
75
76 LLVMValueRef
77 lp_build_select_bitwise(struct lp_build_context *bld,
78 LLVMValueRef mask,
79 LLVMValueRef a,
80 LLVMValueRef b);
81
82 LLVMValueRef
83 lp_build_select(struct lp_build_context *bld,
84 LLVMValueRef mask,
85 LLVMValueRef a,
86 LLVMValueRef b);
87
88 LLVMValueRef
89 lp_build_select_aos(struct lp_build_context *bld,
90 unsigned mask,
91 LLVMValueRef a,
92 LLVMValueRef b,
93 unsigned num_channels);
94
95
96 LLVMValueRef
97 lp_build_any_true_range(struct lp_build_context *bld,
98 unsigned real_length,
99 LLVMValueRef val);
100
101 LLVMValueRef
102 lp_build_any_true_range_n(struct lp_build_context *bld,
103 unsigned real_length,
104 unsigned num_channels,
105 LLVMValueRef val);
106
107 #ifdef __cplusplus
108 }
109 #endif
110
111 #endif /* !LP_BLD_LOGIC_H */