|
Boost Users : |
Subject: Re: [Boost-users] [lambda] Subscripting in lamda expressions.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-25 10:36:39
AMDG
Robert Jones wrote:
> Here's a little quick and dirty square matirx multiply I've written.
> Ok. I know
> this leaves a lot to be desired on the quality front, but I'm not in a
> position to
> rewrite the whole system here!
>
> The lambda function argument to accumulate is clearly not right, but how I
> write something that implements the intention here?
>
>
> Iter( 0 ), Iter( BLOCK_SIZE ), 0, l[ y ][ _1 ] * r[ _1 ][ x ] );
I think you need
var(l)[y][_1] * var(r)[_1][x]
(Remember that operator[] can only be defined as a member)
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net