Commit 5a5464b1 authored by Po Yen Chen's avatar Po Yen Chen
Browse files

Add is_number<> type trait

parent 764164b4
...@@ -80,4 +80,17 @@ CK_TILE_BINARY_OP(<=) ...@@ -80,4 +80,17 @@ CK_TILE_BINARY_OP(<=)
#undef CK_TILE_LEFT_UNARY_OP #undef CK_TILE_LEFT_UNARY_OP
#undef CK_TILE_BINARY_OP #undef CK_TILE_BINARY_OP
template <typename T>
struct is_number : bool_constant<false>
{
};
template <index_t v>
struct is_number<number<v>> : bool_constant<true>
{
};
template <typename T>
inline constexpr bool is_number_v = is_number<T>::value;
} // namespace ck_tile } // namespace ck_tile
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment