enable_if.hpp Source File

enable_if.hpp Source File#

Composable Kernel: enable_if.hpp Source File
enable_if.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
6namespace ck {
7#if defined(__HIPCC_RTC__) || defined(CK_CODE_GEN_RTC)
8template <bool B, class T = void>
9struct enable_if
10{
11};
12
13template <class T>
14struct enable_if<true, T>
15{
16 using type = T;
17};
18
19template <bool B, class T = void>
20using enable_if_t = typename enable_if<B, T>::type;
21
22#else
23template <bool B, typename T = void>
24using enable_if = std::enable_if<B, T>;
25
26template <bool B, typename T = void>
27using enable_if_t = typename std::enable_if<B, T>::type;
28#endif
29} // namespace ck
Definition ck.hpp:268
std::enable_if< B, T > enable_if
Definition enable_if.hpp:24
typename std::enable_if< B, T >::type enable_if_t
Definition enable_if.hpp:27