get_shift.hpp Source File

get_shift.hpp Source File#

Composable Kernel: get_shift.hpp Source File
get_shift.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
6namespace ck {
7
8template <index_t N>
9static constexpr __device__ index_t get_shift()
10{
11 return (get_shift<N / 2>() + 1);
12};
13
14template <>
15constexpr __device__ index_t get_shift<1>()
16{
17 return (0);
18}
19
20} // namespace ck
Definition ck.hpp:268
int32_t index_t
Definition ck.hpp:299
constexpr __device__ index_t get_shift< 1 >()
Definition get_shift.hpp:15