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
61309b2d
Commit
61309b2d
authored
Jul 07, 2018
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flatten caf::opencl::detail namespace
parent
b0e66758
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
88 deletions
+38
-88
libcaf_opencl/caf/detail/command_helper.hpp
libcaf_opencl/caf/detail/command_helper.hpp
+2
-5
libcaf_opencl/caf/detail/raw_ptr.hpp
libcaf_opencl/caf/detail/raw_ptr.hpp
+0
-2
libcaf_opencl/caf/detail/spawn_helper.hpp
libcaf_opencl/caf/detail/spawn_helper.hpp
+0
-2
libcaf_opencl/caf/opencl/actor_facade.hpp
libcaf_opencl/caf/opencl/actor_facade.hpp
+2
-4
libcaf_opencl/caf/opencl/arguments.hpp
libcaf_opencl/caf/opencl/arguments.hpp
+2
-3
libcaf_opencl/caf/opencl/command.hpp
libcaf_opencl/caf/opencl/command.hpp
+1
-3
libcaf_opencl/caf/opencl/detail/core.hpp
libcaf_opencl/caf/opencl/detail/core.hpp
+0
-35
libcaf_opencl/caf/opencl/device.hpp
libcaf_opencl/caf/opencl/device.hpp
+2
-1
libcaf_opencl/caf/opencl/manager.hpp
libcaf_opencl/caf/opencl/manager.hpp
+3
-4
libcaf_opencl/caf/opencl/mem_ref.hpp
libcaf_opencl/caf/opencl/mem_ref.hpp
+24
-25
libcaf_opencl/caf/opencl/program.hpp
libcaf_opencl/caf/opencl/program.hpp
+2
-2
libcaf_opencl/src/manager.cpp
libcaf_opencl/src/manager.cpp
+0
-2
No files found.
libcaf_opencl/caf/
opencl/
detail/command_helper.hpp
→
libcaf_opencl/caf/detail/command_helper.hpp
View file @
61309b2d
...
...
@@ -20,10 +20,9 @@
#include "caf/detail/type_list.hpp"
#include "caf/opencl/
arguments
.hpp"
#include "caf/opencl/
command
.hpp"
namespace
caf
{
namespace
opencl
{
namespace
detail
{
// signature for the function that is applied to output arguments
...
...
@@ -41,7 +40,7 @@ struct command_sig;
template
<
class
T
,
class
...
Ts
>
struct
command_sig
<
T
,
detail
::
type_list
<
Ts
...
>>
{
using
type
=
command
<
T
,
Ts
...
>
;
using
type
=
opencl
::
command
<
T
,
Ts
...
>
;
};
// derive type for a tuple matching the arguments as mem_refs
...
...
@@ -54,7 +53,5 @@ struct tuple_type_of<detail::type_list<Ts...>> {
};
}
// namespace detail
}
// namespace opencl
}
// namespace caf
libcaf_opencl/caf/
opencl/
detail/raw_ptr.hpp
→
libcaf_opencl/caf/detail/raw_ptr.hpp
View file @
61309b2d
...
...
@@ -30,11 +30,9 @@
inline void intrusive_ptr_add_ref(cltype ptr) { claddref(ptr); } \
inline void intrusive_ptr_release(cltype ptr) { clrelease(ptr); } \
namespace caf { \
namespace opencl { \
namespace detail { \
using aliasname = intrusive_ptr<std::remove_pointer<cltype>::type>; \
}
/* namespace detail */
\
}
/* namespace opencl */
\
} // namespace caf
...
...
libcaf_opencl/caf/
opencl/
detail/spawn_helper.hpp
→
libcaf_opencl/caf/detail/spawn_helper.hpp
View file @
61309b2d
...
...
@@ -21,7 +21,6 @@
#include "caf/opencl/actor_facade.hpp"
namespace
caf
{
namespace
opencl
{
namespace
detail
{
struct
tuple_construct
{
};
...
...
@@ -62,6 +61,5 @@ struct cl_spawn_helper {
};
}
// namespace detail
}
// namespace opencl
}
// namespace caf
libcaf_opencl/caf/opencl/actor_facade.hpp
View file @
61309b2d
...
...
@@ -27,6 +27,8 @@
#include "caf/intrusive_ptr.hpp"
#include "caf/detail/raw_ptr.hpp"
#include "caf/detail/command_helper.hpp"
#include "caf/detail/limited_vector.hpp"
#include "caf/opencl/global.hpp"
...
...
@@ -37,10 +39,6 @@
#include "caf/opencl/arguments.hpp"
#include "caf/opencl/opencl_err.hpp"
#include "caf/opencl/detail/core.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
#include "caf/opencl/detail/command_helper.hpp"
namespace
caf
{
namespace
opencl
{
...
...
libcaf_opencl/caf/opencl/arguments.hpp
View file @
61309b2d
...
...
@@ -26,11 +26,8 @@
#include "caf/optional.hpp"
#include "caf/opencl/mem_ref.hpp"
#include "caf/opencl/detail/core.hpp"
namespace
caf
{
namespace
opencl
{
namespace
detail
{
template
<
class
T
,
class
F
>
...
...
@@ -58,6 +55,8 @@ T try_apply_fun(F& fun, message& msg, const T& fallback) {
}
// namespace detail
namespace
opencl
{
// Tag classes to mark arguments received in a messages as reference or value
/// Arguments tagged as `val` are expected as a vector (or value in case
/// of a private argument).
...
...
libcaf_opencl/caf/opencl/command.hpp
View file @
61309b2d
...
...
@@ -29,6 +29,7 @@
#include "caf/abstract_actor.hpp"
#include "caf/response_promise.hpp"
#include "caf/detail/raw_ptr.hpp"
#include "caf/detail/scope_guard.hpp"
#include "caf/opencl/global.hpp"
...
...
@@ -36,9 +37,6 @@
#include "caf/opencl/arguments.hpp"
#include "caf/opencl/opencl_err.hpp"
#include "caf/opencl/detail/core.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
namespace
caf
{
namespace
opencl
{
...
...
libcaf_opencl/caf/opencl/detail/core.hpp
deleted
100644 → 0
View file @
b0e66758
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright (C) 2011 - 2016 *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
namespace
caf
{
namespace
detail
{
}
// namespace detail
namespace
opencl
{
namespace
detail
{
using
namespace
caf
::
detail
;
}
// namespace detail
}
// namespace opencl
}
// namespace caf
libcaf_opencl/caf/opencl/device.hpp
View file @
61309b2d
...
...
@@ -22,10 +22,11 @@
#include "caf/sec.hpp"
#include "caf/detail/raw_ptr.hpp"
#include "caf/opencl/global.hpp"
#include "caf/opencl/opencl_err.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
namespace
caf
{
namespace
opencl
{
...
...
libcaf_opencl/caf/opencl/manager.hpp
View file @
61309b2d
...
...
@@ -27,16 +27,15 @@
#include "caf/config.hpp"
#include "caf/actor_system.hpp"
#include "caf/detail/raw_ptr.hpp"
#include "caf/detail/spawn_helper.hpp"
#include "caf/opencl/device.hpp"
#include "caf/opencl/global.hpp"
#include "caf/opencl/program.hpp"
#include "caf/opencl/platform.hpp"
#include "caf/opencl/actor_facade.hpp"
#include "caf/opencl/detail/core.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
#include "caf/opencl/detail/spawn_helper.hpp"
namespace
caf
{
namespace
opencl
{
...
...
libcaf_opencl/caf/opencl/mem_ref.hpp
View file @
61309b2d
...
...
@@ -25,33 +25,11 @@
#include "caf/optional.hpp"
#include "caf/ref_counted.hpp"
#include "caf/opencl/detail/core.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
#include "caf/detail/raw_ptr.hpp"
namespace
caf
{
namespace
opencl
{
/// Updates the reference types in a message with a given event.
struct
msg_adding_event
{
msg_adding_event
(
detail
::
raw_event_ptr
event
)
:
event_
(
event
)
{
// nop
}
template
<
class
T
,
class
...
Ts
>
message
operator
()(
T
&
x
,
Ts
&
...
xs
)
{
return
make_message
(
add_event
(
std
::
move
(
x
)),
add_event
(
std
::
move
(
xs
))...);
}
template
<
class
...
Ts
>
message
operator
()(
std
::
tuple
<
Ts
...
>&
values
)
{
return
apply_args
(
*
this
,
detail
::
get_indices
(
values
),
values
);
}
template
<
class
T
>
mem_ref
<
T
>
add_event
(
mem_ref
<
T
>
ref
)
{
ref
.
set_event
(
event_
);
return
std
::
move
(
ref
);
}
detail
::
raw_event_ptr
event_
;
};
// Tag to separate mem_refs from other types in messages.
struct
ref_tag
{};
...
...
@@ -145,9 +123,10 @@ public:
}
mem_ref
(
mem_ref
&&
other
)
=
default
;
mem_ref
&
operator
=
(
mem_ref
<
T
>&&
other
)
=
default
;
mem_ref
(
const
mem_ref
&
other
)
=
default
;
mem_ref
&
operator
=
(
mem_ref
<
T
>&&
other
)
=
default
;
mem_ref
&
operator
=
(
const
mem_ref
&
other
)
=
default
;
~
mem_ref
()
{
// nop
}
...
...
@@ -176,10 +155,30 @@ private:
detail
::
raw_mem_ptr
memory_
;
};
/// Updates the reference types in a message with a given event.
struct
msg_adding_event
{
msg_adding_event
(
detail
::
raw_event_ptr
event
)
:
event_
(
event
)
{
// nop
}
template
<
class
T
,
class
...
Ts
>
message
operator
()(
T
&
x
,
Ts
&
...
xs
)
{
return
make_message
(
add_event
(
std
::
move
(
x
)),
add_event
(
std
::
move
(
xs
))...);
}
template
<
class
...
Ts
>
message
operator
()(
std
::
tuple
<
Ts
...
>&
values
)
{
return
apply_args
(
*
this
,
detail
::
get_indices
(
values
),
values
);
}
template
<
class
T
>
mem_ref
<
T
>
add_event
(
mem_ref
<
T
>
ref
)
{
ref
.
set_event
(
event_
);
return
std
::
move
(
ref
);
}
detail
::
raw_event_ptr
event_
;
};
}
// namespace opencl
template
<
class
T
>
struct
allowed_unsafe_message_type
<
opencl
::
mem_ref
<
T
>>
:
std
::
true_type
{};
}
// namespace caf
libcaf_opencl/caf/opencl/program.hpp
View file @
61309b2d
...
...
@@ -23,11 +23,11 @@
#include "caf/ref_counted.hpp"
#include "caf/detail/raw_ptr.hpp"
#include "caf/opencl/device.hpp"
#include "caf/opencl/global.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
namespace
caf
{
namespace
opencl
{
...
...
libcaf_opencl/src/manager.cpp
View file @
61309b2d
...
...
@@ -26,8 +26,6 @@
#include "caf/opencl/platform.hpp"
#include "caf/opencl/opencl_err.hpp"
#include "caf/opencl/detail/raw_ptr.hpp"
using
namespace
std
;
namespace
caf
{
...
...
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