Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
65db4078
Commit
65db4078
authored
May 09, 2014
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenCL: Kernel compile errors will be printed on non OSX platforms as well
parent
d29b14e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
libcaf_opencl/src/opencl/program.cpp
libcaf_opencl/src/opencl/program.cpp
+30
-0
No files found.
libcaf_opencl/src/opencl/program.cpp
View file @
65db4078
...
@@ -83,6 +83,36 @@ program program::create(const char* kernel_source, const char* options, uint32_t
...
@@ -83,6 +83,36 @@ program program::create(const char* kernel_source, const char* options, uint32_t
oss
<<
"clBuildProgram: "
<<
get_opencl_error
(
err
);
oss
<<
"clBuildProgram: "
<<
get_opencl_error
(
err
);
// the build log will be printed by the
// the build log will be printed by the
// pfn_notify (see opencl_metainfo.cpp)
// pfn_notify (see opencl_metainfo.cpp)
#ifndef __APPLE__
// seems that just apple implemented the
// pfn_notify callback, but we can get
// the build log
if
(
err
==
CL_BUILD_PROGRAM_FAILURE
)
{
size_t
buildlog_buffer_size
=
0
;
// get the log length
clGetProgramBuildInfo
(
pptr
.
get
(),
dev_tmp
,
CL_PROGRAM_BUILD_LOG
,
sizeof
(
buildlog_buffer_size
),
nullptr
,
&
buildlog_buffer_size
);
vector
<
char
>
buffer
(
buildlog_buffer_size
);
// fill the buffer with buildlog informations
clGetProgramBuildInfo
(
pptr
.
get
(),
dev_tmp
,
CL_PROGRAM_BUILD_LOG
,
sizeof
(
buffer
[
0
])
*
buildlog_buffer_size
,
buffer
.
data
(),
nullptr
);
CPPA_LOGC_ERROR
(
"cppa::opencl::program"
,
"create"
,
"Build log:
\n
"
+
string
(
buffer
.
data
())
+
"
\n
########################################"
);
}
#endif
throw
runtime_error
(
oss
.
str
());
throw
runtime_error
(
oss
.
str
());
}
}
return
{
context
,
devices
[
device_id
].
m_cmd_queue
,
pptr
};
return
{
context
,
devices
[
device_id
].
m_cmd_queue
,
pptr
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment