mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-26 08:00:13 +00:00
let more integral_constant->constant, and formating
This commit is contained in:
@@ -60,7 +60,7 @@ struct sequence
|
||||
CK_TILE_HOST_DEVICE static constexpr auto get()
|
||||
{
|
||||
static_assert(I < size(), "wrong! I too large");
|
||||
return number<impl::at_index_t<I, integral_constant<value_type, Is>...>{}>{};
|
||||
return number<impl::at_index_t<I, constant<Is>...>{}>{};
|
||||
}
|
||||
|
||||
template <index_t I>
|
||||
@@ -81,7 +81,7 @@ struct sequence
|
||||
CK_TILE_HOST_DEVICE static constexpr auto at()
|
||||
{
|
||||
static_assert(I < size(), "wrong! I too large");
|
||||
return number<impl::at_index_t<I, integral_constant<value_type, Is>...>{}>{};
|
||||
return number<impl::at_index_t<I, constant<Is>...>{}>{};
|
||||
}
|
||||
|
||||
template <index_t I>
|
||||
@@ -384,7 +384,7 @@ template <index_t... Ids, index_t... Ns>
|
||||
struct seq_reverse<sequence<Ids...>, Ns...>
|
||||
{
|
||||
template <index_t I>
|
||||
using element = impl::at_index_t<I, integral_constant<index_t, Ns>...>;
|
||||
using element = impl::at_index_t<I, constant<Ns>...>;
|
||||
using type = sequence<element<(sizeof...(Ns) - 1 - Ids)>::value...>;
|
||||
};
|
||||
} // namespace impl
|
||||
|
||||
@@ -274,6 +274,17 @@ struct tuple : impl::tuple_base<make_index_sequence<sizeof...(T)>, T...>
|
||||
#undef TP_COM_
|
||||
};
|
||||
|
||||
template <typename>
|
||||
struct vector_traits;
|
||||
|
||||
// specialization for array
|
||||
template <typename... T>
|
||||
struct vector_traits<tuple<T...>>
|
||||
{
|
||||
using scalar_type = __type_pack_element<0, T...>;
|
||||
static constexpr index_t vector_size = sizeof...(T);
|
||||
};
|
||||
|
||||
// template <class... T>
|
||||
// CK_TILE_HOST_DEVICE constexpr
|
||||
// tuple<T...>
|
||||
|
||||
Reference in New Issue
Block a user