1
1
#include < sycl/sycl.hpp>
2
2
3
+ #include < helpers/MockKernelInfo.hpp>
3
4
#include < helpers/PiImage.hpp>
4
5
#include < helpers/PiMock.hpp>
5
6
@@ -16,141 +17,51 @@ class TestKernelACC;
16
17
namespace sycl {
17
18
__SYCL_INLINE_VER_NAMESPACE (_V1) {
18
19
namespace detail {
19
- template <> struct KernelInfo <TestKernelCPU> {
20
- static constexpr unsigned getNumParams () { return 0 ; }
21
- static const kernel_param_desc_t &getParamDesc (int ) {
22
- static kernel_param_desc_t Dummy;
23
- return Dummy;
24
- }
20
+ template <>
21
+ struct KernelInfo <TestKernelCPU> : public unittest::MockKernelInfoBase {
25
22
static constexpr const char *getName () { return " TestKernelCPU" ; }
26
- static constexpr bool isESIMD () { return false ; }
27
- static constexpr bool callsThisItem () { return false ; }
28
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
29
- static constexpr int64_t getKernelSize () { return 1 ; }
30
23
};
31
24
32
- } // namespace detail
33
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
34
- } // namespace sycl
35
-
36
- namespace sycl {
37
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
38
- namespace detail {
39
- template <> struct KernelInfo <TestKernelCPUInvalidReqdWGSize1D> {
40
- static constexpr unsigned getNumParams () { return 0 ; }
41
- static const kernel_param_desc_t &getParamDesc (int ) {
42
- static kernel_param_desc_t Dummy;
43
- return Dummy;
25
+ template <>
26
+ struct KernelInfo <TestKernelCPUInvalidReqdWGSize1D>
27
+ : public unittest::MockKernelInfoBase {
28
+ static constexpr const char *getName () {
29
+ return " TestKernelCPUInvalidReqdWGSize1D" ;
44
30
}
45
- static constexpr const char *getName () { return " TestKernelCPUInvalidReqdWGSize1D" ; }
46
- static constexpr bool isESIMD () { return false ; }
47
- static constexpr bool callsThisItem () { return false ; }
48
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
49
- static constexpr int64_t getKernelSize () { return 1 ; }
50
31
};
51
32
52
- } // namespace detail
53
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
54
- } // namespace sycl
55
-
56
- namespace sycl {
57
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
58
- namespace detail {
59
- template <> struct KernelInfo <TestKernelCPUInvalidReqdWGSize2D> {
60
- static constexpr unsigned getNumParams () { return 0 ; }
61
- static const kernel_param_desc_t &getParamDesc (int ) {
62
- static kernel_param_desc_t Dummy;
63
- return Dummy;
33
+ template <>
34
+ struct KernelInfo <TestKernelCPUInvalidReqdWGSize2D>
35
+ : public unittest::MockKernelInfoBase {
36
+ static constexpr const char *getName () {
37
+ return " TestKernelCPUInvalidReqdWGSize2D" ;
64
38
}
65
- static constexpr const char *getName () { return " TestKernelCPUInvalidReqdWGSize2D" ; }
66
- static constexpr bool isESIMD () { return false ; }
67
- static constexpr bool callsThisItem () { return false ; }
68
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
69
- static constexpr int64_t getKernelSize () { return 1 ; }
70
39
};
71
40
72
- } // namespace detail
73
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
74
- } // namespace sycl
75
-
76
- namespace sycl {
77
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
78
- namespace detail {
79
- template <> struct KernelInfo <TestKernelCPUInvalidReqdWGSize3D> {
80
- static constexpr unsigned getNumParams () { return 0 ; }
81
- static const kernel_param_desc_t &getParamDesc (int ) {
82
- static kernel_param_desc_t Dummy;
83
- return Dummy;
84
- }
41
+ template <>
42
+ struct KernelInfo <TestKernelCPUInvalidReqdWGSize3D>
43
+ : public unittest::MockKernelInfoBase {
85
44
static constexpr const char *getName () {
86
45
return " TestKernelCPUInvalidReqdWGSize3D" ;
87
46
}
88
- static constexpr bool isESIMD () { return false ; }
89
- static constexpr bool callsThisItem () { return false ; }
90
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
91
- static constexpr int64_t getKernelSize () { return 1 ; }
92
47
};
93
48
94
- } // namespace detail
95
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
96
- } // namespace sycl
97
-
98
- namespace sycl {
99
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
100
- namespace detail {
101
- template <> struct KernelInfo <TestKernelCPUValidReqdWGSize3D> {
102
- static constexpr unsigned getNumParams () { return 0 ; }
103
- static const kernel_param_desc_t &getParamDesc (int ) {
104
- static kernel_param_desc_t Dummy;
105
- return Dummy;
106
- }
49
+ template <>
50
+ struct KernelInfo <TestKernelCPUValidReqdWGSize3D>
51
+ : public unittest::MockKernelInfoBase {
107
52
static constexpr const char *getName () {
108
53
return " TestKernelCPUValidReqdWGSize3D" ;
109
54
}
110
- static constexpr bool isESIMD () { return false ; }
111
- static constexpr bool callsThisItem () { return false ; }
112
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
113
- static constexpr int64_t getKernelSize () { return 1 ; }
114
55
};
115
56
116
- } // namespace detail
117
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
118
- } // namespace sycl
119
-
120
- namespace sycl {
121
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
122
- namespace detail {
123
- template <> struct KernelInfo <TestKernelGPU> {
124
- static constexpr unsigned getNumParams () { return 0 ; }
125
- static const kernel_param_desc_t &getParamDesc (int ) {
126
- static kernel_param_desc_t Dummy;
127
- return Dummy;
128
- }
57
+ template <>
58
+ struct KernelInfo <TestKernelGPU> : public unittest::MockKernelInfoBase {
129
59
static constexpr const char *getName () { return " TestKernelGPU" ; }
130
- static constexpr bool isESIMD () { return false ; }
131
- static constexpr bool callsThisItem () { return false ; }
132
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
133
- static constexpr int64_t getKernelSize () { return 1 ; }
134
60
};
135
61
136
- } // namespace detail
137
- } // __SYCL_INLINE_VER_NAMESPACE(_V1)
138
- } // namespace sycl
139
-
140
- namespace sycl {
141
- __SYCL_INLINE_VER_NAMESPACE (_V1) {
142
- namespace detail {
143
- template <> struct KernelInfo <TestKernelACC> {
144
- static constexpr unsigned getNumParams () { return 0 ; }
145
- static const kernel_param_desc_t &getParamDesc (int ) {
146
- static kernel_param_desc_t Dummy;
147
- return Dummy;
148
- }
62
+ template <>
63
+ struct KernelInfo <TestKernelACC> : public unittest::MockKernelInfoBase {
149
64
static constexpr const char *getName () { return " TestKernelACC" ; }
150
- static constexpr bool isESIMD () { return false ; }
151
- static constexpr bool callsThisItem () { return false ; }
152
- static constexpr bool callsAnyThisFreeFunction () { return false ; }
153
- static constexpr int64_t getKernelSize () { return 1 ; }
154
65
};
155
66
156
67
} // namespace detail
0 commit comments