mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-12 09:16:52 +00:00
19 lines
381 B
C++
19 lines
381 B
C++
#pragma once
|
|
|
|
template <class TData, unsigned NSize>
|
|
struct Array
|
|
{
|
|
using Type = Array<TData, NSize>;
|
|
|
|
static constexpr unsigned nSize = NSize;
|
|
|
|
unsigned mData[nSize];
|
|
|
|
template <class... Xs>
|
|
__host__ __device__ Array(Xs... xs) : mData({static_cast<TData>(xs)...})
|
|
{
|
|
}
|
|
|
|
__host__ __device__ TData operator[](unsigned i) const { return mData[i]; }
|
|
};
|