Skip to content

Commit

Permalink
update project version and submodules - October 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Oct 23, 2024
1 parent 252898e commit 5088255
Show file tree
Hide file tree
Showing 8 changed files with 316 additions and 22 deletions.
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

0 comments on commit 5088255

Please sign in to comment.