SUNphi
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Reference.hpp
Go to the documentation of this file.
1
#
ifndef
_REFERENCE_HPP
2
#
define
_REFERENCE_HPP
3
4
/// \file Reference.hpp
5
///
6
/// \brief Defines a class which defines a reference to another SmET
7
///
8
/// \todo This should be the place where the instantiation depending
9
/// on the cost of the expression is made
10
11
#
include
<
smet
/
BaseSmET
.
hpp
>
12
13
namespace
SUNphi
14
{
15
/// Reference to T or new type, depending on wheter the class isStoring
16
///
17
/// Const qualifier is passed throughout
18
/// \todo add functionality as in Eigen
19
template
<
typename
T
,
// Type to get reference from
20
typename
=
ConstrainIsSmET
<
T
>,
// Constrain the type to be a SmET
21
bool
IsStoring
=
Unqualified
<
T
>::
isStoring
,
// Check if it is storing
22
bool
IsLvalue
=
isLvalue
<
T
>>
// Check if lvalue
23
using
Reference
=
24
RefIf
<
IsStoring
and
IsLvalue
,
RemRef
<
T
>>;
25
26
/////////////////////////////////////////////////////////////////
27
28
/// Provide the reference to the object
29
#
define
PROVIDE_SMET_REF
(
NUM
)
30
/*! Type of the binding reference NUM */
31
using
Ref
##
NUM
=
32
_Ref
##
NUM
;
33
/*! Reference to the NUM object */
34
Reference
<
Ref
##
NUM
>
ref
##
NUM
35
}
36
37
#
endif
SUNphi::operator+
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
Definition:
Add.hpp:87
include
smet
Reference.hpp
Generated by
1.8.11