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
1c4e4072
Commit
1c4e4072
authored
Aug 28, 2013
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused class (command_dummy)
removed command_dummy, renamed command_impl to command
parent
8d91ddb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
31 deletions
+12
-31
libcaf_opencl/cppa/opencl/actor_facade.hpp
libcaf_opencl/cppa/opencl/actor_facade.hpp
+5
-5
libcaf_opencl/cppa/opencl/command.hpp
libcaf_opencl/cppa/opencl/command.hpp
+7
-26
No files found.
libcaf_opencl/cppa/opencl/actor_facade.hpp
View file @
1c4e4072
...
...
@@ -65,7 +65,7 @@ class actor_facade;
template
<
typename
Ret
,
typename
...
Args
>
class
actor_facade
<
Ret
(
Args
...)
>
:
public
actor
{
friend
class
command
_impl
<
actor_facade
,
Ret
>
;
friend
class
command
<
actor_facade
,
Ret
>
;
public:
...
...
@@ -159,10 +159,10 @@ class actor_facade<Ret(Args...)> : public actor {
add_arguments_to_kernel
<
Ret
>
(
arguments
,
ret_size
,
get_ref
<
Is
>
(
*
opt
)...);
auto
cmd
=
make_counted
<
command
_impl
<
actor_facade
,
Ret
>>
(
handle
,
this
,
std
::
move
(
arguments
),
m_queue
);
auto
cmd
=
make_counted
<
command
<
actor_facade
,
Ret
>>
(
handle
,
this
,
std
::
move
(
arguments
),
m_queue
);
cmd
->
enqueue
();
}
else
{
CPPA_LOGMF
(
CPPA_ERROR
,
this
,
"actor_facade::enqueue() tuple_cast failed."
);
}
...
...
libcaf_opencl/cppa/opencl/command.hpp
View file @
1c4e4072
...
...
@@ -46,32 +46,15 @@
namespace
cppa
{
namespace
opencl
{
class
command
:
public
ref_counted
{
public:
command
*
next
;
virtual
void
enqueue
()
=
0
;
};
class
command_dummy
:
public
command
{
public:
void
enqueue
()
override
{
}
};
template
<
typename
T
,
typename
R
>
class
command
_impl
:
public
comman
d
{
class
command
:
public
ref_counte
d
{
public:
command
_impl
(
response_handle
handle
,
intrusive_ptr
<
T
>
actor_facade
,
std
::
vector
<
mem_ptr
>
arguments
,
command_queue_ptr
queue
)
command
(
response_handle
handle
,
intrusive_ptr
<
T
>
actor_facade
,
std
::
vector
<
mem_ptr
>
arguments
,
command_queue_ptr
queue
)
:
m_number_of_values
(
std
::
accumulate
(
actor_facade
->
m_global_dimensions
.
begin
(),
actor_facade
->
m_global_dimensions
.
end
(),
1
,
std
::
multiplies
<
size_t
>
{}))
...
...
@@ -80,7 +63,7 @@ class command_impl : public command {
,
m_queue
(
queue
)
,
m_arguments
(
move
(
arguments
))
{
}
void
enqueue
()
override
{
void
enqueue
()
{
CPPA_LOG_TRACE
(
"command::enqueue()"
);
this
->
ref
();
// reference held by the OpenCL comand queue
cl_int
err
{
0
};
...
...
@@ -106,7 +89,7 @@ class command_impl : public command {
err
=
clSetEventCallback
(
event
,
CL_COMPLETE
,
[](
cl_event
,
cl_int
,
void
*
data
)
{
auto
cmd
=
reinterpret_cast
<
command
_impl
*>
(
data
);
auto
cmd
=
reinterpret_cast
<
command
*>
(
data
);
cmd
->
handle_results
();
cmd
->
deref
();
},
...
...
@@ -151,8 +134,6 @@ class command_impl : public command {
}
};
typedef
intrusive_ptr
<
command
>
command_ptr
;
}
}
// namespace cppa::opencl
#endif // CPPA_OPENCL_COMMAND_HPP
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