@@ -27,7 +27,7 @@ using AliasType = float;
27
27
28
28
template <typename T>
29
29
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY ((syclexp::nd_range_kernel<1 >))
30
- void tempalted_func (T start, T *ptr) {
30
+ void templated_func (T start, T *ptr) {
31
31
size_t id = syclext::this_work_item::get_nd_item<1 >().get_global_linear_id ();
32
32
}
33
33
@@ -40,13 +40,13 @@ void templated_func_uses_id(sycl::id<1> idx, T *ptr) {
40
40
41
41
template <typename T = TestStruct>
42
42
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY ((syclexp::nd_range_kernel<1 >))
43
- void tempalted_func_with_default_type (T start, T *ptr) {
43
+ void templated_func_with_default_type (T start, T *ptr) {
44
44
size_t id = syclext::this_work_item::get_nd_item<1 >().get_global_linear_id ();
45
45
}
46
46
47
47
template <typename T, class Y >
48
48
SYCL_EXT_ONEAPI_FUNCTION_PROPERTY ((syclexp::nd_range_kernel<1 >))
49
- void tempalted_func_with_different_types (T *ptr1, Y *ptr2) {
49
+ void templated_func_with_different_types (T *ptr1, Y *ptr2) {
50
50
size_t id = syclext::this_work_item::get_nd_item<1 >().get_global_linear_id ();
51
51
}
52
52
@@ -87,64 +87,64 @@ static void call_kernel_code_with_different_types(sycl::queue &q,
87
87
}
88
88
89
89
template <typename T>
90
- void test_tempalted_func (sycl::queue &q, sycl::context &ctxt) {
90
+ void test_templated_func (sycl::queue &q, sycl::context &ctxt) {
91
91
// Get a kernel bundle that contains the free function kernel
92
- // "tempalted_func ".
92
+ // "templated_func ".
93
93
auto exe_bndl =
94
- syclexp::get_kernel_bundle<tempalted_func <T>,
94
+ syclexp::get_kernel_bundle<templated_func <T>,
95
95
sycl::bundle_state::executable>(ctxt);
96
- // Get a kernel object for the "tempalted_func " function from that bundle.
97
- sycl::kernel k_tempalted_func =
98
- exe_bndl.template ext_oneapi_get_kernel <tempalted_func <T>>();
99
- call_kernel_code<T>(q, k_tempalted_func );
96
+ // Get a kernel object for the "templated_func " function from that bundle.
97
+ sycl::kernel k_templated_func =
98
+ exe_bndl.template ext_oneapi_get_kernel <templated_func <T>>();
99
+ call_kernel_code<T>(q, k_templated_func );
100
100
}
101
101
102
102
template <typename T>
103
103
void test_templated_func_with_id (sycl::queue &q, sycl::context &ctxt) {
104
104
auto exe_bndl =
105
105
syclexp::get_kernel_bundle<templated_func_uses_id<T>,
106
106
sycl::bundle_state::executable>(ctxt);
107
- sycl::kernel k_tempalted_func =
107
+ sycl::kernel k_templated_func =
108
108
exe_bndl.template ext_oneapi_get_kernel <templated_func_uses_id<T>>();
109
- call_kernel_code_with_id<T>(q, k_tempalted_func );
109
+ call_kernel_code_with_id<T>(q, k_templated_func );
110
110
}
111
111
112
112
template <typename T = TestStruct>
113
113
void test_templated_func_with_default_type (sycl::queue &q,
114
114
sycl::context &ctxt) {
115
115
auto exe_bndl =
116
- syclexp::get_kernel_bundle<tempalted_func_with_default_type <T>,
116
+ syclexp::get_kernel_bundle<templated_func_with_default_type <T>,
117
117
sycl::bundle_state::executable>(ctxt);
118
- sycl::kernel k_tempalted_func = exe_bndl.template ext_oneapi_get_kernel <
119
- tempalted_func_with_default_type <T>>();
120
- call_kernel_code<T>(q, k_tempalted_func );
118
+ sycl::kernel k_templated_func = exe_bndl.template ext_oneapi_get_kernel <
119
+ templated_func_with_default_type <T>>();
120
+ call_kernel_code<T>(q, k_templated_func );
121
121
}
122
122
123
123
template <typename T, class Y >
124
124
void test_templated_func_with_different_types (sycl::queue &q,
125
125
sycl::context &ctxt) {
126
126
auto exe_bndl =
127
- syclexp::get_kernel_bundle<tempalted_func_with_different_types <T, Y>,
127
+ syclexp::get_kernel_bundle<templated_func_with_different_types <T, Y>,
128
128
sycl::bundle_state::executable>(ctxt);
129
- sycl::kernel k_tempalted_func = exe_bndl.template ext_oneapi_get_kernel <
130
- tempalted_func_with_different_types <T, Y>>();
131
- call_kernel_code_with_different_types<T, Y>(q, k_tempalted_func );
129
+ sycl::kernel k_templated_func = exe_bndl.template ext_oneapi_get_kernel <
130
+ templated_func_with_different_types <T, Y>>();
131
+ call_kernel_code_with_different_types<T, Y>(q, k_templated_func );
132
132
}
133
133
134
134
// TODO: Add tests to check accessors
135
135
136
136
int main () {
137
137
sycl::queue q;
138
138
sycl::context ctxt = q.get_context ();
139
- test_tempalted_func <TestClass>(q, ctxt);
140
- test_tempalted_func <TestStruct>(q, ctxt);
141
- test_tempalted_func <free_functions::tests::TestClass>(q, ctxt);
142
- test_tempalted_func <free_functions::tests::TestStruct>(q, ctxt);
143
- test_tempalted_func <AliasType>(q, ctxt);
144
- test_tempalted_func <sycl::id<1 >>(q, ctxt);
145
- test_tempalted_func <sycl::range<2 >>(q, ctxt);
146
- test_tempalted_func <sycl::marray<int , 4 >>(q, ctxt);
147
- test_tempalted_func <sycl::vec<int , 4 >>(q, ctxt);
139
+ test_templated_func <TestClass>(q, ctxt);
140
+ test_templated_func <TestStruct>(q, ctxt);
141
+ test_templated_func <free_functions::tests::TestClass>(q, ctxt);
142
+ test_templated_func <free_functions::tests::TestStruct>(q, ctxt);
143
+ test_templated_func <AliasType>(q, ctxt);
144
+ test_templated_func <sycl::id<1 >>(q, ctxt);
145
+ test_templated_func <sycl::range<2 >>(q, ctxt);
146
+ test_templated_func <sycl::marray<int , 4 >>(q, ctxt);
147
+ test_templated_func <sycl::vec<int , 4 >>(q, ctxt);
148
148
test_templated_func_with_default_type<free_functions::tests::TestClass>(q,
149
149
ctxt);
150
150
test_templated_func_with_default_type (q, ctxt);
0 commit comments