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
813597df
Commit
813597df
authored
Mar 27, 2013
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added offset argument for global dimensions
spawn has an new argument, the offset for global dimension
parent
2b737cb4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
libcaf_opencl/cppa/opencl/actor_facade.hpp
libcaf_opencl/cppa/opencl/actor_facade.hpp
+4
-0
libcaf_opencl/cppa/opencl/command.hpp
libcaf_opencl/cppa/opencl/command.hpp
+4
-1
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
+4
-0
No files found.
libcaf_opencl/cppa/opencl/actor_facade.hpp
View file @
813597df
...
...
@@ -75,6 +75,7 @@ class actor_facade<Ret(Args...)> : public actor {
const
program
&
prog
,
const
char
*
kernel_name
,
std
::
vector
<
size_t
>
global_dimensions
,
std
::
vector
<
size_t
>
global_offsets
,
std
::
vector
<
size_t
>
local_dimensions
,
arg_mapping
map_args
,
result_mapping
map_result
)
...
...
@@ -82,6 +83,7 @@ class actor_facade<Ret(Args...)> : public actor {
,
m_context
(
prog
.
m_context
)
,
m_dispatcher
(
dispatcher
)
,
m_global_dimensions
(
std
::
move
(
global_dimensions
))
,
m_global_offsets
(
std
::
move
(
global_offsets
))
,
m_local_dimensions
(
std
::
move
(
local_dimensions
))
,
m_map_args
(
std
::
move
(
map_args
))
,
m_map_result
(
std
::
move
(
map_result
))
...
...
@@ -164,6 +166,7 @@ class actor_facade<Ret(Args...)> : public actor {
m_kernel
,
arguments
,
m_global_dimensions
,
m_global_offsets
,
m_local_dimensions
,
m_map_result
));
}
...
...
@@ -179,6 +182,7 @@ class actor_facade<Ret(Args...)> : public actor {
context_ptr
m_context
;
command_dispatcher
*
m_dispatcher
;
std
::
vector
<
size_t
>
m_global_dimensions
;
std
::
vector
<
size_t
>
m_global_offsets
;
std
::
vector
<
size_t
>
m_local_dimensions
;
arg_mapping
m_map_args
;
result_mapping
m_map_result
;
...
...
libcaf_opencl/cppa/opencl/command.hpp
View file @
813597df
...
...
@@ -70,6 +70,7 @@ class command_impl : public command {
kernel_ptr
kernel
,
std
::
vector
<
mem_ptr
>
arguments
,
std
::
vector
<
size_t
>
global_dimensions
,
std
::
vector
<
size_t
>
global_offsets
,
std
::
vector
<
size_t
>
local_dimensions
,
std
::
function
<
any_tuple
(
T
&
)
>
map_result
)
:
m_number_of_values
(
1
)
...
...
@@ -77,6 +78,7 @@ class command_impl : public command {
,
m_kernel
(
kernel
)
,
m_arguments
(
arguments
)
,
m_global_dimensions
(
global_dimensions
)
,
m_global_offsets
(
global_offsets
)
,
m_local_dimensions
(
local_dimensions
)
,
m_map_result
(
map_result
)
{
...
...
@@ -98,7 +100,7 @@ class command_impl : public command {
err
=
clEnqueueNDRangeKernel
(
m_queue
.
get
(),
m_kernel
.
get
(),
m_global_dimensions
.
size
(),
NULL
,
m_global_offsets
.
data
()
,
m_global_dimensions
.
data
(),
m_local_dimensions
.
data
(),
0
,
...
...
@@ -136,6 +138,7 @@ class command_impl : public command {
command_queue_ptr
m_queue
;
std
::
vector
<
mem_ptr
>
m_arguments
;
std
::
vector
<
size_t
>
m_global_dimensions
;
std
::
vector
<
size_t
>
m_global_offsets
;
std
::
vector
<
size_t
>
m_local_dimensions
;
std
::
function
<
any_tuple
(
T
&
)
>
m_map_result
;
...
...
libcaf_opencl/cppa/opencl/command_dispatcher.hpp
View file @
813597df
...
...
@@ -86,6 +86,7 @@ class command_dispatcher {
actor_ptr
spawn
(
const
program
&
prog
,
const
char
*
kernel_name
,
std
::
vector
<
size_t
>
global_dims
,
std
::
vector
<
size_t
>
global_offs
,
std
::
vector
<
size_t
>
local_dims
,
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
map_args
,
std
::
function
<
any_tuple
(
Ret
&
)
>
map_result
)
...
...
@@ -94,6 +95,7 @@ class command_dispatcher {
prog
,
kernel_name
,
std
::
move
(
global_dims
),
std
::
move
(
global_offs
),
std
::
move
(
local_dims
),
std
::
move
(
map_args
),
std
::
move
(
map_result
));
...
...
@@ -103,6 +105,7 @@ class command_dispatcher {
actor_ptr
spawn
(
const
program
&
prog
,
const
char
*
kernel_name
,
std
::
vector
<
size_t
>
global_dims
=
{
1
,
1
,
1
},
std
::
vector
<
size_t
>
global_offs
=
{},
std
::
vector
<
size_t
>
local_dims
=
{})
{
std
::
function
<
option
<
cow_tuple
<
typename
util
::
rm_ref
<
Args
>::
type
...
>>
(
any_tuple
)
>
f0
=
[]
(
any_tuple
msg
)
{
...
...
@@ -114,6 +117,7 @@ class command_dispatcher {
return
this
->
spawn
<
Ret
,
Args
...
>
(
prog
,
kernel_name
,
std
::
move
(
global_dims
),
std
::
move
(
global_offs
),
std
::
move
(
local_dims
),
std
::
move
(
f0
),
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