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
2b737cb4
Commit
2b737cb4
authored
Mar 26, 2013
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small code optimization
using std::move now
parent
e9b1605b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
+7
-9
No files found.
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
View file @
2b737cb4
...
@@ -90,22 +90,20 @@ class command_dispatcher {
...
@@ -90,22 +90,20 @@ class command_dispatcher {
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
map_args
,
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
map_args
,
std
::
function
<
any_tuple
(
Ret
&
)
>
map_result
)
std
::
function
<
any_tuple
(
Ret
&
)
>
map_result
)
{
{
auto
i
=
std
::
find
(
local_dims
.
begin
(),
local_dims
.
end
(),
0
);
if
(
i
!=
local_dims
.
end
())
local_dims
.
clear
();
return
new
actor_facade
<
Ret
(
Args
...)
>
(
this
,
return
new
actor_facade
<
Ret
(
Args
...)
>
(
this
,
prog
,
prog
,
kernel_name
,
kernel_name
,
global_dims
,
std
::
move
(
global_dims
)
,
local_dims
,
std
::
move
(
local_dims
)
,
map_args
,
std
::
move
(
map_args
)
,
map_result
);
std
::
move
(
map_result
)
);
}
}
template
<
typename
Ret
,
typename
...
Args
>
template
<
typename
Ret
,
typename
...
Args
>
actor_ptr
spawn
(
const
program
&
prog
,
actor_ptr
spawn
(
const
program
&
prog
,
const
char
*
kernel_name
,
const
char
*
kernel_name
,
std
::
vector
<
size_t
>
global_dims
=
{
1
,
1
,
1
},
std
::
vector
<
size_t
>
global_dims
=
{
1
,
1
,
1
},
std
::
vector
<
size_t
>
local_dims
=
{
0
,
0
,
0
})
std
::
vector
<
size_t
>
local_dims
=
{})
{
{
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
f0
=
[]
(
any_tuple
msg
)
{
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
f0
=
[]
(
any_tuple
msg
)
{
return
tuple_cast
<
typename
util
::
rm_ref
<
Args
>::
type
...
>
(
msg
);
return
tuple_cast
<
typename
util
::
rm_ref
<
Args
>::
type
...
>
(
msg
);
...
@@ -115,8 +113,8 @@ class command_dispatcher {
...
@@ -115,8 +113,8 @@ class command_dispatcher {
};
};
return
this
->
spawn
<
Ret
,
Args
...
>
(
prog
,
return
this
->
spawn
<
Ret
,
Args
...
>
(
prog
,
kernel_name
,
kernel_name
,
global_dims
,
std
::
move
(
global_dims
)
,
local_dims
,
std
::
move
(
local_dims
)
,
std
::
move
(
f0
),
std
::
move
(
f0
),
std
::
move
(
f1
));
std
::
move
(
f1
));
}
}
...
...
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