Skip to content

Commit

Permalink
Fix some casts after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
omarahmed1111 committed Mar 26, 2024
1 parent bd15a82 commit 820779f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/adapters/opencl/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferGetInfoExp(
ur_exp_command_buffer_info_t propName, size_t propSize, void *pPropValue,
size_t *pPropSizeRet) {

cl_context CLContext = cl_adapter::cast<cl_context>(hCommandBuffer->hContext);
cl_context CLContext = hCommandBuffer->hContext->get();
cl_ext::clGetCommandBufferInfoKHR_fn clGetCommandBufferInfoKHR = nullptr;
cl_int Res =
cl_ext::getExtFuncFromContext<decltype(clGetCommandBufferInfoKHR)>(
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/opencl/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
}

case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP: {
cl_device_id Dev = cl_adapter::cast<cl_device_id>(hDevice);
cl_device_id Dev = hDevice->get();
size_t ExtSize = 0;
CL_RETURN_ON_FAILURE(
clGetDeviceInfo(Dev, CL_DEVICE_EXTENSIONS, 0, nullptr, &ExtSize));
Expand Down
9 changes: 4 additions & 5 deletions source/adapters/opencl/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramGetGlobalVariablePointer(
void **ppGlobalVariablePointerRet) {

cl_context CLContext = nullptr;
CL_RETURN_ON_FAILURE(clGetProgramInfo(cl_adapter::cast<cl_program>(hProgram),
CL_PROGRAM_CONTEXT, sizeof(CLContext),
&CLContext, nullptr));
CL_RETURN_ON_FAILURE(clGetProgramInfo(hProgram->get(), CL_PROGRAM_CONTEXT,
sizeof(CLContext), &CLContext,
nullptr));

cl_ext::clGetDeviceGlobalVariablePointer_fn FuncT = nullptr;

Expand All @@ -545,8 +545,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramGetGlobalVariablePointer(
cl_ext::GetDeviceGlobalVariablePointerName, &FuncT));

const cl_int CLResult =
FuncT(cl_adapter::cast<cl_device_id>(hDevice),
cl_adapter::cast<cl_program>(hProgram), pGlobalVariableName,
FuncT(hDevice->get(), hProgram->get(), pGlobalVariableName,
pGlobalVariableSizeRet, ppGlobalVariablePointerRet);

if (CLResult != CL_SUCCESS) {
Expand Down

0 comments on commit 820779f

Please sign in to comment.