2626#pragma once
2727
2828#include < complex>
29+ #include < cstdint>
2930#include < type_traits>
3031
3132#include < sycl/sycl.hpp>
@@ -69,14 +70,14 @@ class DispatchTableBuilder
6970 {
7071 std::vector<funcPtrT> per_dstTy = {
7172 factory<funcPtrT, dstTy, bool >{}.get (),
72- factory<funcPtrT, dstTy, int8_t >{}.get (),
73- factory<funcPtrT, dstTy, uint8_t >{}.get (),
74- factory<funcPtrT, dstTy, int16_t >{}.get (),
75- factory<funcPtrT, dstTy, uint16_t >{}.get (),
76- factory<funcPtrT, dstTy, int32_t >{}.get (),
77- factory<funcPtrT, dstTy, uint32_t >{}.get (),
78- factory<funcPtrT, dstTy, int64_t >{}.get (),
79- factory<funcPtrT, dstTy, uint64_t >{}.get (),
73+ factory<funcPtrT, dstTy, std:: int8_t >{}.get (),
74+ factory<funcPtrT, dstTy, std:: uint8_t >{}.get (),
75+ factory<funcPtrT, dstTy, std:: int16_t >{}.get (),
76+ factory<funcPtrT, dstTy, std:: uint16_t >{}.get (),
77+ factory<funcPtrT, dstTy, std:: int32_t >{}.get (),
78+ factory<funcPtrT, dstTy, std:: uint32_t >{}.get (),
79+ factory<funcPtrT, dstTy, std:: int64_t >{}.get (),
80+ factory<funcPtrT, dstTy, std:: uint64_t >{}.get (),
8081 factory<funcPtrT, dstTy, sycl::half>{}.get (),
8182 factory<funcPtrT, dstTy, float >{}.get (),
8283 factory<funcPtrT, dstTy, double >{}.get (),
@@ -93,24 +94,24 @@ class DispatchTableBuilder
9394 void populate_dispatch_table (funcPtrT table[][_num_types]) const
9495 {
9596 const auto map_by_dst_type = {row_per_dst_type<bool >(),
96- row_per_dst_type<int8_t >(),
97- row_per_dst_type<uint8_t >(),
98- row_per_dst_type<int16_t >(),
99- row_per_dst_type<uint16_t >(),
100- row_per_dst_type<int32_t >(),
101- row_per_dst_type<uint32_t >(),
102- row_per_dst_type<int64_t >(),
103- row_per_dst_type<uint64_t >(),
97+ row_per_dst_type<std:: int8_t >(),
98+ row_per_dst_type<std:: uint8_t >(),
99+ row_per_dst_type<std:: int16_t >(),
100+ row_per_dst_type<std:: uint16_t >(),
101+ row_per_dst_type<std:: int32_t >(),
102+ row_per_dst_type<std:: uint32_t >(),
103+ row_per_dst_type<std:: int64_t >(),
104+ row_per_dst_type<std:: uint64_t >(),
104105 row_per_dst_type<sycl::half>(),
105106 row_per_dst_type<float >(),
106107 row_per_dst_type<double >(),
107108 row_per_dst_type<std::complex <float >>(),
108109 row_per_dst_type<std::complex <double >>()};
109110 assert (map_by_dst_type.size () == _num_types);
110111 int dst_id = 0 ;
111- for (auto &row : map_by_dst_type) {
112+ for (const auto &row : map_by_dst_type) {
112113 int src_id = 0 ;
113- for (auto &fn_ptr : row) {
114+ for (const auto &fn_ptr : row) {
114115 table[dst_id][src_id] = fn_ptr;
115116 ++src_id;
116117 }
@@ -139,22 +140,22 @@ class DispatchVectorBuilder
139140 void populate_dispatch_vector (funcPtrT vector[]) const
140141 {
141142 const auto fn_map_by_type = {func_per_type<bool >(),
142- func_per_type<int8_t >(),
143- func_per_type<uint8_t >(),
144- func_per_type<int16_t >(),
145- func_per_type<uint16_t >(),
146- func_per_type<int32_t >(),
147- func_per_type<uint32_t >(),
148- func_per_type<int64_t >(),
149- func_per_type<uint64_t >(),
143+ func_per_type<std:: int8_t >(),
144+ func_per_type<std:: uint8_t >(),
145+ func_per_type<std:: int16_t >(),
146+ func_per_type<std:: uint16_t >(),
147+ func_per_type<std:: int32_t >(),
148+ func_per_type<std:: uint32_t >(),
149+ func_per_type<std:: int64_t >(),
150+ func_per_type<std:: uint64_t >(),
150151 func_per_type<sycl::half>(),
151152 func_per_type<float >(),
152153 func_per_type<double >(),
153154 func_per_type<std::complex <float >>(),
154155 func_per_type<std::complex <double >>()};
155156 assert (fn_map_by_type.size () == _num_types);
156157 int ty_id = 0 ;
157- for (auto &fn : fn_map_by_type) {
158+ for (const auto &fn : fn_map_by_type) {
158159 vector[ty_id] = fn;
159160 ++ty_id;
160161 }
0 commit comments