From d1a29d6319d6919e0c3d1c624ad45d8202be1942 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 3 Apr 2008 11:10:17 +0000 Subject: -new: recursive costs system, useful to determine automatically when to evaluate arguments and when to meta-unroll. -use it in Product to determine when to eval args. not yet used to determine when to unroll. for now, not used anywhere else but that'll follow. -fix badness of my last commit --- Eigen/src/Core/Random.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Eigen/src/Core/Random.h') diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h index 03f08ef06..4bd482958 100644 --- a/Eigen/src/Core/Random.h +++ b/Eigen/src/Core/Random.h @@ -41,7 +41,8 @@ struct ei_traits > ColsAtCompileTime = ei_traits::ColsAtCompileTime, MaxRowsAtCompileTime = ei_traits::MaxRowsAtCompileTime, MaxColsAtCompileTime = ei_traits::MaxColsAtCompileTime, - Flags = ei_traits::Flags + Flags = ei_traits::Flags, + CoeffReadCost = 2 * NumTraits::MulCost // FIXME: arbitrary value }; }; @@ -92,7 +93,7 @@ template class Random : ei_no_assignment_operator, * \sa ei_random(), ei_random(int) */ template -const typename ei_eval_unless_lazy >::Type +const typename ei_eval_unless_lazy >::type MatrixBase::random(int rows, int cols) { return Random(rows, cols).eval(); @@ -115,7 +116,7 @@ MatrixBase::random(int rows, int cols) * \sa ei_random(), ei_random(int,int) */ template -const typename ei_eval_unless_lazy >::Type +const typename ei_eval_unless_lazy >::type MatrixBase::random(int size) { ei_assert(IsVectorAtCompileTime); @@ -135,7 +136,7 @@ MatrixBase::random(int size) * \sa ei_random(int), ei_random(int,int) */ template -const typename ei_eval_unless_lazy >::Type +const typename ei_eval_unless_lazy >::type MatrixBase::random() { return Random(RowsAtCompileTime, ColsAtCompileTime).eval(); -- cgit v1.2.3