include/ck/utility/enable_if.hpp Source File# Composable Kernel: include/ck/utility/enable_if.hpp Source File includeckutility 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 6 namespace ck { 7 8 #ifndef CK_CODE_GEN_RTC 9 template <bool B, typename T = void> 10 using enable_if = std::enable_if<B, T>; 11 12 template <bool B, typename T = void> 13 using enable_if_t = typename std::enable_if<B, T>::type; 14 15 #else 16 template <bool B, class T = void> 17 struct enable_if 18 { 19 }; 20 21 template <class T> 22 struct enable_if<true, T> 23 { 24 using type = T; 25 }; 26 27 template <bool B, class T = void> 28 using enable_if_t = typename enable_if<B, T>::type; 29 #endif 30 31 } // namespace ck ckDefinition: ck.hpp:264 ck::enable_ifstd::enable_if< B, T > enable_ifDefinition: enable_if.hpp:10 ck::enable_if_ttypename std::enable_if< B, T >::type enable_if_tDefinition: enable_if.hpp:13