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
6b5df06e
Commit
6b5df06e
authored
May 06, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'unstable' of github.com:Neverlord/libcppa into unstable
parents
2bced238
bd895ad3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
libcaf_opencl/src/opencl/command_dispatcher.cpp
libcaf_opencl/src/opencl/command_dispatcher.cpp
+14
-4
No files found.
libcaf_opencl/src/opencl/command_dispatcher.cpp
View file @
6b5df06e
...
...
@@ -122,18 +122,28 @@ void command_dispatcher::initialize() {
cl_int
err
{
0
};
/* find up to two available platforms */
vector
<
cl_platform_id
>
ids
(
2
);
cl_uint
number_of_platforms
;
err
=
clGetPlatformIDs
(
ids
.
size
(),
ids
.
data
()
,
&
number_of_platforms
);
err
=
clGetPlatformIDs
(
0
,
nullptr
,
&
number_of_platforms
);
if
(
err
!=
CL_SUCCESS
)
{
ostringstream
oss
;
oss
<<
"clGetPlatformIDs: "
<<
get_opencl_error
(
err
);
oss
<<
"clGetPlatformIDs (getting number of platforms): "
<<
get_opencl_error
(
err
);
CPPA_LOGMF
(
CPPA_ERROR
,
self
,
oss
.
str
());
throw
logic_error
(
oss
.
str
());
}
else
if
(
number_of_platforms
<
1
)
{
ostringstream
oss
;
oss
<<
"clGetPlatformIDs: 'no platforms found'."
;
oss
<<
"clGetPlatformIDs: no platforms found."
;
CPPA_LOGMF
(
CPPA_ERROR
,
self
,
oss
.
str
());
throw
logic_error
(
oss
.
str
());
}
vector
<
cl_platform_id
>
ids
(
number_of_platforms
);
err
=
clGetPlatformIDs
(
ids
.
size
(),
ids
.
data
(),
nullptr
);
if
(
err
!=
CL_SUCCESS
)
{
ostringstream
oss
;
oss
<<
"clGetPlatformIDs (getting platform ids): "
<<
get_opencl_error
(
err
);
CPPA_LOGMF
(
CPPA_ERROR
,
self
,
oss
.
str
());
throw
logic_error
(
oss
.
str
());
}
...
...
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