/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/get_shift.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/get_shift.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/utility/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 
6 namespace ck {
7 
8 template <index_t N>
9 static constexpr __device__ index_t get_shift()
10 {
11  return (get_shift<N / 2>() + 1);
12 };
13 
14 template <>
15 constexpr __device__ index_t get_shift<1>()
16 {
17  return (0);
18 }
19 
20 } // namespace ck
Definition: ck.hpp:267
constexpr __device__ index_t get_shift< 1 >()
Definition: get_shift.hpp:15
int32_t index_t
Definition: ck.hpp:298