Implementation of hipCtxGetDevice
Change-Id: I067572e486323c3aad6f744a2c0c4997c8696af6
이 커밋은 다음에 포함됨:
@@ -152,3 +152,17 @@ hipError_t hipCtxSetCurrent(hipCtx_t ctx)
|
||||
return ihipLogStatus(e);
|
||||
}
|
||||
|
||||
hipError_t hipCtxGetDevice(hipDevice_t *device)
|
||||
{
|
||||
hipError_t e = hipSuccess;
|
||||
|
||||
ihipCtx_t *ctx = ihipGetTlsDefaultCtx();
|
||||
|
||||
if(ctx == nullptr) {
|
||||
e = hipErrorInvalidContext;
|
||||
}
|
||||
else {
|
||||
*device = (ihipDevice_t*)ctx->getDevice();
|
||||
}
|
||||
return ihipLogStatus(e);
|
||||
}
|
||||
|
||||
새 이슈에서 참조
사용자 차단