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
bd271b74
Commit
bd271b74
authored
Jun 06, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shadowing warning
parent
108e51ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
libcaf_opencl/src/manager.cpp
libcaf_opencl/src/manager.cpp
+5
-5
No files found.
libcaf_opencl/src/manager.cpp
View file @
bd271b74
...
@@ -30,15 +30,15 @@ using namespace std;
...
@@ -30,15 +30,15 @@ using namespace std;
namespace
caf
{
namespace
caf
{
namespace
opencl
{
namespace
opencl
{
const
optional
<
const
device
&>
manager
::
get_device
(
size_t
id
)
const
{
const
optional
<
const
device
&>
manager
::
get_device
(
size_t
dev_
id
)
const
{
if
(
platforms_
.
empty
())
if
(
platforms_
.
empty
())
return
none
;
return
none
;
size_t
to
=
0
;
size_t
to
=
0
;
for
(
auto
&
pl
:
platforms_
)
{
for
(
auto
&
pl
:
platforms_
)
{
auto
from
=
to
;
auto
from
=
to
;
to
+=
pl
.
get_devices
().
size
();
to
+=
pl
.
get_devices
().
size
();
if
(
id
>=
from
&&
id
<
to
)
if
(
dev_id
>=
from
&&
dev_
id
<
to
)
return
pl
.
get_devices
()[
id
-
from
];
return
pl
.
get_devices
()[
dev_
id
-
from
];
}
}
return
none
;
return
none
;
}
}
...
@@ -53,8 +53,8 @@ void manager::init(actor_system_config&) {
...
@@ -53,8 +53,8 @@ void manager::init(actor_system_config&) {
throw
std
::
runtime_error
(
"no OpenCL platform found"
);
throw
std
::
runtime_error
(
"no OpenCL platform found"
);
// initialize platforms (device discovery)
// initialize platforms (device discovery)
unsigned
current_device_id
=
0
;
unsigned
current_device_id
=
0
;
for
(
auto
&
id
:
platform_ids
)
{
for
(
auto
&
pl_
id
:
platform_ids
)
{
platforms_
.
push_back
(
platform
::
create
(
id
,
current_device_id
));
platforms_
.
push_back
(
platform
::
create
(
pl_
id
,
current_device_id
));
current_device_id
+=
current_device_id
+=
static_cast
<
unsigned
>
(
platforms_
.
back
().
get_devices
().
size
());
static_cast
<
unsigned
>
(
platforms_
.
back
().
get_devices
().
size
());
}
}
...
...
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