is_detected.hpp Source File

is_detected.hpp Source File#

Composable Kernel: is_detected.hpp Source File
is_detected.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
7
8namespace ck {
9
10namespace detail {
11template <class Default, class AlwaysVoid, template <class...> class Op, class... Args>
17
18template <class Default, template <class...> class Op, class... Args>
19struct detector<Default, ck::void_t<Op<Args...>>, Op, Args...>
20{
22 using type = Op<Args...>;
23};
24} // namespace detail
25
27{
28 ~nonesuch() = delete;
29 nonesuch(nonesuch const&) = delete;
30 void operator=(nonesuch const&) = delete;
31};
32
33template <template <class...> class Op, class... Args>
34using is_detected = typename detail::detector<nonesuch, void, Op, Args...>::value_t;
35
36template <typename T>
37using is_pack2_invocable_t = decltype(ck::declval<T&>().is_pack2_invocable);
38
39template <typename T>
40using is_pack4_invocable_t = decltype(ck::declval<T&>().is_pack4_invocable);
41
42template <typename T>
43using is_pack8_invocable_t = decltype(ck::declval<T&>().is_pack8_invocable);
44
45} // namespace ck
Definition threadwise_tensor_slice_transfer_util.hpp:15
Definition ck.hpp:268
decltype(ck::declval< T & >().is_pack8_invocable) is_pack8_invocable_t
Definition is_detected.hpp:43
decltype(ck::declval< T & >().is_pack4_invocable) is_pack4_invocable_t
Definition is_detected.hpp:40
typename detail::detector< nonesuch, void, Op, Args... >::value_t is_detected
Definition is_detected.hpp:34
decltype(ck::declval< T & >().is_pack2_invocable) is_pack2_invocable_t
Definition is_detected.hpp:37
@ Default
Definition loop_scheduler.hpp:16
integral_constant< bool, true > value_t
Definition is_detected.hpp:21
Definition is_detected.hpp:13
Default type
Definition is_detected.hpp:15
integral_constant< bool, false > value_t
Definition is_detected.hpp:14
Definition utility/integral_constant.hpp:20
Definition is_detected.hpp:27
void operator=(nonesuch const &)=delete
~nonesuch()=delete
nonesuch(nonesuch const &)=delete