mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-11 08:50:17 +00:00
* add vector_type support into thread_copy_v3r1 * remove unncessary type_convert * fixed datatype * fixed dataType * changed API with is_packx_invocable * changed example * add missing cmake file * fixed ci * fixed cmake --------- Co-authored-by: Jing Zhang <jizha@amd.com>
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
#pragma once
|
|
|
|
namespace ck {
|
|
|
|
namespace detail {
|
|
template <class Default, class AlwaysVoid, template <class...> class Op, class... Args>
|
|
struct detector
|
|
{
|
|
using value_t = std::false_type;
|
|
using type = Default;
|
|
};
|
|
|
|
template <class Default, template <class...> class Op, class... Args>
|
|
struct detector<Default, std::void_t<Op<Args...>>, Op, Args...>
|
|
{
|
|
using value_t = std::true_type;
|
|
using type = Op<Args...>;
|
|
};
|
|
} // namespace detail
|
|
|
|
struct nonesuch
|
|
{
|
|
~nonesuch() = delete;
|
|
nonesuch(nonesuch const&) = delete;
|
|
void operator=(nonesuch const&) = delete;
|
|
};
|
|
|
|
template <template <class...> class Op, class... Args>
|
|
using is_detected = typename detail::detector<nonesuch, void, Op, Args...>::value_t;
|
|
|
|
template <typename T>
|
|
using is_pack2_invocable_t = decltype(std::declval<T&>().is_pack2_invocable);
|
|
|
|
template <typename T>
|
|
using is_pack4_invocable_t = decltype(std::declval<T&>().is_pack4_invocable);
|
|
|
|
template <typename T>
|
|
using is_pack8_invocable_t = decltype(std::declval<T&>().is_pack8_invocable);
|
|
|
|
} // namespace ck
|