Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update project version and submodules - October 2024 #114

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 14)

project(OpenCL-SDK
VERSION 2024.05.08
VERSION 2024.10.24
LANGUAGES
C CXX
)
Expand Down
3 changes: 2 additions & 1 deletion lib/src/Extensions/scripts/call_all.c.mako
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ defaultValueForType = {
# Integral Types
'cl_int' : '0',
'cl_uint' : '0',
'int' : '0',
'size_t' : '0',
'UINT' : '0',
}
Expand Down Expand Up @@ -118,7 +119,7 @@ def getCallArgs(params):
return callstr

%>/*******************************************************************************
// Copyright (c) 2021-2023 Ben Ashbaugh
// Copyright (c) 2021-2024 Ben Ashbaugh
//
// SPDX-License-Identifier: MIT or Apache-2.0
*/
Expand Down
18 changes: 17 additions & 1 deletion lib/src/Extensions/scripts/openclext.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def getCParameterStrings(params):
return strings

%>/*******************************************************************************
// Copyright (c) 2021-2023 Ben Ashbaugh
// Copyright (c) 2021-2024 Ben Ashbaugh
//
// SPDX-License-Identifier: MIT or Apache-2.0
*/
Expand Down Expand Up @@ -271,6 +271,20 @@ static inline cl_platform_id _get_platform(cl_mem memobj)
return _get_platform(context);
}

static inline cl_platform_id _get_platform(cl_event event)
{
if (event == nullptr) return nullptr;

cl_context context = nullptr;
clGetEventInfo(
event,
CL_EVENT_CONTEXT,
sizeof(context),
&context,
nullptr);
return _get_platform(context);
}

/***************************************************************
* Function Pointer Typedefs
***************************************************************/
Expand Down Expand Up @@ -739,6 +753,8 @@ ${api.RetType} CL_API_CALL ${api.Name}(
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[0].Name} > 0 && ${api.Params[1].Name} ? ${api.Params[1].Name}[0] : nullptr);
% elif api.Name == "clEnqueueCommandBufferKHR":
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[2].Name});
% elif api.Name == "clCancelCommandsIMG":
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[1].Name} > 0 && ${api.Params[0].Name} ? ${api.Params[0].Name}[0] : nullptr);
% else:
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(${api.Params[0].Name});
% endif
Expand Down
Loading