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
3d59325f
Commit
3d59325f
authored
Jul 28, 2014
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace old typedef syntax with using c++11 syntax
parent
89f2b66a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
23 deletions
+23
-23
libcaf_opencl/caf/opencl/actor_facade.hpp
libcaf_opencl/caf/opencl/actor_facade.hpp
+4
-4
libcaf_opencl/caf/opencl/global.hpp
libcaf_opencl/caf/opencl/global.hpp
+1
-1
libcaf_opencl/caf/opencl/smart_ptr.hpp
libcaf_opencl/caf/opencl/smart_ptr.hpp
+14
-14
libcaf_opencl/caf/opencl/spawn_cl.hpp
libcaf_opencl/caf/opencl/spawn_cl.hpp
+4
-4
No files found.
libcaf_opencl/caf/opencl/actor_facade.hpp
View file @
3d59325f
...
@@ -55,11 +55,11 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
...
@@ -55,11 +55,11 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
friend
class
command
<
actor_facade
,
Ret
>
;
friend
class
command
<
actor_facade
,
Ret
>
;
public:
public:
typedef
cow_tuple
<
typename
detail
::
rm_const_and_ref
<
Args
>::
type
...
>
using
args_tuple
=
cow_tuple
<
args_tuple
;
typename
detail
::
rm_const_and_ref
<
Args
>::
type
...
>
;
typedef
std
::
function
<
optional
<
args_tuple
>
(
any_tuple
)
>
arg_mapping
;
using
arg_mapping
=
std
::
function
<
optional
<
args_tuple
>
(
any_tuple
)
>
;
typedef
std
::
function
<
any_tuple
(
Ret
&
)
>
result_mapping
;
using
result_mapping
=
std
::
function
<
any_tuple
(
Ret
&
)
>
;
static
intrusive_ptr
<
actor_facade
>
static
intrusive_ptr
<
actor_facade
>
create
(
const
program
&
prog
,
const
char
*
kernel_name
,
arg_mapping
map_args
,
create
(
const
program
&
prog
,
const
char
*
kernel_name
,
arg_mapping
map_args
,
...
...
libcaf_opencl/caf/opencl/global.hpp
View file @
3d59325f
...
@@ -36,7 +36,7 @@ namespace opencl {
...
@@ -36,7 +36,7 @@ namespace opencl {
/**
/**
* @brief A vector of up to three elements used for OpenCL dimensions.
* @brief A vector of up to three elements used for OpenCL dimensions.
*/
*/
typedef
detail
::
limited_vector
<
size_t
,
3
>
dim_vec
;
using
dim_vec
=
detail
::
limited_vector
<
size_t
,
3
>
;
std
::
string
get_opencl_error
(
cl_int
err
);
std
::
string
get_opencl_error
(
cl_int
err
);
...
...
libcaf_opencl/caf/opencl/smart_ptr.hpp
View file @
3d59325f
...
@@ -30,12 +30,12 @@ namespace opencl {
...
@@ -30,12 +30,12 @@ namespace opencl {
template
<
typename
T
,
cl_int
(
*
ref
)(
T
),
cl_int
(
*
deref
)(
T
)>
template
<
typename
T
,
cl_int
(
*
ref
)(
T
),
cl_int
(
*
deref
)(
T
)>
class
smart_ptr
{
class
smart_ptr
{
typedef
typename
std
::
remove_pointer
<
T
>::
type
element_
type
;
using
element_type
=
typename
std
::
remove_pointer
<
T
>::
type
;
typedef
element_type
*
pointer
;
using
pointer
=
element_type
*
;
typedef
element_type
&
reference
;
using
reference
=
element_type
&
;
typedef
const
element_type
*
const_pointer
;
using
const_pointer
=
const
element_type
*
;
typedef
const
element_type
&
const_reference
;
using
const_reference
=
const
element_type
&
;
public:
public:
smart_ptr
(
pointer
ptr
=
nullptr
)
:
m_ptr
(
ptr
)
{
smart_ptr
(
pointer
ptr
=
nullptr
)
:
m_ptr
(
ptr
)
{
...
@@ -96,15 +96,15 @@ class smart_ptr {
...
@@ -96,15 +96,15 @@ class smart_ptr {
pointer
m_ptr
;
pointer
m_ptr
;
};
};
typedef
smart_ptr
<
cl_mem
,
clRetainMemObject
,
clReleaseMemObject
>
mem_ptr
;
using
mem_ptr
=
smart_ptr
<
cl_mem
,
clRetainMemObject
,
clReleaseMemObject
>
;
typedef
smart_ptr
<
cl_event
,
clRetainEvent
,
clReleaseEvent
>
event_ptr
;
using
event_ptr
=
smart_ptr
<
cl_event
,
clRetainEvent
,
clReleaseEvent
>
;
typedef
smart_ptr
<
cl_kernel
,
clRetainKernel
,
clReleaseKernel
>
kernel_ptr
;
using
kernel_ptr
=
smart_ptr
<
cl_kernel
,
clRetainKernel
,
clReleaseKernel
>
;
typedef
smart_ptr
<
cl_context
,
clRetainContext
,
clReleaseContext
>
context_ptr
;
using
context_ptr
=
smart_ptr
<
cl_context
,
clRetainContext
,
clReleaseContext
>
;
typedef
smart_ptr
<
cl_program
,
clRetainProgram
,
clReleaseProgram
>
program_ptr
;
using
program_ptr
=
smart_ptr
<
cl_program
,
clRetainProgram
,
clReleaseProgram
>
;
typedef
smart_ptr
<
cl_device_id
,
clRetainDeviceDummy
,
clReleaseDeviceDummy
>
using
device_ptr
=
smart_ptr
<
cl_device_id
,
clRetainDeviceDummy
,
device_ptr
;
clReleaseDeviceDummy
>
;
typedef
smart_ptr
<
cl_command_queue
,
clRetainCommandQueue
,
clReleaseCommandQueue
>
using
command_queue_ptr
=
smart_ptr
<
cl_command_queue
,
clRetainCommandQueue
,
command_queue_ptr
;
clReleaseCommandQueue
>
;
}
// namespace opencl
}
// namespace opencl
}
// namespace caf
}
// namespace caf
...
...
libcaf_opencl/caf/opencl/spawn_cl.hpp
View file @
3d59325f
...
@@ -40,12 +40,12 @@ namespace detail {
...
@@ -40,12 +40,12 @@ namespace detail {
// converts C arrays, i.e., pointers, to vectors
// converts C arrays, i.e., pointers, to vectors
template
<
typename
T
>
template
<
typename
T
>
struct
carr_to_vec
{
struct
carr_to_vec
{
typedef
T
type
;
using
type
=
T
;
};
};
template
<
typename
T
>
template
<
typename
T
>
struct
carr_to_vec
<
T
*>
{
struct
carr_to_vec
<
T
*>
{
typedef
std
::
vector
<
T
>
type
;
using
type
=
std
::
vector
<
T
>
;
};
};
template
<
typename
Signature
,
typename
SecondSignature
=
void
>
template
<
typename
Signature
,
typename
SecondSignature
=
void
>
...
@@ -142,8 +142,8 @@ spawn_cl(const opencl::program& prog, const char* fname, MapArgs map_args,
...
@@ -142,8 +142,8 @@ spawn_cl(const opencl::program& prog, const char* fname, MapArgs map_args,
const
opencl
::
dim_vec
&
offset
=
{},
const
opencl
::
dim_vec
&
offset
=
{},
const
opencl
::
dim_vec
&
local_dims
=
{},
size_t
result_size
=
0
)
{
const
opencl
::
dim_vec
&
local_dims
=
{},
size_t
result_size
=
0
)
{
using
std
::
move
;
using
std
::
move
;
typedef
typename
util
::
get_callable_trait
<
MapArgs
>::
fun_type
f0
;
using
f0
=
typename
util
::
get_callable_trait
<
MapArgs
>::
fun_type
;
typedef
typename
util
::
get_callable_trait
<
MapResult
>::
fun_type
f1
;
using
f1
=
typename
util
::
get_callable_trait
<
MapResult
>::
fun_type
;
detail
::
cl_spawn_helper
<
f0
,
f1
>
f
;
detail
::
cl_spawn_helper
<
f0
,
f1
>
f
;
return
f
(
f0
{
move
(
map_args
)},
f1
{
move
(
map_result
)},
prog
,
fname
,
dims
,
offset
,
return
f
(
f0
{
move
(
map_args
)},
f1
{
move
(
map_result
)},
prog
,
fname
,
dims
,
offset
,
local_dims
,
result_size
);
local_dims
,
result_size
);
...
...
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