Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
0b25b49d
Commit
0b25b49d
authored
Jan 07, 2016
by
Praetorius, Simon
Browse files
functor expression corrected
parent
79865e8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/expressions/functorN_expr.hpp
View file @
0b25b49d
...
...
@@ -250,7 +250,7 @@ namespace AMDiS
F
f
;
///< the functor
template
<
class
...
Terms_
>
FunctionN
(
F
&
&
f_
,
Terms_
...
terms_
)
FunctionN
(
F
const
&
f_
,
Terms_
...
terms_
)
:
super
(
terms_
...),
f
(
f_
)
{}
// call f.getDegree() function
...
...
@@ -404,27 +404,27 @@ namespace AMDiS
template
<
typename
F
,
typename
...
Terms
>
inline
typename
result_of
::
FunctionN
<
F
,
Terms
...
>::
type
function_
(
F
&
&
f
,
Terms
...
ts
)
function_
(
F
const
&
f
,
Terms
...
ts
)
{
return
expressions
::
FunctionN
<
F
,
typename
traits
::
to_expr
<
Terms
>::
to
::
type
...
>
(
std
::
forward
<
F
>
(
f
)
,
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
(
f
,
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
}
template
<
typename
F
,
typename
...
Terms
>
inline
typename
result_of
::
FunctionN
<
F
,
Terms
...
>::
type
func
(
F
&
&
f
,
Terms
...
ts
)
func
(
F
const
&
f
,
Terms
...
ts
)
{
return
expressions
::
FunctionN
<
F
,
typename
traits
::
to_expr
<
Terms
>::
to
::
type
...
>
(
std
::
forward
<
F
>
(
f
)
,
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
(
f
,
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
}
template
<
typename
F
,
typename
Term0
,
typename
...
Terms
>
inline
typename
result_of
::
FunctionN
<
F
,
Term0
,
Terms
...
>::
type
eval
(
F
&
&
f
,
Term0
t0
,
Terms
...
ts
)
eval
(
F
const
&
f
,
Term0
t0
,
Terms
...
ts
)
{
return
expressions
::
FunctionN
<
F
,
typename
traits
::
to_expr
<
Term0
>::
to
::
type
,
typename
traits
::
to_expr
<
Terms
>::
to
::
type
...
>
(
std
::
forward
<
F
>
(
f
)
,
traits
::
to_expr
<
Term0
>::
to
::
get
(
t0
),
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
(
f
,
traits
::
to_expr
<
Term0
>::
to
::
get
(
t0
),
traits
::
to_expr
<
Terms
>::
to
::
get
(
ts
)...);
}
...
...
@@ -436,16 +436,16 @@ namespace AMDiS
template
<
int
Degree
,
class
F
>
inline
expressions
::
DegreeWrapper
<
Degree
,
F
>
deg
(
F
&
&
fct
)
deg
(
F
const
&
fct
)
{
return
expressions
::
DegreeWrapper
<
Degree
,
F
>
(
std
::
forward
<
F
>
(
fct
)
)
;
return
expressions
::
DegreeWrapper
<
Degree
,
F
>
(
fct
);
}
template
<
class
F
,
class
DegF
>
inline
expressions
::
DegreeWrapper2
<
F
,
DegF
>
deg
(
F
&
&
fct
,
DegF
&
&
degfct
)
deg
(
F
const
&
fct
,
DegF
const
&
degfct
)
{
return
expressions
::
DegreeWrapper2
<
F
,
DegF
>
(
std
::
forward
<
F
>
(
fct
)
,
std
::
forward
<
DegF
>
(
degfct
)
)
;
return
expressions
::
DegreeWrapper2
<
F
,
DegF
>
(
fct
,
degfct
);
}
}
// end namespace AMDiS
...
...
Write
Preview
Supports
Markdown
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