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
ebb1c29b
Commit
ebb1c29b
authored
Jan 16, 2016
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing functions for opencl module
parent
8d6df336
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+8
-0
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+6
-0
libcaf_core/src/actor_system.cpp
libcaf_core/src/actor_system.cpp
+13
-0
No files found.
libcaf_core/caf/actor_system.hpp
View file @
ebb1c29b
...
@@ -209,6 +209,13 @@ public:
...
@@ -209,6 +209,13 @@ public:
/// @throws `std::logic_error` if module is not loaded.
/// @throws `std::logic_error` if module is not loaded.
io
::
middleman
&
middleman
();
io
::
middleman
&
middleman
();
/// Returns the opencl manager instance from opencl module.
/// @throws `std::logic_error` if module is not loaded.
opencl
::
manager
&
opencl_manager
()
const
;
/// Returns `true` if the opencl module is available, `false` otherwise.
bool
has_opencl_manager
()
const
;
/// Returns `true` if the RIAC probe module is available, `false` otherwise.
/// Returns `true` if the RIAC probe module is available, `false` otherwise.
bool
has_probe
()
const
;
bool
has_probe
()
const
;
...
@@ -426,6 +433,7 @@ private:
...
@@ -426,6 +433,7 @@ private:
io
::
middleman
*
middleman_
;
io
::
middleman
*
middleman_
;
scoped_execution_unit
dummy_execution_unit_
;
scoped_execution_unit
dummy_execution_unit_
;
atom_value
backend_name_
;
atom_value
backend_name_
;
opencl
::
manager
*
opencl_manager_
;
riac
::
probe
*
probe_
;
riac
::
probe
*
probe_
;
bool
await_actors_before_shutdown_
;
bool
await_actors_before_shutdown_
;
};
};
...
...
libcaf_core/caf/fwd.hpp
View file @
ebb1c29b
...
@@ -102,6 +102,12 @@ struct header;
...
@@ -102,6 +102,12 @@ struct header;
}
// namespace io
}
// namespace io
namespace
opencl
{
class
manager
;
}
// namespace opencl
namespace
riac
{
namespace
riac
{
class
probe
;
class
probe
;
...
...
libcaf_core/src/actor_system.cpp
View file @
ebb1c29b
...
@@ -67,6 +67,9 @@ actor_system::actor_system(actor_system_config&& cfg)
...
@@ -67,6 +67,9 @@ actor_system::actor_system(actor_system_config&& cfg)
auto
&
mmptr
=
modules_
[
module
::
middleman
];
auto
&
mmptr
=
modules_
[
module
::
middleman
];
if
(
mmptr
)
if
(
mmptr
)
middleman_
=
reinterpret_cast
<
io
::
middleman
*>
(
mmptr
->
subtype_ptr
());
middleman_
=
reinterpret_cast
<
io
::
middleman
*>
(
mmptr
->
subtype_ptr
());
auto
&
clptr
=
modules_
[
module
::
opencl_manager
];
if
(
clptr
)
opencl_manager_
=
reinterpret_cast
<
opencl
::
manager
*>
(
clptr
->
subtype_ptr
());
auto
&
pptr
=
modules_
[
module
::
riac_probe
];
auto
&
pptr
=
modules_
[
module
::
riac_probe
];
if
(
pptr
)
if
(
pptr
)
probe_
=
reinterpret_cast
<
riac
::
probe
*>
(
pptr
->
subtype_ptr
());
probe_
=
reinterpret_cast
<
riac
::
probe
*>
(
pptr
->
subtype_ptr
());
...
@@ -196,6 +199,16 @@ io::middleman& actor_system::middleman() {
...
@@ -196,6 +199,16 @@ io::middleman& actor_system::middleman() {
return
*
middleman_
;
return
*
middleman_
;
}
}
bool
actor_system
::
has_opencl_manager
()
const
{
return
opencl_manager_
!=
nullptr
;
}
opencl
::
manager
&
actor_system
::
opencl_manager
()
const
{
if
(
!
opencl_manager_
)
throw
std
::
logic_error
(
"cannot access opencl manager: module not loaded"
);
return
*
opencl_manager_
;
}
bool
actor_system
::
has_probe
()
const
{
bool
actor_system
::
has_probe
()
const
{
return
probe_
!=
nullptr
;
return
probe_
!=
nullptr
;
}
}
...
...
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