xref: /aosp_15_r20/external/deqp/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsScanHelpers.hpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
1 #ifndef _VKTSUBGROUPSSCANHELPERS_HPP
2 #define _VKTSUBGROUPSSCANHELPERS_HPP
3 
4 /*------------------------------------------------------------------------
5  * Vulkan Conformance Tests
6  * ------------------------
7  *
8  * Copyright (c) 2019 The Khronos Group Inc.
9  * Copyright (c) 2019 Google Inc.
10  * Copyright (c) 2017 Codeplay Software Ltd.
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  *      http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  */ /*!
25  * \file
26  * \brief Subgroups Tests
27  */ /*--------------------------------------------------------------------*/
28 
29 #include "vktSubgroupsTestsUtils.hpp"
30 
31 #include <string>
32 
33 enum Operator
34 {
35     OPERATOR_ADD,
36     OPERATOR_MUL,
37     OPERATOR_MIN,
38     OPERATOR_MAX,
39     OPERATOR_AND,
40     OPERATOR_OR,
41     OPERATOR_XOR,
42 };
43 
44 enum ScanType
45 {
46     SCAN_REDUCE,
47     SCAN_INCLUSIVE,
48     SCAN_EXCLUSIVE
49 };
50 
51 std::string getScanOpName(std::string prefix, std::string suffix, Operator op, ScanType scanType);
52 std::string getOpOperation(Operator op, vk::VkFormat format, std::string lhs, std::string rhs);
53 std::string getIdentity(Operator op, vk::VkFormat format);
54 std::string getCompare(Operator op, vk::VkFormat format, std::string lhs, std::string rhs);
55 
56 #endif // _VKTSUBGROUPSSCANHELPERS_HPP
57