From 7abab3d2914730a85c65a19c56689bd4af26c509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Oberhuber?= <oberhuber.tomas@gmail.com> Date: Thu, 4 Jul 2019 23:17:31 +0200 Subject: [PATCH] [WIP] Still fixing expression templates. --- .../Containers/DistributedVectorExpressions.h | 173 +- .../DistributedVectorViewExpressions.h | 95 +- src/TNL/Containers/Expressions/Comparison.h | 36 +- .../Expressions/DistributedComparison.h | 280 +++ .../DistributedExpressionTemplates.h | 1852 +++++++++-------- .../Expressions/ExpressionTemplates.h | 4 +- .../Expressions/StaticExpressionTemplates.h | 775 ++++--- src/TNL/Containers/StaticVector.h | 19 +- src/TNL/Containers/StaticVectorExpressions.h | 10 +- 9 files changed, 1909 insertions(+), 1335 deletions(-) create mode 100644 src/TNL/Containers/Expressions/DistributedComparison.h diff --git a/src/TNL/Containers/DistributedVectorExpressions.h b/src/TNL/Containers/DistributedVectorExpressions.h index e18bbd7949..48991162b1 100644 --- a/src/TNL/Containers/DistributedVectorExpressions.h +++ b/src/TNL/Containers/DistributedVectorExpressions.h @@ -15,7 +15,7 @@ #include <TNL/Containers/Algorithms/ArrayOperations.h> #include <TNL/Containers/Expressions/DistributedExpressionTemplates.h> #include <TNL/Containers/Expressions/ExpressionTemplatesOperations.h> -#include <TNL/Containers/Expressions/Comparison.h> +#include <TNL/Containers/Expressions/DistributedComparison.h> #include <TNL/Containers/Expressions/VerticalOperations.h> #include <TNL/Exceptions/NotImplementedError.h> @@ -35,7 +35,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator+( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Addition >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Addition, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -46,7 +46,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator+( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Addition >( a, b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Addition, Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -58,7 +58,7 @@ operator+( const Containers::DistributedVector< Real1, Device, Index, Communicat { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Addition >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Addition, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -71,7 +71,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator-( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Subtraction >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Subtraction, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -82,7 +82,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator-( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Subtraction >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Subtraction, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -94,7 +94,7 @@ operator-( const Containers::DistributedVector< Real1, Device, Index, Communicat { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Subtraction >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Subtraction, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -107,7 +107,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator*( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Multiplication >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Multiplication, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -118,7 +118,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator*( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Multiplication >( a, b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Multiplication, Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -130,7 +130,7 @@ operator*( const Containers::DistributedVector< Real1, Device, Index, Communicat { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Multiplication >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Multiplication, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -143,7 +143,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator/( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Division >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Division, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -154,7 +154,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< operator/( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Division >( a, b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Division, Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -166,7 +166,7 @@ operator/( const Containers::DistributedVector< Real1, Device, Index, Communicat { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Division >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Division, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -179,7 +179,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< min( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Min >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Min, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -190,7 +190,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< min( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Min >( a, b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Min, Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -202,7 +202,7 @@ min( const Containers::DistributedVector< Real1, Device, Index, Communicator >& { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Min >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Min, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -215,7 +215,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< max( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Max >( a.getLocalVectorView(), b ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView, ET, Containers::Expressions::Max, Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > @@ -226,7 +226,7 @@ const Containers::Expressions::DistributedBinaryExpressionTemplate< max( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { using ConstView = typename Containers::DistributedVector< Real, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Max >( a, b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ET, ConstView, Containers::Expressions::Max, Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > @@ -238,7 +238,7 @@ max( const Containers::DistributedVector< Real1, Device, Index, Communicator >& { using ConstView1 = typename Containers::DistributedVector< Real1, Device, Index >::ConstLocalVectorViewType; using ConstView2 = typename Containers::DistributedVector< Real2, Device, Index >::ConstLocalVectorViewType; - return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Max >( a.getLocalVectorView(), b.getLocalVectorView() ); + return Containers::Expressions::DistributedBinaryExpressionTemplate< ConstView1, ConstView2, Containers::Expressions::Max, Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -246,26 +246,38 @@ max( const Containers::DistributedVector< Real1, Device, Index, Communicator >& template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator==( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonEQ( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template EQ< Communicator >( a.getLocalVectorView(), b, a.getCommunicatorGroup() ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator==( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonEQ( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template EQ< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device1, typename Device2, typename Index, typename Communicator > bool operator==( const Containers::DistributedVector< Real1, Device1, Index >& a, const Containers::DistributedVector< Real2, Device2, Index >& b ) { + bool localResult; if( a.getSize() != b.getSize() ) - return false; - if( a.getSize() == 0 ) - return true; - return Containers::Algorithms::ArrayOperations< Device1, Device2 >:: - compareMemory( a.getData(), - b.getData(), - a.getSize() ); + localResult = false; + else if( a.getSize() == 0 ) + localResult = true; + else localResult = Containers::Algorithms::ArrayOperations< Device1, Device2 >:: + compareMemory( a.getData(), + b.getData(), + a.getSize() ); + + TNL_ASSERT_EQ( a.getCommunicationGroup(), b.getCommunicationGroup(), "Cannot compare two distributed vectors with different communication groups." ); + bool result = localResult; + if( a.getCommunicationGroup() != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, a.getCommunicationGroup() ); + } + return result; } //// @@ -273,26 +285,23 @@ bool operator==( const Containers::DistributedVector< Real1, Device1, Index >& a template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator!=( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonNE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template NE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator!=( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonNE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template NE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device1, typename Device2, typename Index, typename Communicator > bool operator!=( const Containers::DistributedVector< Real1, Device1, Index >& a, const Containers::DistributedVector< Real2, Device2, Index >& b ) { - if( a.getSize() != b.getSize() ) - return false; - if( a.getSize() == 0 ) - return true; - return !Containers::Algorithms::ArrayOperations< Device1, Device2 >:: - compareMemory( a.getData(), - b.getData(), - a.getSize() ); + return ! operator==( a, b ); } //// @@ -300,19 +309,25 @@ bool operator!=( const Containers::DistributedVector< Real1, Device1, Index >& a template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator<( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonLT( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator<( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLT( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator<( const Containers::DistributedVector< Real1, Device, Index, Communicator >& a, const Containers::DistributedVector< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLT( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -320,19 +335,25 @@ bool operator<( const Containers::DistributedVector< Real1, Device, Index, Commu template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator<=( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonLE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator<=( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator<=( const Containers::DistributedVector< Real1, Device, Index, Communicator >& a, const Containers::DistributedVector< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLE( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -340,19 +361,25 @@ bool operator<=( const Containers::DistributedVector< Real1, Device, Index, Comm template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator>( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonGT( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator>( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGT( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator>( const Containers::DistributedVector< Real1, Device, Index, Communicator >& a, const Containers::DistributedVector< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGT( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -360,19 +387,25 @@ bool operator>( const Containers::DistributedVector< Real1, Device, Index, Commu template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator>=( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonGE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator>=( const ET& a, const Containers::DistributedVector< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator>=( const Containers::DistributedVector< Real1, Device, Index, Communicator >& a, const Containers::DistributedVector< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGE( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -383,7 +416,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Minus > operator-( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Minus >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Minus, void, Communicator >( a.getLocalVectorView() ); } //// @@ -394,7 +427,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Abs > abs( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Abs >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Abs, void, Communicator >( a.getLocalVectorView() ); } //// @@ -405,7 +438,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Sin > sin( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sin >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sin, void, Communicator >( a.getLocalVectorView() ); } //// @@ -416,7 +449,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Cos > cos( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cos >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cos, void, Communicator >( a.getLocalVectorView() ); } //// @@ -427,7 +460,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Tan > tan( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Tan >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Tan, void, Communicator >( a.getLocalVectorView() ); } //// @@ -438,7 +471,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Sqrt > sqrt( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sqrt >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sqrt, void, Communicator >( a.getLocalVectorView() ); } //// @@ -449,7 +482,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Cbrt > cbrt( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cbrt >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cbrt, void, Communicator >( a.getLocalVectorView() ); } //// @@ -460,7 +493,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Pow, ExpType > pow( const Containers::DistributedVector< Real, Device, Index, Communicator >& a, const ExpType& exp ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Pow, ExpType >( a.getLocalVectorView(), exp ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Pow, ExpType, Communicator >( a.getLocalVectorView(), exp ); } //// @@ -471,7 +504,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Floor > floor( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Floor >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Floor, void, Communicator >( a.getLocalVectorView() ); } //// @@ -482,7 +515,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Ceil > ceil( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Ceil >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Ceil, void, Communicator >( a.getLocalVectorView() ); } //// @@ -493,7 +526,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Acos > acos( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Acos >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Acos, void, Communicator >( a.getLocalVectorView() ); } //// @@ -504,7 +537,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Asin > asin( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Asin >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Asin, void, Communicator >( a.getLocalVectorView() ); } //// @@ -515,7 +548,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Atan > atan( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Atan >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Atan, void, Communicator >( a.getLocalVectorView() ); } //// @@ -526,7 +559,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Cosh > cosh( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cosh >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Cosh, void, Communicator >( a.getLocalVectorView() ); } //// @@ -537,7 +570,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Tanh > tanh( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Tanh >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Tanh, void, Communicator >( a.getLocalVectorView() ); } //// @@ -548,7 +581,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Log > log( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log, void, Communicator >( a.getLocalVectorView() ); } //// @@ -559,7 +592,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Log10 > log10( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log10 >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log10, void, Communicator >( a.getLocalVectorView() ); } //// @@ -570,7 +603,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Log2 > log2( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log2 >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Log2, void, Communicator >( a.getLocalVectorView() ); } //// @@ -581,7 +614,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Exp > exp( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Exp >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Exp, void, Communicator >( a.getLocalVectorView() ); } //// @@ -592,7 +625,7 @@ const Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::Expressions::Sign > sign( const Containers::DistributedVector< Real, Device, Index, Communicator >& a ) { - return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sign >( a.getLocalVectorView() ); + return Containers::Expressions::DistributedUnaryExpressionTemplate< Containers::DistributedVector< Real, Device, Index, Communicator >, Containers::Expressions::Sign, void, Communicator >( a.getLocalVectorView() ); } //// diff --git a/src/TNL/Containers/DistributedVectorViewExpressions.h b/src/TNL/Containers/DistributedVectorViewExpressions.h index 258c7d75f8..9e0b3e9ac3 100644 --- a/src/TNL/Containers/DistributedVectorViewExpressions.h +++ b/src/TNL/Containers/DistributedVectorViewExpressions.h @@ -247,26 +247,38 @@ max( const Containers::DistributedVectorView< Real1, Device, Index, Communicator template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator==( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonEQ( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template EQ< Communicator >( a.getLocalVectorView(), b, a.getCommunicatorGroup() ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator==( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonEQ( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template EQ< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device1, typename Device2, typename Index, typename Communicator > bool operator==( const Containers::DistributedVectorView< Real1, Device1, Index >& a, const Containers::DistributedVectorView< Real2, Device2, Index >& b ) { + bool localResult; if( a.getSize() != b.getSize() ) - return false; - if( a.getSize() == 0 ) - return true; - return Containers::Algorithms::ArrayOperations< Device1, Device2 >:: - compareMemory( a.getData(), - b.getData(), - a.getSize() ); + localResult = false; + else if( a.getSize() == 0 ) + localResult = true; + else localResult = Containers::Algorithms::ArrayOperations< Device1, Device2 >:: + compareMemory( a.getData(), + b.getData(), + a.getSize() ); + + TNL_ASSERT_EQ( a.getCommunicationGroup(), b.getCommunicationGroup(), "Cannot compare two distributed vectors with different communication groups." ); + bool result = localResult; + if( a.getCommunicationGroup() != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, a.getCommunicationGroup() ); + } + return result; } //// @@ -274,26 +286,23 @@ bool operator==( const Containers::DistributedVectorView< Real1, Device1, Index template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator!=( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonNE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template NE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator!=( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonNE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template NE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device1, typename Device2, typename Index, typename Communicator > bool operator!=( const Containers::DistributedVectorView< Real1, Device1, Index >& a, const Containers::DistributedVectorView< Real2, Device2, Index >& b ) { - if( a.getSize() != b.getSize() ) - return false; - if( a.getSize() == 0 ) - return true; - return !Containers::Algorithms::ArrayOperations< Device1, Device2 >:: - compareMemory( a.getData(), - b.getData(), - a.getSize() ); + return ! operator==( a, b ); } //// @@ -301,19 +310,25 @@ bool operator!=( const Containers::DistributedVectorView< Real1, Device1, Index template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator<( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonLT( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator<( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLT( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator<( const Containers::DistributedVectorView< Real1, Device, Index, Communicator >& a, const Containers::DistributedVectorView< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLT( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LT< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -321,19 +336,25 @@ bool operator<( const Containers::DistributedVectorView< Real1, Device, Index, C template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator<=( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonLE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator<=( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator<=( const Containers::DistributedVectorView< Real1, Device, Index, Communicator >& a, const Containers::DistributedVectorView< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonLE( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template LE< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -341,19 +362,25 @@ bool operator<=( const Containers::DistributedVectorView< Real1, Device, Index, template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator>( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonGT( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator>( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGT( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator>( const Containers::DistributedVectorView< Real1, Device, Index, Communicator >& a, const Containers::DistributedVectorView< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGT( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GT< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// @@ -361,19 +388,25 @@ bool operator>( const Containers::DistributedVectorView< Real1, Device, Index, C template< typename Real, typename Device, typename Index, typename Communicator, typename ET > bool operator>=( const Containers::DistributedVectorView< Real, Device, Index, Communicator >& a, const ET& b ) { - return Containers::Expressions::ComparisonGE( a.getLocalVectorView(), b ); + using Left = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + using Right = ET; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a.getLocalVectorView(), b ); } template< typename ET, typename Real, typename Device, typename Index, typename Communicator > bool operator>=( const ET& a, const Containers::DistributedVectorView< Real, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGE( a, b.getLocalVectorView() ); + using Left = ET; + using Right = Containers::DistributedVectorView< Real, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a, b.getLocalVectorView() ); } template< typename Real1, typename Real2, typename Device, typename Index, typename Communicator > bool operator>=( const Containers::DistributedVectorView< Real1, Device, Index, Communicator >& a, const Containers::DistributedVectorView< Real2, Device, Index, Communicator >& b ) { - return Containers::Expressions::ComparisonGE( a.getLocalVectorView(), b.getLocalVectorView() ); + using Left = Containers::DistributedVectorView< Real1, Device, Index, Communicator >; + using Right = Containers::DistributedVectorView< Real2, Device, Index, Communicator >; + return Containers::Expressions::DistributedComparison< Left, Right >::template GE< Communicator >( a.getLocalVectorView(), b.getLocalVectorView() ); } //// diff --git a/src/TNL/Containers/Expressions/Comparison.h b/src/TNL/Containers/Expressions/Comparison.h index d96819a19d..0b98092788 100644 --- a/src/TNL/Containers/Expressions/Comparison.h +++ b/src/TNL/Containers/Expressions/Comparison.h @@ -35,7 +35,7 @@ struct Comparison< T1, T2, VectorVariable, VectorVariable > { - bool EQ( const T1& a, const T2& b ) + static bool EQ( const T1& a, const T2& b ) { if( a.getSize() != b.getSize() ) return false; @@ -51,12 +51,12 @@ struct Comparison< T1, T2, VectorVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool NE( const T1& a, const T2& b ) + static bool NE( const T1& a, const T2& b ) { return ! EQ( a, b ); } - bool GT( const T1& a, const T2& b ) + static bool GT( const T1& a, const T2& b ) { TNL_ASSERT_EQ( a.getSize(), b.getSize(), "Sizes of expressions to be compared do not fit." ); @@ -69,12 +69,12 @@ struct Comparison< T1, T2, VectorVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool LE( const T1& a, const T2& b ) + static bool LE( const T1& a, const T2& b ) { return ! GT( a, b ); } - bool LT( const T1& a, const T2& b ) + static bool LT( const T1& a, const T2& b ) { TNL_ASSERT_EQ( a.getSize(), b.getSize(), "Sizes of expressions to be compared do not fit." ); @@ -87,7 +87,7 @@ struct Comparison< T1, T2, VectorVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool GE( const T1& a, const T2& b ) + static bool GE( const T1& a, const T2& b ) { return ! LT( a, b ); } @@ -101,7 +101,7 @@ struct Comparison< T1, T2, ArithmeticVariable, VectorVariable > { - bool EQ( const T1& a, const T2& b ) + static bool EQ( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -112,12 +112,12 @@ struct Comparison< T1, T2, ArithmeticVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool NE( const T1& a, const T2& b ) + static bool NE( const T1& a, const T2& b ) { return ! EQ( a, b ); } - bool GT( const T1& a, const T2& b ) + static bool GT( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -128,12 +128,12 @@ struct Comparison< T1, T2, ArithmeticVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool LE( const T1& a, const T2& b ) + static bool LE( const T1& a, const T2& b ) { return ! GT( a, b ); } - bool LT( const T1& a, const T2& b ) + static bool LT( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -144,7 +144,7 @@ struct Comparison< T1, T2, ArithmeticVariable, VectorVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool GE( const T1& a, const T2& b ) + static bool GE( const T1& a, const T2& b ) { return ! LT( a, b ); } @@ -158,7 +158,7 @@ struct Comparison< T1, T2, VectorVariable, ArithmeticVariable > { - bool EQ( const T1& a, const T2& b ) + static bool EQ( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -169,12 +169,12 @@ struct Comparison< T1, T2, VectorVariable, ArithmeticVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool NE( const T1& a, const T2& b ) + static bool NE( const T1& a, const T2& b ) { return ! EQ( a, b ); } - bool GT( const T1& a, const T2& b ) + static bool GT( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -185,12 +185,12 @@ struct Comparison< T1, T2, VectorVariable, ArithmeticVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool LE( const T1& a, const T2& b ) + static bool LE( const T1& a, const T2& b ) { return ! GT( a, b ); } - bool LT( const T1& a, const T2& b ) + static bool LT( const T1& a, const T2& b ) { using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; @@ -201,7 +201,7 @@ struct Comparison< T1, T2, VectorVariable, ArithmeticVariable > return Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); } - bool GE( const T1& a, const T2& b ) + static bool GE( const T1& a, const T2& b ) { return ! LT( a, b ); } diff --git a/src/TNL/Containers/Expressions/DistributedComparison.h b/src/TNL/Containers/Expressions/DistributedComparison.h new file mode 100644 index 0000000000..70d764337f --- /dev/null +++ b/src/TNL/Containers/Expressions/DistributedComparison.h @@ -0,0 +1,280 @@ +/*************************************************************************** + DistributedComparison.h - description + ------------------- + begin : Jul 4, 2019 + copyright : (C) 2019 by Tomas Oberhuber + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#pragma once + +#include <TNL/Assert.h> +#include <TNL/Containers/Algorithms/Reduction.h> + +namespace TNL { + namespace Containers { + namespace Expressions { + +//// +// Non-static comparison +template< typename T1, + typename T2, + ExpressionVariableType T1Type = ExpressionVariableTypeGetter< T1 >::value, + ExpressionVariableType T2Type = ExpressionVariableTypeGetter< T2 >::value > +struct DistributedComparison +{ +}; + +///// +// Distributed comparison of two vector expressions +template< typename T1, + typename T2 > +struct DistributedComparison< T1, T2, VectorVariable, VectorVariable > +{ + template< typename Communicator > + static bool EQ( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + if( a.getSize() != b.getSize() ) + return false; + if( a.getSize() == 0 ) + return true; + + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] == b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool NE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! EQ< Communicator >( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool GT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + TNL_ASSERT_EQ( a.getSize(), b.getSize(), "Sizes of expressions to be compared do not fit." ); + + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] > b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool LE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! GT( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool LT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + TNL_ASSERT_EQ( a.getSize(), b.getSize(), "Sizes of expressions to be compared do not fit." ); + + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] < b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool GE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! LT( a, b, communicationGroup ); + } +}; + +///// +// Distributed comparison of number and vector expression +template< typename T1, + typename T2 > +struct DistributedComparison< T1, T2, ArithmeticVariable, VectorVariable > +{ + + template< typename Communicator > + static bool EQ( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a == b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool NE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! EQ( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool GT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a > b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool LE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! GT( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool LT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a < b[ i ] ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool GE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! LT( a, b, communicationGroup ); + } +}; + +///// +// Distributed comparison of vector expressions and number +template< typename T1, + typename T2 > +struct DistributedComparison< T1, T2, VectorVariable, ArithmeticVariable > +{ + + template< typename Communicator > + static bool EQ( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] == b ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool NE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! EQ( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool GT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] > b ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool LE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! GT( a, b, communicationGroup ); + } + + template< typename Communicator > + static bool LT( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + using DeviceType = typename T1::DeviceType; + using IndexType = typename T1::IndexType; + + auto fetch = [=] __cuda_callable__ ( IndexType i ) -> bool { return ( a[ i ] < b ); }; + auto reduction = [=] __cuda_callable__ ( bool& a, const bool& b ) { a &= b; }; + auto volatileReduction = [=] __cuda_callable__ ( volatile bool& a, volatile bool& b ) { a &= b; }; + bool localResult = Algorithms::Reduction< DeviceType >::reduce( a.getSize(), reduction, volatileReduction, fetch, true ); + + bool result = localResult; + if( communicationGroup != Communicator::NullGroup ) { + Communicator::Allreduce( &localResult, &result, 1, MPI_LAND, communicationGroup ); + } + return result; + } + + template< typename Communicator > + static bool GE( const T1& a, const T2& b, const typename Communicator::CommunicationGroup& communicationGroup ) + { + return ! LT( a, b, communicationGroup ); + } +}; + + } //namespace Expressions + } // namespace Containers +} // namespace TNL diff --git a/src/TNL/Containers/Expressions/DistributedExpressionTemplates.h b/src/TNL/Containers/Expressions/DistributedExpressionTemplates.h index f5c9b8169d..cc40480d14 100644 --- a/src/TNL/Containers/Expressions/DistributedExpressionTemplates.h +++ b/src/TNL/Containers/Expressions/DistributedExpressionTemplates.h @@ -25,6 +25,7 @@ namespace TNL { template< typename T1, template< typename > class Operation, typename Parameter = void, + typename Communicator = Communicators::MpiCommunicator, ExpressionVariableType T1Type = ExpressionVariableTypeGetter< T1 >::value > struct DistributedUnaryExpressionTemplate { @@ -35,6 +36,7 @@ struct DistributedUnaryExpressionTemplate template< typename T1, typename T2, template< typename, typename > class Operation, + typename Communicator = Communicators::MpiCommunicator, ExpressionVariableType T1Type = ExpressionVariableTypeGetter< T1 >::value, ExpressionVariableType T2Type = ExpressionVariableTypeGetter< T2 >::value > struct DistributedBinaryExpressionTemplate @@ -43,18 +45,18 @@ struct DistributedBinaryExpressionTemplate template< typename T1, typename T2, - template< typename, typename > class Operation > -struct DistributedBinaryExpressionTemplate< T1, T2, Operation, VectorVariable, VectorVariable > + template< typename, typename > class Operation, + typename Communicator > +struct DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator, VectorVariable, VectorVariable > { using RealType = typename T1::RealType; using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; using IsExpressionTemplate = bool; - using CommunicatorType = typename T1::CommunicatorType; - using CommunicationGroup = typename T1::CommunicationGroup; + using CommunicatorType = Communicator; + using CommunicationGroup = typename CommunicatorType::CommunicationGroup; static_assert( std::is_same< typename T1::DeviceType, typename T2::DeviceType >::value, "Attempt to mix operands allocated on different device types." ); - static_assert( std::is_same< typename T1::CommunicatorType, typename T2::CommunicatorType >::value, "Attempt to mix operands using different communicators." ); static_assert( IsStaticType< T1 >::value == IsStaticType< T2 >::value, "Attempt to mix static and non-static operands in binary expression templates." ); static constexpr bool isStatic() { return false; } @@ -97,14 +99,15 @@ struct DistributedBinaryExpressionTemplate< T1, T2, Operation, VectorVariable, V template< typename T1, typename T2, - template< typename, typename > class Operation > -struct DistributedBinaryExpressionTemplate< T1, T2, Operation, VectorVariable, ArithmeticVariable > + template< typename, typename > class Operation, + typename Communicator > +struct DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator, VectorVariable, ArithmeticVariable > { using RealType = typename T1::RealType; using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; - using CommunicatorType = typename T1::CommunicatorType; - using CommunicationGroup = typename T1::CommunicationGroup; + using CommunicatorType = Communicator; + using CommunicationGroup = typename CommunicatorType::CommunicationGroup; using IsExpressionTemplate = bool; static constexpr bool isStatic() { return false; } @@ -147,14 +150,15 @@ struct DistributedBinaryExpressionTemplate< T1, T2, Operation, VectorVariable, A template< typename T1, typename T2, - template< typename, typename > class Operation > -struct DistributedBinaryExpressionTemplate< T1, T2, Operation, ArithmeticVariable, VectorVariable > + template< typename, typename > class Operation, + typename Communicator > +struct DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator, ArithmeticVariable, VectorVariable > { using RealType = typename T2::RealType; using DeviceType = typename T2::DeviceType; using IndexType = typename T2::IndexType; - using CommunicatorType = typename T2::CommunicatorType; - using CommunicationGroup = typename T2::CommunicationGroup; + using CommunicatorType = Communicator; + using CommunicationGroup = typename CommunicatorType::CommunicationGroup; using IsExpressionTemplate = bool; static constexpr bool isStatic() { return false; } @@ -202,15 +206,16 @@ struct DistributedBinaryExpressionTemplate< T1, T2, Operation, ArithmeticVariabl // to pass to pow. template< typename T1, template< typename > class Operation, - typename Parameter > -struct DistributedUnaryExpressionTemplate< T1, Operation, Parameter, VectorVariable > + typename Parameter, + typename Communicator > +struct DistributedUnaryExpressionTemplate< T1, Operation, Parameter, Communicator, VectorVariable > { using RealType = typename T1::RealType; using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; using IsExpressionTemplate = bool; - using CommunicatorType = typename T1::CommunicatorType; - using CommunicationGroup = typename T1::CommunicationGroup; + using CommunicatorType = Communicator; + using CommunicationGroup = typename CommunicatorType::CommunicationGroup; static constexpr bool isStatic() { return false; } DistributedUnaryExpressionTemplate( const T1& a, const Parameter& p ) @@ -256,15 +261,16 @@ struct DistributedUnaryExpressionTemplate< T1, Operation, Parameter, VectorVaria //// // Distributed unary expression template with no parameter template< typename T1, - template< typename > class Operation > -struct DistributedUnaryExpressionTemplate< T1, Operation, void, VectorVariable > + template< typename > class Operation, + typename Communicator > +struct DistributedUnaryExpressionTemplate< T1, Operation, void, Communicator, VectorVariable > { using RealType = typename T1::RealType; using DeviceType = typename T1::DeviceType; using IndexType = typename T1::IndexType; using IsExpressionTemplate = bool; - using CommunicatorType = typename T1::CommunicatorType; - using CommunicationGroup = typename T1::CommunicationGroup; + using CommunicatorType = Communicator; + using CommunicationGroup = typename CommunicatorType::CommunicationGroup; static constexpr bool isStatic() { return false; } DistributedUnaryExpressionTemplate( const T1& a ): operand( a ){} @@ -314,79 +320,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Addition >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Addition >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Addition > -operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Addition >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Addition >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Addition > -operator + ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator + ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Addition >( a, b ); } @@ -394,17 +405,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Addition >( a, b ); } @@ -412,34 +424,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator + ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Addition >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator + ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Addition >( a, b ); } @@ -450,79 +464,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Subtraction >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator - ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Subtraction >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator - ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } @@ -530,17 +549,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } @@ -548,34 +568,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator - ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator - ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Subtraction >( a, b ); } @@ -586,79 +608,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Multiplication >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator * ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Multiplication >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator * ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } @@ -666,17 +693,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } @@ -684,34 +712,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >& b ) +operator * ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator * ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Multiplication >( a, b ); } @@ -722,79 +752,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Division >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Division >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Division > -operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Division >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Division >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Division > -operator / ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator / ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Division >( a, b ); } @@ -802,17 +837,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Division >( a, b ); } @@ -820,34 +856,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator / ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Division >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Division > -operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator / ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Division >( a, b ); } @@ -859,79 +897,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Min > -min ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +min ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Min >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Min > -min( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +min( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Min >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Min > -min( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +min( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Min >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Min > -min( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +min( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Min >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Min > -min( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +min( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Min >( a, b ); } @@ -939,17 +982,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Min > -min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Min >( a, b ); } @@ -957,34 +1001,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Min > -min( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +min( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Min >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Min > -min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Min >( a, b ); } @@ -995,79 +1041,84 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Max >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +max( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, Containers::Expressions::Max >( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Max > -operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator + ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType, - Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >, + typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType, + Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >, Containers::Expressions::Max >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +max( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, Containers::Expressions::Max >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Max > -max( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +max( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType, + Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >, Containers::Expressions::Max >( a, b ); } @@ -1075,17 +1126,18 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >, Containers::Expressions::Max >( a, b ); } @@ -1093,34 +1145,36 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Max >( a, b ); } template< typename L1, template< typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > const Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Max > -max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation >& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1,LOperation, Communicator >& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { return Containers::Expressions::DistributedBinaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, + Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >, Containers::Expressions::Max >( a, b ); } @@ -1132,64 +1186,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + return Containers::Expressions::DistributedComparison< Left, Right >::template EQ< Communicator >( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator == ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator == ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator == ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator == ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator == ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator == ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } @@ -1197,14 +1251,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator == ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator == ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } @@ -1212,14 +1266,14 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator == ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::EQ( a, b ); } @@ -1230,64 +1284,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator != ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator != ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator != ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator != ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator != ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator != ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } @@ -1295,14 +1349,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator != ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator != ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } @@ -1310,14 +1364,14 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator != ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::NE( a, b ); } @@ -1328,64 +1382,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator < ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator < ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator < ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator < ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator < ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator < ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } @@ -1393,14 +1447,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator < ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator < ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } @@ -1408,14 +1462,14 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator < ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LT( a, b ); } @@ -1426,64 +1480,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator <= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator <= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator <= ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator <= ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator <= ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator <= ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } @@ -1491,14 +1545,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator <= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator <= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } @@ -1506,14 +1560,14 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator <= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::LE( a, b ); } @@ -1524,64 +1578,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator > ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator > ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator > ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator > ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator > ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator > ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } @@ -1589,14 +1643,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator > ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator > ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } @@ -1604,14 +1658,14 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator > ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GT( a, b ); } @@ -1622,64 +1676,64 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; - using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator >= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator >= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; + using Right = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } template< typename T1, typename T2, - template< typename, typename > class Operation > -__cuda_callable__ + template< typename, typename > class Operation, + typename Communicator > bool -operator >= ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& b ) +operator >= ( const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >; + using Left = typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } template< typename T1, - template< typename > class Operation > -__cuda_callable__ + template< typename > class Operation, + typename Communicator > bool -operator >= ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& b ) +operator >= ( const typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType& a, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& b ) { - using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >::RealType; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } @@ -1687,14 +1741,14 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > -__cuda_callable__ + template< typename, typename > class ROperation, + typename Communicator > bool -operator >= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator >= ( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >; - using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >; + using Left = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } @@ -1702,45 +1756,46 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > -__cuda_callable__ + template< typename > class ROperation, + typename Communicator > bool -operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator >= ( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) { - using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation >; + using Left = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >; + using Right = Containers::Expressions::DistributedUnaryExpressionTemplate< R1, ROperation, Communicator >; return Containers::Expressions::DistributedComparison< Left, Right >::GE( a, b ); } //// // Unary operations - //// // Minus template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Minus > -operator -( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +operator -( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Minus >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Abs > -operator -( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +operator -( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Minus >( a ); } @@ -1748,26 +1803,28 @@ operator -( const Containers::Expressions::DistributedUnaryExpressionTemplate< L // Abs template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Abs > -abs( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +abs( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Abs >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Abs > -abs( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +abs( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Abs >( a ); } @@ -1775,26 +1832,28 @@ abs( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Sin template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sin > -sin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +sin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sin >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sin > -sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sin >( a ); } @@ -1802,26 +1861,28 @@ sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Cos template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cos > -cos( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +cos( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cos >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cos > -cos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +cos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cos >( a ); } @@ -1829,26 +1890,28 @@ cos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Tan template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Tan > -tan( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +tan( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Tan >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Tan > -tan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +tan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Tan >( a ); } @@ -1856,26 +1919,28 @@ tan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Sqrt template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sqrt > -sqrt( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +sqrt( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sqrt >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sqrt > -sqrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +sqrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sqrt >( a ); } @@ -1883,26 +1948,28 @@ sqrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Cbrt template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cbrt > -cbrt( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +cbrt( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cbrt >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cbrt > -cbrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +cbrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cbrt >( a ); } @@ -1911,14 +1978,15 @@ cbrt( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp template< typename L1, typename L2, template< typename, typename > class LOperation, + typename Communicator, typename Real > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Pow > -pow( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, const Real& exp ) +pow( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, const Real& exp ) { auto e = Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Pow >( a ); e.parameter.set( exp ); return e; @@ -1926,14 +1994,15 @@ pow( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, + typename Communicator, typename Real > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Pow > -pow( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, const Real& exp ) +pow( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, const Real& exp ) { auto e = Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Pow >( a ); e.parameter.set( exp ); return e; @@ -1943,26 +2012,28 @@ pow( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Floor template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sin > -floor( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +floor( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Floor >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Floor > -floor( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +floor( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Floor >( a ); } @@ -1970,26 +2041,28 @@ floor( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LO // Ceil template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Ceil > -ceil( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +ceil( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Ceil >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Ceil > -sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Ceil >( a ); } @@ -1997,26 +2070,28 @@ sin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Asin template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Asin > -asin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +asin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Asin >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Asin > -asin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +asin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Asin >( a ); } @@ -2024,26 +2099,28 @@ asin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Acos template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Acos > -cos( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +cos( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Acos >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Acos > -acos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +acos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cos >( a ); } @@ -2051,26 +2128,28 @@ acos( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Atan template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Atan > -tan( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +tan( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Atan >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Atan > -atan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +atan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Atan >( a ); } @@ -2078,26 +2157,28 @@ atan( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Sinh template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sinh > -sinh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +sinh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Sinh >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sinh > -sinh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +sinh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Sinh >( a ); } @@ -2105,26 +2186,28 @@ sinh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Cosh template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cosh > -cosh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +cosh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Cosh >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cosh > -cosh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +cosh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Cosh >( a ); } @@ -2132,26 +2215,28 @@ cosh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Tanh template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Tanh > -cosh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +cosh( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Tanh >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Tanh > -tanh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +tanh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Tanh >( a ); } @@ -2159,26 +2244,28 @@ tanh( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Log template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log > -log( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +log( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log > -log( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +log( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log >( a ); } @@ -2186,26 +2273,28 @@ log( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Log10 template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log10 > -log10( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +log10( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log10 >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log10 > -log10( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +log10( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log10 >( a ); } @@ -2213,26 +2302,28 @@ log10( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LO // Log2 template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log2 > -log2( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +log2( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Log2 >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log2 > -log2( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +log2( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Log2 >( a ); } @@ -2240,26 +2331,28 @@ log2( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOp // Exp template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Exp > -exp( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +exp( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >, + Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >, Containers::Expressions::Exp >( a ); } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename Communicator > const Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Exp > -exp( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a ) +exp( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a ) { return Containers::Expressions::DistributedUnaryExpressionTemplate< - Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >, Containers::Expressions::Exp >( a ); } @@ -2267,11 +2360,13 @@ exp( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe // Vertical operations - min template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -min( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +min( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; Real result = std::numeric_limits< Real >::max(); if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionMin( a ); @@ -2282,11 +2377,13 @@ min( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { - using CommunicatorType = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; Real result = std::numeric_limits< Real >::max(); if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionMin( a ); @@ -2298,9 +2395,10 @@ min( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe template< typename L1, typename L2, template< typename, typename > class LOperation, + typename Communicator, typename Index > auto -argMin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, Index& arg ) -> decltype( ExpressionArgMin( a, arg ) ) +argMin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, Index& arg ) -> decltype( ExpressionArgMin( a, arg ) ) { throw Exceptions::NotImplementedError( "agrMin for distributed vector view is not implemented yet." ); return ExpressionArgMin( a, arg ); @@ -2309,6 +2407,7 @@ argMin( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, template< typename L1, template< typename > class LOperation, typename Parameter, + typename Communicator, typename Index > auto argMin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a, Index& arg ) -> decltype( ExpressionMin( a, arg ) ) @@ -2319,11 +2418,13 @@ argMin( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; Real result = std::numeric_limits< Real >::min(); if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionMax( a ); @@ -2334,11 +2435,13 @@ max( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { - using CommunicatorType = Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; Real result = std::numeric_limits< Real >::min(); if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionMax( a ); @@ -2350,9 +2453,10 @@ max( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe template< typename L1, typename L2, template< typename, typename > class LOperation, + typename Communicator, typename Index > auto -argMax( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, Index& arg ) -> decltype( ExpressionArgMax( a, arg ) ) +argMax( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, Index& arg ) -> decltype( ExpressionArgMax( a, arg ) ) { throw Exceptions::NotImplementedError( "agrMax for distributed vector view is not implemented yet." ); return ExpressionArgMax( a, arg ); @@ -2361,6 +2465,7 @@ argMax( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, template< typename L1, template< typename > class LOperation, typename Parameter, + typename Communicator, typename Index > auto argMax( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a, Index& arg ) -> decltype( ExpressionMax( a, arg ) ) @@ -2371,11 +2476,13 @@ argMax( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -sum( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +sum( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; Real result = 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionSum( a ); @@ -2386,11 +2493,13 @@ sum( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType sum( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; Real result = 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionSum( a ); @@ -2402,11 +2511,12 @@ sum( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOpe template< typename L1, typename L2, template< typename, typename > class LOperation, + typename Communicator, typename Real > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -lpNorm( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, const Real& p ) +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +lpNorm( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, const Real& p ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; Real result = ( Real ) 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = TNL::pow( Containers::Expressions::ExpressionLpNorm( a, p ), p ); @@ -2418,11 +2528,12 @@ lpNorm( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, template< typename L1, template< typename > class LOperation, typename Parameter, + typename Communicator, typename Real > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType lpNorm( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a, const Real& p ) { - using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; Real result = ( Real ) 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = TNL::pow( Containers::Expressions::ExpressionLpNorm( a, p ), p ); @@ -2433,11 +2544,13 @@ lpNorm( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -product( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +product( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; Real result = ( Real ) 1.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionProduct( a ); @@ -2448,11 +2561,13 @@ product( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType product( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; Real result = ( Real ) 1.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionProduct( a ); @@ -2463,12 +2578,14 @@ product( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > bool -logicalOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +logicalOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; - bool result = false; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; + Real result = 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionLogicalOr( a ); CommunicatorType::Allreduce( &localResult, &result, 1, MPI_LOR, a.getCommunicationGroup() ); @@ -2478,10 +2595,12 @@ logicalOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > bool logicalOr( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; bool result = false; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { @@ -2494,14 +2613,15 @@ logicalOr( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1 template< typename L1, typename L2, - template< typename, typename > class LOperation > + template< typename, typename > class LOperation, + typename Communicator > bool -logicalAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) +logicalAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; - Real result = std::numeric_limits< Real >::max(); + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; + bool result = false; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { - const Real localResult = Containers::Expressions::ExpressionLogicalAnd( a ); + const bool localResult = Containers::Expressions::ExpressionLogicalAnd( a ); CommunicatorType::Allreduce( &localResult, &result, 1, MPI_LAND, a.getCommunicationGroup() ); } return result; @@ -2509,14 +2629,15 @@ logicalAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > bool logicalAnd( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; - Real result = std::numeric_limits< Real >::max(); + bool result = false; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { - const Real localResult = Containers::Expressions::ExpressionLogicalAnd( a ); + const bool localResult = Containers::Expressions::ExpressionLogicalAnd( a ); CommunicatorType::Allreduce( &localResult, &result, 1, MPI_LAND, a.getCommunicationGroup() ); } return result; @@ -2524,11 +2645,13 @@ logicalAnd( const Containers::Expressions::DistributedUnaryExpressionTemplate< L template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -binaryOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +binaryOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; Real result = ( Real ) 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionBinaryOr( a ); @@ -2539,10 +2662,12 @@ binaryOr( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1 template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType binaryOr( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; Real result = ( Real ) 0.0; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { @@ -2554,12 +2679,14 @@ binaryOr( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, template< typename L1, typename L2, - template< typename, typename > class LOperation > -typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::RealType -binaryAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a ) + template< typename, typename > class LOperation, + typename Communicator > +typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType +binaryAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a ) { - using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >::CommunicatorType; - bool result = true; + using Real = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::RealType; + using CommunicatorType = typename Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >::CommunicatorType; + Real result = std::numeric_limits< Real >::max; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionBinaryAnd( a ); CommunicatorType::Allreduce( &localResult, &result, 1, MPI_BAND, a.getCommunicationGroup() ); @@ -2569,12 +2696,14 @@ binaryAnd( const Containers::Expressions::DistributedBinaryExpressionTemplate< L template< typename L1, template< typename > class LOperation, - typename Parameter > + typename Parameter, + typename Communicator > typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType binaryAnd( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) { + using Real = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType; using CommunicatorType = typename Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Parameter >::CommunicatorType; - bool result = true; + Real result = std::numeric_limits< Real >::max; if( a.getCommunicationGroup() != CommunicatorType::NullGroup ) { const Real localResult = Containers::Expressions::ExpressionBinaryAnd( a ); CommunicatorType::Allreduce( &localResult, &result, 1, MPI_BAND, a.getCommunicationGroup() ); @@ -2589,10 +2718,11 @@ template< typename L1, template< typename, typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > auto -operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2600,10 +2730,11 @@ operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > auto -operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2613,10 +2744,11 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > auto -operator,( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +operator,( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2626,10 +2758,11 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > auto -operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2637,10 +2770,11 @@ operator,( const Containers::Expressions::DistributedBinaryExpressionTemplate< L template< typename T1, typename T2, - template< typename, typename > class Operation > + template< typename, typename > class Operation, + typename Communicator > auto -dot( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >::RealType& b ) +dot( const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >::RealType& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2650,10 +2784,11 @@ template< typename L1, template< typename > class LOperation, typename R1, typename R2, - template< typename, typename > class ROperation > + template< typename, typename > class ROperation, + typename Communicator > auto -dot( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation >& a, - const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation >& b ) +dot( const Containers::Expressions::DistributedUnaryExpressionTemplate< L1, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedBinaryExpressionTemplate< R1, R2, ROperation, Communicator >& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2663,10 +2798,11 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename Communicator > auto -dot( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation >& a, - const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation >& b ) +dot( const Containers::Expressions::DistributedBinaryExpressionTemplate< L1, L2, LOperation, Communicator >& a, + const typename Containers::Expressions::DistributedUnaryExpressionTemplate< R1,ROperation, Communicator >& b ) -> decltype( TNL::sum( a * b ) ) { return TNL::sum( a * b ); @@ -2679,11 +2815,12 @@ template< typename Vector, typename T1, typename T2, template< typename, typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result evaluateAndReduce( Vector& lhs, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& expression, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2700,11 +2837,12 @@ Result evaluateAndReduce( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result evaluateAndReduce( Vector& lhs, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2724,11 +2862,12 @@ template< typename Vector, typename T1, typename T2, template< typename, typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result addAndReduce( Vector& lhs, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& expression, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2749,11 +2888,12 @@ Result addAndReduce( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result addAndReduce( Vector& lhs, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2777,11 +2917,12 @@ template< typename Vector, typename T1, typename T2, template< typename, typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result addAndReduceAbs( Vector& lhs, - const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& expression, + const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2802,11 +2943,12 @@ Result addAndReduceAbs( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Communicator, typename Reduction, typename VolatileReduction, typename Result > Result addAndReduceAbs( Vector& lhs, - const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::DistributedUnaryExpressionTemplate< T1, Operation, Communicator >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2828,8 +2970,9 @@ Result addAndReduceAbs( Vector& lhs, // Output stream template< typename T1, typename T2, - template< typename, typename > class Operation > -std::ostream& operator << ( std::ostream& str, const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation >& expression ) + template< typename, typename > class Operation, + typename Communicator > +std::ostream& operator << ( std::ostream& str, const Containers::Expressions::DistributedBinaryExpressionTemplate< T1, T2, Operation, Communicator >& expression ) { str << "[ "; for( int i = 0; i < expression.getLocalSize() - 1; i++ ) @@ -2840,7 +2983,8 @@ std::ostream& operator << ( std::ostream& str, const Containers::Expressions::Di template< typename T, template< typename > class Operation, - typename Parameter > + typename Parameter, + typename Communicator > std::ostream& operator << ( std::ostream& str, const Containers::Expressions::DistributedUnaryExpressionTemplate< T, Operation, Parameter >& expression ) { str << "[ "; diff --git a/src/TNL/Containers/Expressions/ExpressionTemplates.h b/src/TNL/Containers/Expressions/ExpressionTemplates.h index f80da43aa8..286b288c9c 100644 --- a/src/TNL/Containers/Expressions/ExpressionTemplates.h +++ b/src/TNL/Containers/Expressions/ExpressionTemplates.h @@ -2380,7 +2380,7 @@ logicalOr( const Containers::Expressions::BinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename, typename > class LOperation, + template< typename > class LOperation, typename Parameter > bool logicalOr( const Containers::Expressions::UnaryExpressionTemplate< L1, LOperation, Parameter >& a ) @@ -2428,7 +2428,7 @@ template< typename L1, typename L2, template< typename, typename > class LOperation > auto -binaryAnd( const Containers::Expressions::BiaryExpressionTemplate< L1, L2, LOperation >& a ) -> decltype( ExpressionBinaryAnd( a ) ) +binaryAnd( const Containers::Expressions::BinaryExpressionTemplate< L1, L2, LOperation >& a ) -> decltype( ExpressionBinaryAnd( a ) ) { return ExpressionBinaryAnd( a ); } diff --git a/src/TNL/Containers/Expressions/StaticExpressionTemplates.h b/src/TNL/Containers/Expressions/StaticExpressionTemplates.h index 4427bc7a58..9fdc3b42dd 100644 --- a/src/TNL/Containers/Expressions/StaticExpressionTemplates.h +++ b/src/TNL/Containers/Expressions/StaticExpressionTemplates.h @@ -452,49 +452,52 @@ operator + ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator + ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Addition >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Addition > -operator + ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator + ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Addition >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Addition > -operator + ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator + ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Addition >( a, b ); } @@ -503,34 +506,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Addition > operator + ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Addition >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Addition > operator + ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Addition >( a, b ); } @@ -588,49 +594,52 @@ operator - ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator - ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Subtraction >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Subtraction > -operator - ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator - ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Subtraction >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Subtraction > -operator - ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator - ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Subtraction >( a, b ); } @@ -639,34 +648,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Subtraction > operator - ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Subtraction >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Subtraction > operator - ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Subtraction >( a, b ); } @@ -724,49 +736,52 @@ operator * ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator * ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Multiplication >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Multiplication > -operator * ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator * ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Multiplication >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Multiplication > -operator * ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator * ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Multiplication >( a, b ); } @@ -775,34 +790,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Multiplication > operator * ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >& b ) + const Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Multiplication >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Multiplication > operator * ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Multiplication >( a, b ); } @@ -860,49 +878,52 @@ operator + ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Division > -operator / ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator / ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Division >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Division > -operator / ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator / ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Division >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Division > -operator / ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator / ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Division >( a, b ); } @@ -911,34 +932,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Division > operator / ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Division >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Division > operator / ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Division >( a, b ); } @@ -997,49 +1021,52 @@ min( const typename Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Min > -min( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +min( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Min >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Min > -min( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +min( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Min >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Min > -min( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +min( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Min >( a, b ); } @@ -1048,34 +1075,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Min > min( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Min >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Min > min( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Min >( a, b ); } @@ -1133,49 +1163,52 @@ operator + ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Max > -max( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +max( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, Containers::Expressions::Max >( a, b ); } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Max > -max( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +max( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType, - Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >, + typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType, + Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >, Containers::Expressions::Max >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Max > -max( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +max( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >, Containers::Expressions::Max >( a, b ); } @@ -1184,34 +1217,37 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Max > max( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Max >( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > const Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Max > max( const Containers::Expressions::StaticUnaryExpressionTemplate< L1,LOperation >& a, const Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { return Containers::Expressions::StaticBinaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, - Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, + Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >, Containers::Expressions::Max >( a, b ); } @@ -1247,14 +1283,15 @@ operator == ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator == ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator == ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::EQ( a, b ); } @@ -1272,28 +1309,30 @@ operator == ( const typename Containers::Expressions::StaticBinaryExpressionTemp } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator == ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator == ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::EQ( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator == ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator == ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::EQ( a, b ); } @@ -1302,14 +1341,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator == ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::EQ( a, b ); } @@ -1345,14 +1385,15 @@ operator != ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator != ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator != ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::NE( a, b ); } @@ -1370,28 +1411,30 @@ operator != ( const typename Containers::Expressions::StaticBinaryExpressionTemp } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator != ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator != ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::NE( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator != ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator != ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::NE( a, b ); } @@ -1400,14 +1443,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator != ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::NE( a, b ); } @@ -1443,14 +1487,15 @@ operator < ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator < ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator < ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::LT( a, b ); } @@ -1468,28 +1513,30 @@ operator < ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator < ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator < ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::LT( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator < ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator < ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::LT( a, b ); } @@ -1498,14 +1545,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator < ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::LT( a, b ); } @@ -1541,14 +1589,15 @@ operator <= ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator <= ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator <= ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::LE( a, b ); } @@ -1566,28 +1615,30 @@ operator <= ( const typename Containers::Expressions::StaticBinaryExpressionTemp } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator <= ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator <= ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::LE( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator <= ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator <= ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::LE( a, b ); } @@ -1596,14 +1647,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator <= ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::LE( a, b ); } @@ -1639,14 +1691,15 @@ operator > ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator > ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator > ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::GT( a, b ); } @@ -1664,28 +1717,30 @@ operator > ( const typename Containers::Expressions::StaticBinaryExpressionTempl } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator > ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator > ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::GT( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator > ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator > ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::GT( a, b ); } @@ -1694,14 +1749,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator > ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::GT( a, b ); } @@ -1737,14 +1793,15 @@ operator >= ( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator >= ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& a, - const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& b ) +operator >= ( const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& a, + const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; - using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; + using Right = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; return Containers::Expressions::StaticComparison< Left, Right >::GE( a, b ); } @@ -1762,28 +1819,30 @@ operator >= ( const typename Containers::Expressions::StaticBinaryExpressionTemp } template< typename T1, - template< typename > class Operation > + template< typename > class Operation, + typename Parameter > __cuda_callable__ bool -operator >= ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType& a, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& b ) +operator >= ( const typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType& a, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& b ) { - using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >::RealType; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >; + using Left = typename Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >::RealType; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >; return Containers::Expressions::StaticComparison< Left, Right >::GE( a, b ); } template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ bool -operator >= ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +operator >= ( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) { - using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >; + using Left = Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >; using Right = Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >; return Containers::Expressions::StaticComparison< Left, Right >::GE( a, b ); } @@ -1792,14 +1851,15 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ bool operator >= ( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >& a, const typename Containers::Expressions::StaticUnaryExpressionTemplate< R1,ROperation >& b ) { using Left = Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >; - using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation >; + using Right = Containers::Expressions::StaticUnaryExpressionTemplate< R1, ROperation, RParameter >; return Containers::Expressions::StaticComparison< Left, Right >::GE( a, b ); } @@ -1823,15 +1883,16 @@ operator -( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Abs > -operator -( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +operator -( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Minus >( a ); } @@ -1852,15 +1913,16 @@ abs( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Abs > -abs( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +abs( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Abs >( a ); } @@ -1881,15 +1943,16 @@ sin( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sin > -sin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +sin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sin >( a ); } @@ -1910,15 +1973,16 @@ cos( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cos > -cos( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +cos( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cos >( a ); } @@ -1939,15 +2003,16 @@ tan( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Tan > -tan( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +tan( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Tan >( a ); } @@ -1968,15 +2033,16 @@ sqrt( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sqrt > -sqrt( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +sqrt( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sqrt >( a ); } @@ -1997,15 +2063,16 @@ cbrt( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cbrt > -cbrt( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +cbrt( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cbrt >( a ); } @@ -2030,15 +2097,16 @@ pow( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe template< typename L1, template< typename > class LOperation, + typename LParameter, typename Real > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Pow > -pow( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, const Real& exp ) +pow( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const Real& exp ) { auto e = Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Pow >( a ); e.parameter.set( exp ); return e; @@ -2061,15 +2129,16 @@ floor( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LO } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Floor > -floor( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +floor( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Floor >( a ); } @@ -2090,15 +2159,16 @@ ceil( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Ceil > -sin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +sin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Ceil >( a ); } @@ -2119,15 +2189,16 @@ asin( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Asin > -asin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +asin( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Asin >( a ); } @@ -2148,15 +2219,16 @@ cos( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Acos > -acos( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +acos( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cos >( a ); } @@ -2177,15 +2249,16 @@ tan( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Atan > -atan( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +atan( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Atan >( a ); } @@ -2206,15 +2279,16 @@ sinh( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sinh > -sinh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +sinh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Sinh >( a ); } @@ -2235,15 +2309,16 @@ cosh( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cosh > -cosh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +cosh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Cosh >( a ); } @@ -2264,15 +2339,16 @@ cosh( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Tanh > -tanh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +tanh( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Tanh >( a ); } @@ -2293,15 +2369,16 @@ log( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log > -log( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +log( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log >( a ); } @@ -2322,15 +2399,16 @@ log10( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LO } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log10 > -log10( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +log10( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log10 >( a ); } @@ -2351,15 +2429,16 @@ log2( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOp } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log2 > -log2( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +log2( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Log2 >( a ); } @@ -2380,15 +2459,16 @@ exp( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe } template< typename L1, - template< typename > class LOperation > + template< typename > class LOperation, + typename LParameter > __cuda_callable__ const Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Exp > -exp( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a ) +exp( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return Containers::Expressions::StaticUnaryExpressionTemplate< - Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >, + Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >, Containers::Expressions::Exp >( a ); } @@ -2406,10 +2486,10 @@ min( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -min( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +min( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionMin( a ); } @@ -2426,10 +2506,10 @@ max( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -max( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +max( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionMax( a ); } @@ -2446,10 +2526,10 @@ sum( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOpe template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -sum( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +sum( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionSum( a ); } @@ -2471,11 +2551,11 @@ lpNorm( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, L template< typename L1, template< typename > class LOperation, - typename Parameter, + typename LParameter, typename Real > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -lpNorm( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a, const Real& p ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +lpNorm( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const Real& p ) { if( p == 1.0 ) return StaticExpressionLpNorm( a, p ); @@ -2496,10 +2576,10 @@ product( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -product( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +product( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionProduct( a ); } @@ -2516,10 +2596,10 @@ logicalOr( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2 template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -logicalOr( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +logicalOr( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionLogicalOr( a ); } @@ -2536,10 +2616,10 @@ binaryOr( const Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, template< typename L1, template< typename > class LOperation, - typename Parameter > + typename LParameter > __cuda_callable__ -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >::RealType -binaryOr( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, Parameter >& a ) +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +binaryOr( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a ) { return StaticExpressionBinaryOr( a ); } @@ -2578,13 +2658,14 @@ operator,( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, T2 template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ //auto -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >::RealType -operator,( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +operator,( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) //-> decltype( TNL::sum( a * b ) ) { @@ -2595,7 +2676,8 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ //auto typename Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >::RealType @@ -2637,13 +2719,14 @@ dot( const Containers::Expressions::StaticBinaryExpressionTemplate< T1, T2, Oper template< typename L1, template< typename > class LOperation, + typename LParameter, typename R1, typename R2, template< typename, typename > class ROperation > __cuda_callable__ //auto -typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >::RealType -dot( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation >& a, +typename Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >::RealType +dot( const Containers::Expressions::StaticUnaryExpressionTemplate< L1, LOperation, LParameter >& a, const typename Containers::Expressions::StaticBinaryExpressionTemplate< R1, R2, ROperation >& b ) //-> decltype( TNL::sum( a * b ) ) { @@ -2654,7 +2737,8 @@ template< typename L1, typename L2, template< typename, typename > class LOperation, typename R1, - template< typename > class ROperation > + template< typename > class ROperation, + typename RParameter > __cuda_callable__ //auto typename Containers::Expressions::StaticBinaryExpressionTemplate< L1, L2, LOperation >::RealType @@ -2690,12 +2774,13 @@ Result evaluateAndReduce( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Parameter, typename Reduction, typename VolatileReduction, typename Result > __cuda_callable__ Result evaluateAndReduce( Vector& lhs, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2734,12 +2819,13 @@ Result addAndReduce( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Parameter, typename Reduction, typename VolatileReduction, typename Result > __cuda_callable__ Result addAndReduce( Vector& lhs, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) @@ -2781,12 +2867,13 @@ Result addAndReduceAbs( Vector& lhs, template< typename Vector, typename T1, template< typename > class Operation, + typename Parameter, typename Reduction, typename VolatileReduction, typename Result > __cuda_callable__ Result addAndReduceAbs( Vector& lhs, - const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation >& expression, + const Containers::Expressions::StaticUnaryExpressionTemplate< T1, Operation, Parameter >& expression, Reduction& reduction, VolatileReduction& volatileReduction, const Result& zero ) diff --git a/src/TNL/Containers/StaticVector.h b/src/TNL/Containers/StaticVector.h index 2869eb51b5..2de5778df2 100644 --- a/src/TNL/Containers/StaticVector.h +++ b/src/TNL/Containers/StaticVector.h @@ -34,8 +34,8 @@ class StaticVector : public StaticArray< Size, Real > constexpr static int size = Size; using StaticArray< Size, Real >::getSize; - using StaticArray< Size, Real >::operator ==; - using StaticArray< Size, Real >::operator !=; + //using StaticArray< Size, Real >::operator ==; + //using StaticArray< Size, Real >::operator !=; /** * \brief Basic constructor. @@ -235,8 +235,8 @@ class StaticVector< 1, Real > : public StaticArray< 1, Real > constexpr static int size = 1; using StaticArray< 1, Real >::getSize; - using StaticArray< 1, Real >::operator ==; - using StaticArray< 1, Real >::operator !=; + //using StaticArray< 1, Real >::operator ==; + //using StaticArray< 1, Real >::operator !=; @@ -357,8 +357,8 @@ class StaticVector< 2, Real > : public StaticArray< 2, Real > constexpr static int size = 2; using StaticArray< 2, Real >::getSize; - using StaticArray< 2, Real >::operator ==; - using StaticArray< 2, Real >::operator !=; + //using StaticArray< 2, Real >::operator ==; + //using StaticArray< 2, Real >::operator !=; /** \brief See StaticVector::StaticVector().*/ @@ -487,8 +487,8 @@ class StaticVector< 3, Real > : public StaticArray< 3, Real > constexpr static int size = 3; using StaticArray< 3, Real >::getSize; - using StaticArray< 3, Real >::operator ==; - using StaticArray< 3, Real >::operator !=; + //using StaticArray< 3, Real >::operator ==; + //using StaticArray< 3, Real >::operator !=; /** \brief See StaticVector::StaticVector().*/ @@ -750,3 +750,6 @@ struct IsStatic< Containers::StaticVector< Size, Real > > }; } // namespace TNL + +#include <TNL/Containers/StaticVectorExpressions.h> +#include <TNL/Containers/Expressions/StaticExpressionTemplates.h> \ No newline at end of file diff --git a/src/TNL/Containers/StaticVectorExpressions.h b/src/TNL/Containers/StaticVectorExpressions.h index 60cc396d14..211374770d 100644 --- a/src/TNL/Containers/StaticVectorExpressions.h +++ b/src/TNL/Containers/StaticVectorExpressions.h @@ -12,7 +12,8 @@ #include <TNL/Containers/Expressions/StaticExpressionTemplates.h> #include <TNL/Containers/Expressions/ExpressionTemplatesOperations.h> -#include <TNL/Containers/Expressions/Comparison.h> +#include <TNL/Containers/Expressions/StaticComparison.h> +#include <TNL/Containers/Expressions/StaticVerticalOperations.h> namespace TNL { @@ -149,13 +150,6 @@ bool operator==( const StaticVector< Size, Real1 >& a, const StaticVector< Size, //// // Comparison operations - operator != -template< int Size, typename Real, typename ET > -__cuda_callable__ -bool operator!=( const StaticVector< Size, Real >& a, const ET& b ) -{ - return Expressions::StaticComparison< StaticVector< Size, Real >, ET >::NE( a, b ); -} - template< typename ET, int Size, typename Real > __cuda_callable__ bool operator!=( const ET& a, const StaticVector< Size, Real >& b ) -- GitLab