statically_indexed_array.hpp Source File

statically_indexed_array.hpp Source File#

Composable Kernel: statically_indexed_array.hpp Source File
tile/core/container/statically_indexed_array.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
10
11namespace ck_tile {
12
13#if CK_TILE_STATICALLY_INDEXED_ARRAY_DEFAULT == CK_TILE_STATICALLY_INDEXED_ARRAY_USE_TUPLE
14
15template <typename T, index_t N>
17
18#else
19
20// consider mark this struct as deprecated
21template <typename T, index_t N>
23
24#endif
25
26// consider always use ck_tile::array for this purpose
27#if 0
28template <typename X, typename... Xs>
29CK_TILE_HOST_DEVICE constexpr auto make_statically_indexed_array(const X& x, const Xs&... xs)
30{
31 return statically_indexed_array<X, sizeof...(Xs) + 1>(x, static_cast<X>(xs)...);
32}
33
34// make empty statically_indexed_array
35template <typename X>
36CK_TILE_HOST_DEVICE constexpr auto make_statically_indexed_array()
37{
39}
40#endif
41} // namespace ck_tile
#define CK_TILE_HOST_DEVICE
Definition config.hpp:42
Definition tile/core/algorithm/cluster_descriptor.hpp:13
typename impl::tuple_array_impl< T, N >::type tuple_array
Definition tile/core/container/tuple.hpp:28
tuple_array< T, N > statically_indexed_array
Definition tile/core/container/statically_indexed_array.hpp:16
A fixed-size array container similar to std::array with additional utilities.
Definition tile/core/container/array.hpp:43