1 //
2 // Copyright (c) 2021 The Khronos Group Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //    http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef TEST_FUNCTIONS_H
17 #define TEST_FUNCTIONS_H
18 
19 #include "function_list.h"
20 
21 // float foo(float)
22 int TestFunc_Float_Float(const Func *f, MTdata, bool relaxedMode);
23 
24 // double foo(double)
25 int TestFunc_Double_Double(const Func *f, MTdata, bool relaxedMode);
26 
27 // int foo(float)
28 int TestFunc_Int_Float(const Func *f, MTdata, bool relaxedMode);
29 
30 // int foo(double)
31 int TestFunc_Int_Double(const Func *f, MTdata, bool relaxedMode);
32 
33 // float foo(uint)
34 int TestFunc_Float_UInt(const Func *f, MTdata, bool relaxedMode);
35 
36 // double foo(ulong)
37 int TestFunc_Double_ULong(const Func *f, MTdata, bool relaxedMode);
38 
39 // Returns {0, 1} for scalar and {0, -1} for vector.
40 // int foo(float)
41 int TestMacro_Int_Float(const Func *f, MTdata, bool relaxedMode);
42 
43 // Returns {0, 1} for scalar and {0, -1} for vector.
44 // int foo(double)
45 int TestMacro_Int_Double(const Func *f, MTdata, bool relaxedMode);
46 
47 // float foo(float, float)
48 int TestFunc_Float_Float_Float(const Func *f, MTdata, bool relaxedMode);
49 
50 // double foo(double, double)
51 int TestFunc_Double_Double_Double(const Func *f, MTdata, bool relaxedMode);
52 
53 // Special handling for nextafter.
54 // float foo(float, float)
55 int TestFunc_Float_Float_Float_nextafter(const Func *f, MTdata,
56                                          bool relaxedMode);
57 
58 // Special handling for nextafter.
59 // double foo(double, double)
60 int TestFunc_Double_Double_Double_nextafter(const Func *f, MTdata,
61                                             bool relaxedMode);
62 
63 // float op float
64 int TestFunc_Float_Float_Float_Operator(const Func *f, MTdata,
65                                         bool relaxedMode);
66 
67 // double op double
68 int TestFunc_Double_Double_Double_Operator(const Func *f, MTdata,
69                                            bool relaxedMode);
70 
71 // float foo(float, int)
72 int TestFunc_Float_Float_Int(const Func *f, MTdata, bool relaxedMode);
73 
74 // double foo(double, int)
75 int TestFunc_Double_Double_Int(const Func *f, MTdata, bool relaxedMode);
76 
77 // Returns {0, 1} for scalar and {0, -1} for vector.
78 // int foo(float, float)
79 int TestMacro_Int_Float_Float(const Func *f, MTdata, bool relaxedMode);
80 
81 // Returns {0, 1} for scalar and {0, -1} for vector.
82 // int foo(double, double)
83 int TestMacro_Int_Double_Double(const Func *f, MTdata, bool relaxedMode);
84 
85 // float foo(float, float, float)
86 int TestFunc_Float_Float_Float_Float(const Func *f, MTdata, bool relaxedMode);
87 
88 // double foo(double, double, double)
89 int TestFunc_Double_Double_Double_Double(const Func *f, MTdata,
90                                          bool relaxedMode);
91 
92 // float foo(float, float*)
93 int TestFunc_Float2_Float(const Func *f, MTdata, bool relaxedMode);
94 
95 // double foo(double, double*)
96 int TestFunc_Double2_Double(const Func *f, MTdata, bool relaxedMode);
97 
98 // float foo(float, int*)
99 int TestFunc_FloatI_Float(const Func *f, MTdata, bool relaxedMode);
100 
101 // double foo(double, int*)
102 int TestFunc_DoubleI_Double(const Func *f, MTdata, bool relaxedMode);
103 
104 // float foo(float, float, int*)
105 int TestFunc_FloatI_Float_Float(const Func *f, MTdata, bool relaxedMode);
106 
107 // double foo(double, double, int*)
108 int TestFunc_DoubleI_Double_Double(const Func *f, MTdata, bool relaxedMode);
109 
110 // Special handling for mad.
111 // float mad(float, float, float)
112 int TestFunc_mad_Float(const Func *f, MTdata, bool relaxedMode);
113 
114 // Special handling for mad.
115 // double mad(double, double, double)
116 int TestFunc_mad_Double(const Func *f, MTdata, bool relaxedMode);
117 
118 #endif
119