1// Generated from "/code/pytorch/third_party/nvfuser/runtime/type_traits.cu"
2// 2023-02-12 08:01:26
3
4namespace nvfuser_resources {
5
6constexpr const char* type_traits_cu = R"(
7// Type trait utils
8template <typename Type, bool is_volatile>
9struct MaybeVolatile;
10
11template <typename Type>
12struct MaybeVolatile<Type, true> {
13 using type = volatile Type;
14};
15
16template <typename Type>
17struct MaybeVolatile<Type, false> {
18 using type = Type;
19};
20
21template <typename... Types>
22struct TypeList {};
23
24template <int idx, typename T, typename... Types>
25struct TypeSelector {
26 using type = typename TypeSelector<idx - 1, Types...>::type;
27};
28
29template <typename T, typename... Types>
30struct TypeSelector<0, T, Types...> {
31 using type = T;
32};
33
34template <typename T0, typename T1>
35struct IsSameType {
36 static constexpr bool value = false;
37};
38
39template <typename T0>
40struct IsSameType<T0, T0> {
41 static constexpr bool value = true;
42};
43
44template <typename T>
45struct IsPointerType {
46 static constexpr bool value = false;
47};
48
49template <typename T>
50struct IsPointerType<T*> {
51 static constexpr bool value = true;
52};
53)";
54
55} // namespace nvfuser_resources
56