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
d1cc64fa
Commit
d1cc64fa
authored
Jan 24, 2014
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added compiler options to program
+ unit test in test_opencl
parent
c35021f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
libcaf_opencl/cppa/opencl/program.hpp
libcaf_opencl/cppa/opencl/program.hpp
+1
-1
libcaf_opencl/src/opencl/program.cpp
libcaf_opencl/src/opencl/program.cpp
+2
-2
No files found.
libcaf_opencl/cppa/opencl/program.hpp
View file @
d1cc64fa
...
@@ -57,7 +57,7 @@ class program {
...
@@ -57,7 +57,7 @@ class program {
* from a given @p kernel_source.
* from a given @p kernel_source.
* @returns A program object.
* @returns A program object.
*/
*/
static
program
create
(
const
char
*
kernel_source
,
uint32_t
device_id
=
0
);
static
program
create
(
const
char
*
kernel_source
,
const
char
*
options
=
nullptr
,
uint32_t
device_id
=
0
);
private:
private:
...
...
libcaf_opencl/src/opencl/program.cpp
View file @
d1cc64fa
...
@@ -45,7 +45,7 @@ namespace cppa { namespace opencl {
...
@@ -45,7 +45,7 @@ namespace cppa { namespace opencl {
program
::
program
(
context_ptr
context
,
command_queue_ptr
queue
,
program_ptr
program
)
program
::
program
(
context_ptr
context
,
command_queue_ptr
queue
,
program_ptr
program
)
:
m_context
(
move
(
context
)),
m_program
(
move
(
program
)),
m_queue
(
move
(
queue
))
{
}
:
m_context
(
move
(
context
)),
m_program
(
move
(
program
)),
m_queue
(
move
(
queue
))
{
}
program
program
::
create
(
const
char
*
kernel_source
,
uint32_t
device_id
)
{
program
program
::
create
(
const
char
*
kernel_source
,
const
char
*
options
,
uint32_t
device_id
)
{
auto
metainfo
=
get_opencl_metainfo
();
auto
metainfo
=
get_opencl_metainfo
();
auto
devices
=
metainfo
->
get_devices
();
auto
devices
=
metainfo
->
get_devices
();
auto
context
=
metainfo
->
m_context
;
auto
context
=
metainfo
->
m_context
;
...
@@ -77,7 +77,7 @@ program program::create(const char* kernel_source, uint32_t device_id) {
...
@@ -77,7 +77,7 @@ program program::create(const char* kernel_source, uint32_t device_id) {
// build programm from program object
// build programm from program object
auto
dev_tmp
=
devices
[
device_id
].
m_device
.
get
();
auto
dev_tmp
=
devices
[
device_id
].
m_device
.
get
();
err
=
clBuildProgram
(
pptr
.
get
(),
1
,
&
dev_tmp
,
nullptr
,
nullptr
,
nullptr
);
err
=
clBuildProgram
(
pptr
.
get
(),
1
,
&
dev_tmp
,
options
,
nullptr
,
nullptr
);
if
(
err
!=
CL_SUCCESS
)
{
if
(
err
!=
CL_SUCCESS
)
{
ostringstream
oss
;
ostringstream
oss
;
oss
<<
"clBuildProgram: "
<<
get_opencl_error
(
err
);
oss
<<
"clBuildProgram: "
<<
get_opencl_error
(
err
);
...
...
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