mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-03-21 07:37:38 +00:00
30 lines
601 B
C++
30 lines
601 B
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
namespace ck {
|
|
#if defined(__HIPCC_RTC__) || defined(CK_CODE_GEN_RTC)
|
|
template <bool B, class T = void>
|
|
struct enable_if
|
|
{
|
|
};
|
|
|
|
template <class T>
|
|
struct enable_if<true, T>
|
|
{
|
|
using type = T;
|
|
};
|
|
|
|
template <bool B, class T = void>
|
|
using enable_if_t = typename enable_if<B, T>::type;
|
|
|
|
#else
|
|
template <bool B, typename T = void>
|
|
using enable_if = std::enable_if<B, T>;
|
|
|
|
template <bool B, typename T = void>
|
|
using enable_if_t = typename std::enable_if<B, T>::type;
|
|
#endif
|
|
} // namespace ck
|