mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-03-24 00:57:39 +00:00
23 lines
522 B
C++
23 lines
522 B
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
#include "get_id.hpp"
|
|
|
|
namespace ck {
|
|
|
|
template <index_t ThreadPerBlock>
|
|
struct ThisThreadBlock
|
|
{
|
|
static constexpr index_t kNumThread_ = ThreadPerBlock;
|
|
|
|
__device__ static constexpr index_t GetNumOfThread() { return kNumThread_; }
|
|
|
|
__device__ static constexpr bool IsBelong() { return true; }
|
|
|
|
__device__ static index_t GetThreadId() { return get_thread_local_1d_id(); }
|
|
};
|
|
|
|
} // namespace ck
|