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
d19d94cf
Commit
d19d94cf
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Use correct CL API calling convention for function pointers (reported by Christoph Gohlke)
parent
7a9da07c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/c_wrapper/error.h
+3
-3
3 additions, 3 deletions
src/c_wrapper/error.h
with
3 additions
and
3 deletions
src/c_wrapper/error.h
+
3
−
3
View file @
d19d94cf
...
@@ -227,7 +227,7 @@ make_clargpack(Types&&... args)
...
@@ -227,7 +227,7 @@ make_clargpack(Types&&... args)
template
<
typename
...
ArgTypes2
,
typename
...
ArgTypes
>
template
<
typename
...
ArgTypes2
,
typename
...
ArgTypes
>
static
PYOPENCL_INLINE
void
static
PYOPENCL_INLINE
void
call_guarded
(
cl_int
(
*
func
)(
ArgTypes
...),
const
char
*
name
,
ArgTypes2
&&
...
args
)
call_guarded
(
cl_int
(
CL_API_CALL
*
func
)(
ArgTypes
...),
const
char
*
name
,
ArgTypes2
&&
...
args
)
{
{
auto
argpack
=
make_clargpack
(
std
::
forward
<
ArgTypes2
>
(
args
)...);
auto
argpack
=
make_clargpack
(
std
::
forward
<
ArgTypes2
>
(
args
)...);
cl_int
status_code
=
argpack
.
clcall
(
func
,
name
);
cl_int
status_code
=
argpack
.
clcall
(
func
,
name
);
...
@@ -239,7 +239,7 @@ call_guarded(cl_int (*func)(ArgTypes...), const char *name, ArgTypes2&&... args)
...
@@ -239,7 +239,7 @@ call_guarded(cl_int (*func)(ArgTypes...), const char *name, ArgTypes2&&... args)
template
<
typename
T
,
typename
...
ArgTypes
,
typename
...
ArgTypes2
>
template
<
typename
T
,
typename
...
ArgTypes
,
typename
...
ArgTypes2
>
PYOPENCL_USE_RESULT
static
PYOPENCL_INLINE
T
PYOPENCL_USE_RESULT
static
PYOPENCL_INLINE
T
call_guarded
(
T
(
*
func
)(
ArgTypes
...),
const
char
*
name
,
ArgTypes2
&&
...
args
)
call_guarded
(
T
(
CL_API_CALL
*
func
)(
ArgTypes
...),
const
char
*
name
,
ArgTypes2
&&
...
args
)
{
{
cl_int
status_code
=
CL_SUCCESS
;
cl_int
status_code
=
CL_SUCCESS
;
auto
status_arg
=
buf_arg
(
status_code
);
auto
status_arg
=
buf_arg
(
status_code
);
...
@@ -264,7 +264,7 @@ cleanup_print_error(cl_int status_code, const char *name) noexcept
...
@@ -264,7 +264,7 @@ cleanup_print_error(cl_int status_code, const char *name) noexcept
template
<
typename
...
ArgTypes
,
typename
...
ArgTypes2
>
template
<
typename
...
ArgTypes
,
typename
...
ArgTypes2
>
static
PYOPENCL_INLINE
void
static
PYOPENCL_INLINE
void
call_guarded_cleanup
(
cl_int
(
*
func
)(
ArgTypes
...),
const
char
*
name
,
call_guarded_cleanup
(
cl_int
(
CL_API_CALL
*
func
)(
ArgTypes
...),
const
char
*
name
,
ArgTypes2
&&
...
args
)
ArgTypes2
&&
...
args
)
{
{
auto
argpack
=
make_clargpack
(
std
::
forward
<
ArgTypes2
>
(
args
)...);
auto
argpack
=
make_clargpack
(
std
::
forward
<
ArgTypes2
>
(
args
)...);
...
...
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