34 #ifndef NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_BLAS_OVERRIDE_UTIL_HPP
35 #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_BLAS_OVERRIDE_UTIL_HPP
37 #ifdef NEKTAR_USE_EXPRESSION_TEMPLATES
39 #include <ExpressionTemplates/Node.hpp>
40 #include <boost/type_traits.hpp>
41 #include <boost/utility/enable_if.hpp>
45 template<
typename NodeType,
template <
typename>
class LhsTest,
typename TestOpType,
46 template <
typename>
class RhsTest,
typename enabled=
void>
47 struct TestBinaryNode :
public boost::false_type {};
49 template<
typename L,
typename OpType,
typename R,
template <
typename>
class LhsTest,
50 typename TestOpType,
template <
typename>
class RhsTest>
51 struct TestBinaryNode<
Node<
L, OpType, R>, LhsTest, TestOpType, RhsTest,
52 typename boost::enable_if
56 boost::is_same<OpType, TestOpType>,
57 LhsTest<typename L::ResultType>,
58 RhsTest<typename R::ResultType>
60 >::type> :
public boost::true_type {};
62 template<
typename NodeType,
template <
typename>
class T1Type,
typename TestOp1Type,
template <
typename>
class T2Type,
63 typename TestOp2Type,
template <
typename>
class T3Type,
typename enabled=
void>
64 struct Test3ArgumentAssociativeNode :
public boost::false_type {};
66 template<
typename A1,
typename Op1Type,
typename A2,
typename Op2Type,
typename A3,
67 template <
typename>
class T1Type,
typename TestOp1Type,
template <
typename>
class T2Type,
typename TestOp2Type,
68 template <
typename>
class T3Type>
69 struct Test3ArgumentAssociativeNode<
Node<
Node<A1, Op1Type, A2>, Op2Type, A3>, T1Type, TestOp1Type, T2Type, TestOp2Type, T3Type,
70 typename boost::enable_if
74 boost::is_same<Op1Type, TestOp1Type>,
75 boost::is_same<Op2Type, TestOp2Type>,
76 T1Type<typename A1::ResultType>,
77 T2Type<typename A2::ResultType>,
78 T3Type<typename A3::ResultType>
80 >::type> :
public boost::true_type {};