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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Timothy Smith
pyopencl
Commits
90b73bec
Commit
90b73bec
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Fix symbol not found for create_image_from_desc on CL 1.1
parent
e12f38a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/c_wrapper/error.h
+7
-0
7 additions, 0 deletions
src/c_wrapper/error.h
src/c_wrapper/image.cpp
+4
-2
4 additions, 2 deletions
src/c_wrapper/image.cpp
with
11 additions
and
2 deletions
src/c_wrapper/error.h
+
7
−
0
View file @
90b73bec
...
...
@@ -21,6 +21,13 @@
#define PYOPENCL_CL_CASTABLE_THIS data()
#endif
#define PYOPENCL_UNSUPPORTED(ROUTINE, VERSION) \
auto err = (error*)malloc(sizeof(error)); \
err->routine = strdup(#ROUTINE); \
err->msg = strdup("unsupported in " VERSION); \
err->code = CL_INVALID_VALUE \
err->other = 0; \
return err;
class
clerror
:
public
std
::
runtime_error
{
private:
...
...
This diff is collapsed.
Click to expand it.
src/c_wrapper/image.cpp
+
4
−
2
View file @
90b73bec
...
...
@@ -81,21 +81,23 @@ create_image_3d(clobj_t *img, clobj_t _ctx, cl_mem_flags flags,
});
}
#if PYOPENCL_CL_VERSION >= 0x1020
error
*
create_image_from_desc
(
clobj_t
*
img
,
clobj_t
_ctx
,
cl_mem_flags
flags
,
cl_image_format
*
fmt
,
cl_image_desc
*
desc
,
void
*
buf
)
{
#if PYOPENCL_CL_VERSION >= 0x1020
auto
ctx
=
static_cast
<
context
*>
(
_ctx
);
return
c_handle_error
([
&
]
{
auto
mem
=
pyopencl_call_guarded
(
clCreateImage
,
ctx
,
flags
,
fmt
,
desc
,
buf
);
*
img
=
new_image
(
mem
,
fmt
);
});
#else
PYOPENCL_UNSUPPORTED
(
clCreateImage
,
"CL 1.1 and below"
)
#endif
}
#endif
error
*
image__get_image_info
(
clobj_t
_img
,
cl_image_info
param
,
generic_info
*
out
)
...
...
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