Re-sync with upstream.
이 커밋은 다음에 포함됨:
커밋
30d90dab38
65 파일이 변경됨
+320
-265
검색과 일치하는 파일 없음
@@ -381,6 +381,27 @@ __device__ void __threadfence_system(void) ;
|
||||
* @}
|
||||
*/
|
||||
|
||||
template<typename std::common_type<
|
||||
decltype(hc_get_group_id),
|
||||
decltype(hc_get_group_size),
|
||||
decltype(hc_get_num_groups),
|
||||
decltype(hc_get_workitem_id)>::type f>
|
||||
class Coordinates {
|
||||
using R = decltype(f(0));
|
||||
|
||||
struct X { __device__ operator R() const { return f(0); } };
|
||||
struct Y { __device__ operator R() const { return f(1); } };
|
||||
struct Z { __device__ operator R() const { return f(2); } };
|
||||
public:
|
||||
static constexpr X x{};
|
||||
static constexpr Y y{};
|
||||
static constexpr Z z{};
|
||||
};
|
||||
|
||||
static constexpr Coordinates<hc_get_group_size> blockDim;
|
||||
static constexpr Coordinates<hc_get_group_id> blockIdx;
|
||||
static constexpr Coordinates<hc_get_num_groups> gridDim;
|
||||
static constexpr Coordinates<hc_get_workitem_id> threadIdx;
|
||||
|
||||
#define hipThreadIdx_x (hc_get_workitem_id(0))
|
||||
#define hipThreadIdx_y (hc_get_workitem_id(1))
|
||||
|
||||
새 이슈에서 참조
사용자 차단