Skip to content

Commit 07af0ad

Browse files
committed
Rename into_vector_traits to into_vector_impl
1 parent 3f3edaa commit 07af0ad

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

include/kernel_float/base.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct extent<N> {
173173
};
174174

175175
template<typename T>
176-
struct into_vector_traits {
176+
struct into_vector_impl {
177177
using value_type = T;
178178
using extent_type = extent<1>;
179179

@@ -184,7 +184,7 @@ struct into_vector_traits {
184184
};
185185

186186
template<typename T, size_t N>
187-
struct into_vector_traits<T[N]> {
187+
struct into_vector_impl<T[N]> {
188188
using value_type = T;
189189
using extent_type = extent<N>;
190190

@@ -202,19 +202,19 @@ struct into_vector_traits<T[N]> {
202202
};
203203

204204
template<typename V>
205-
struct into_vector_traits<const V>: into_vector_traits<V> {};
205+
struct into_vector_impl<const V>: into_vector_impl<V> {};
206206

207207
template<typename V>
208-
struct into_vector_traits<V&>: into_vector_traits<V> {};
208+
struct into_vector_impl<V&>: into_vector_impl<V> {};
209209

210210
template<typename V>
211-
struct into_vector_traits<const V&>: into_vector_traits<V> {};
211+
struct into_vector_impl<const V&>: into_vector_impl<V> {};
212212

213213
template<typename V>
214-
struct into_vector_traits<V&&>: into_vector_traits<V> {};
214+
struct into_vector_impl<V&&>: into_vector_impl<V> {};
215215

216216
template<typename T, size_t N, size_t A>
217-
struct into_vector_traits<aligned_array<T, N, A>> {
217+
struct into_vector_impl<aligned_array<T, N, A>> {
218218
using value_type = T;
219219
using extent_type = extent<N>;
220220

@@ -226,7 +226,7 @@ struct into_vector_traits<aligned_array<T, N, A>> {
226226

227227
#define KERNEL_FLOAT_DEFINE_VECTOR_TYPE(T, T1, T2, T3, T4) \
228228
template<> \
229-
struct into_vector_traits<::T1> { \
229+
struct into_vector_impl<::T1> { \
230230
using value_type = T; \
231231
using extent_type = extent<1>; \
232232
\
@@ -237,7 +237,7 @@ struct into_vector_traits<aligned_array<T, N, A>> {
237237
}; \
238238
\
239239
template<> \
240-
struct into_vector_traits<::T2> { \
240+
struct into_vector_impl<::T2> { \
241241
using value_type = T; \
242242
using extent_type = extent<2>; \
243243
\
@@ -248,7 +248,7 @@ struct into_vector_traits<aligned_array<T, N, A>> {
248248
}; \
249249
\
250250
template<> \
251-
struct into_vector_traits<::T3> { \
251+
struct into_vector_impl<::T3> { \
252252
using value_type = T; \
253253
using extent_type = extent<3>; \
254254
\
@@ -259,7 +259,7 @@ struct into_vector_traits<aligned_array<T, N, A>> {
259259
}; \
260260
\
261261
template<> \
262-
struct into_vector_traits<::T4> { \
262+
struct into_vector_impl<::T4> { \
263263
using value_type = T; \
264264
using extent_type = extent<4>; \
265265
\
@@ -288,7 +288,7 @@ template<typename T, typename E, typename S = vector_storage<T, E::size>>
288288
struct vector;
289289

290290
template<typename T, typename E, typename S>
291-
struct into_vector_traits<vector<T, E, S>> {
291+
struct into_vector_impl<vector<T, E, S>> {
292292
using value_type = T;
293293
using extent_type = E;
294294

@@ -310,10 +310,10 @@ struct vector_traits<vector<T, E, S>> {
310310
};
311311

312312
template<typename V>
313-
using vector_value_type = typename into_vector_traits<V>::value_type;
313+
using vector_value_type = typename into_vector_impl<V>::value_type;
314314

315315
template<typename V>
316-
using vector_extent_type = typename into_vector_traits<V>::extent_type;
316+
using vector_extent_type = typename into_vector_impl<V>::extent_type;
317317

318318
template<typename V>
319319
static constexpr size_t vector_extent = vector_extent_type<V>::value;
@@ -329,7 +329,7 @@ using promoted_vector_value_type = promote_t<vector_value_type<Vs>...>;
329329

330330
template<typename V>
331331
KERNEL_FLOAT_INLINE vector_storage_type<V> into_vector_storage(V&& input) {
332-
return into_vector_traits<V>::call(std::forward<V>(input));
332+
return into_vector_impl<V>::call(std::forward<V>(input));
333333
}
334334

335335
} // namespace kernel_float

include/kernel_float/bf16.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ KERNEL_FLOAT_DEFINE_PROMOTED_TYPE(float, __nv_bfloat16)
1616
KERNEL_FLOAT_DEFINE_PROMOTED_TYPE(double, __nv_bfloat16)
1717

1818
template<>
19-
struct into_vector_traits<__nv_bfloat162> {
19+
struct into_vector_impl<__nv_bfloat162> {
2020
using value_type = __nv_bfloat16;
2121
using extent_type = extent<2>;
2222

include/kernel_float/fp16.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ KERNEL_FLOAT_DEFINE_PROMOTED_TYPE(float, __half)
1414
KERNEL_FLOAT_DEFINE_PROMOTED_TYPE(double, __half)
1515

1616
template<>
17-
struct into_vector_traits<__half2> {
17+
struct into_vector_impl<__half2> {
1818
using value_type = __half;
1919
using extent_type = extent<2>;
2020

include/kernel_float/vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ struct vector: public S {
280280
*/
281281
template<typename V>
282282
KERNEL_FLOAT_INLINE into_vector_type<V> into_vector(V&& input) {
283-
return into_vector_traits<V>::call(std::forward<V>(input));
283+
return into_vector_impl<V>::call(std::forward<V>(input));
284284
}
285285

286286
template<typename T>

0 commit comments

Comments
 (0)