Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
7aaa9032
Commit
7aaa9032
authored
10 years ago
by
Yichao Yu
Browse files
Options
Downloads
Patches
Plain Diff
Event.set_support_cb
parent
540e17d3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyopencl/c_wrapper/wrap_cl_core.h
+1
-0
1 addition, 0 deletions
pyopencl/c_wrapper/wrap_cl_core.h
pyopencl/cffi_cl.py
+11
-0
11 additions, 0 deletions
pyopencl/cffi_cl.py
src/c_wrapper/event.cpp
+7
-0
7 additions, 0 deletions
src/c_wrapper/event.cpp
with
19 additions
and
0 deletions
pyopencl/c_wrapper/wrap_cl_core.h
+
1
−
0
View file @
7aaa9032
...
...
@@ -140,6 +140,7 @@ type_t image__get_fill_type(clobj_t img);
error
*
event__get_profiling_info
(
clobj_t
event
,
cl_profiling_info
param
,
generic_info
*
out
);
error
*
event__wait
(
clobj_t
event
);
void
event__set_support_cb
(
clobj_t
_evt
,
int
support
);
error
*
event__set_callback
(
clobj_t
_evt
,
cl_int
type
,
void
*
pyobj
);
error
*
wait_for_events
(
const
clobj_t
*
_wait_for
,
uint32_t
num_wait_for
);
// Nanny Event
...
...
This diff is collapsed.
Click to expand it.
pyopencl/cffi_cl.py
+
11
−
0
View file @
7aaa9032
...
...
@@ -883,6 +883,17 @@ class Kernel(_Common):
class
Event
(
_Common
):
_id
=
'
event
'
@classmethod
def
_create
(
cls
,
ptr
):
self
=
_Common
.
_create
.
__func__
(
cls
,
ptr
)
try
:
if
(
self
.
context
.
_get_cl_version
()
>=
(
1
,
1
)
and
get_cl_header_version
()
>=
(
1
,
1
)):
_lib
.
event__set_support_cb
(
ptr
,
1
);
except
:
pass
return
self
def
__init__
(
self
):
pass
...
...
This diff is collapsed.
Click to expand it.
src/c_wrapper/event.cpp
+
7
−
0
View file @
7aaa9032
...
...
@@ -198,6 +198,13 @@ event__wait(clobj_t evt)
}
#if PYOPENCL_CL_VERSION >= 0x1010
void
event__set_support_cb
(
clobj_t
_evt
,
int
support
)
{
auto
evt
=
static_cast
<
event
*>
(
_evt
);
evt
->
support_cb
=
support
;
}
error
*
event__set_callback
(
clobj_t
_evt
,
cl_int
type
,
void
*
pyobj
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment