Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bind
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex Kosenkov
bind
Commits
fa346094
Commit
fa346094
authored
Oct 24, 2016
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
g++-6 support
parent
d73c5c2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
bind.hpp
bind.hpp
+4
-6
mapreduce.cpp
examples/mapreduce.cpp
+1
-0
lambda.hpp
src/interface/lambda.hpp
+4
-6
No files found.
bind.hpp
View file @
fa346094
...
...
@@ -2723,9 +2723,8 @@ namespace bxx {
template
<
device
D
,
bool
Capture
,
typename
F
,
typename
...
T
>
struct
lambda_kernel
:
public
kernel
<
D
,
lambda_kernel
<
D
,
Capture
,
F
,
T
...
>
>
{
typedef
void
(
*
ftype
)(
T
...,
F
*
);
static
void
fw
(
T
...
args
,
F
*
func
){
(
*
func
)(
args
...);
delete
func
;
}
static
constexpr
ftype
c
=
&
fw
;
static
void
c
(
T
...
args
,
F
*
func
){
(
*
func
)(
args
...);
delete
func
;
}
using
ftype
=
decltype
(
&
c
);
template
<
typename
L
,
typename
...
Args
>
static
void
dispatch
(
L
&
func
,
Args
&&
...
values
){
...
...
@@ -2735,9 +2734,8 @@ namespace bxx {
template
<
device
D
,
typename
F
,
typename
...
T
>
struct
lambda_kernel
<
D
,
false
,
F
,
T
...
>
:
public
kernel
<
D
,
lambda_kernel
<
D
,
false
,
F
,
T
...
>
>
{
typedef
void
(
*
ftype
)(
T
...,
F
&
);
static
void
fw
(
T
...
args
,
F
&
func
){
func
(
args
...);
}
static
constexpr
ftype
c
=
&
fw
;
static
void
c
(
T
...
args
,
F
&
func
){
func
(
args
...);
}
using
ftype
=
decltype
(
&
c
);
template
<
typename
L
,
typename
...
Args
>
static
void
dispatch
(
L
&
func
,
Args
&&
...
values
){
...
...
examples/mapreduce.cpp
View file @
fa346094
#include "utils/bind.hpp"
#include <unordered_map>
#include <mutex>
#include <numeric>
// {{{ helper traits
namespace
std
{
...
...
src/interface/lambda.hpp
View file @
fa346094
...
...
@@ -32,9 +32,8 @@ namespace bxx {
template
<
device
D
,
bool
Capture
,
typename
F
,
typename
...
T
>
struct
lambda_kernel
:
public
kernel
<
D
,
lambda_kernel
<
D
,
Capture
,
F
,
T
...
>
>
{
typedef
void
(
*
ftype
)(
T
...,
F
*
);
static
void
fw
(
T
...
args
,
F
*
func
){
(
*
func
)(
args
...);
delete
func
;
}
static
constexpr
ftype
c
=
&
fw
;
static
void
c
(
T
...
args
,
F
*
func
){
(
*
func
)(
args
...);
delete
func
;
}
using
ftype
=
decltype
(
&
c
);
template
<
typename
L
,
typename
...
Args
>
static
void
dispatch
(
L
&
func
,
Args
&&
...
values
){
...
...
@@ -44,9 +43,8 @@ namespace bxx {
template
<
device
D
,
typename
F
,
typename
...
T
>
struct
lambda_kernel
<
D
,
false
,
F
,
T
...
>
:
public
kernel
<
D
,
lambda_kernel
<
D
,
false
,
F
,
T
...
>
>
{
typedef
void
(
*
ftype
)(
T
...,
F
&
);
static
void
fw
(
T
...
args
,
F
&
func
){
func
(
args
...);
}
static
constexpr
ftype
c
=
&
fw
;
static
void
c
(
T
...
args
,
F
&
func
){
func
(
args
...);
}
using
ftype
=
decltype
(
&
c
);
template
<
typename
L
,
typename
...
Args
>
static
void
dispatch
(
L
&
func
,
Args
&&
...
values
){
...
...
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