mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-03-21 23:57:39 +00:00
21 lines
336 B
C++
21 lines
336 B
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
namespace ck {
|
|
|
|
template <index_t N>
|
|
static constexpr __device__ index_t get_shift()
|
|
{
|
|
return (get_shift<N / 2>() + 1);
|
|
};
|
|
|
|
template <>
|
|
constexpr __device__ index_t get_shift<1>()
|
|
{
|
|
return (0);
|
|
}
|
|
|
|
} // namespace ck
|