Re: [eigen] FLENS C++ expression template Library has excellent documentation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] FLENS C++ expression template Library has excellent documentation
- From: Rohit Garg <rpg.314@xxxxxxxxx>
- Date: Sat, 18 Apr 2009 21:43:45 +0530
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Mmojh9PmHeL3JR7RPC3XDqHx8T5MH4vvR2iOMrfy+5g=; b=mjtAvOlUGc7evMp0s8/OxiPOD85vblZ224SrFgJwRFB+R5AW5fQkyQCtquhFdEBwhR Ris4i3y/wmE6/XHzYoFyL+hUPJKpc3hMEpG7cAEkhFiBpk/goOs1+D1O/HKQBIWZL6lJ DV2e3P0mpTw5Zq0tNsGKEcANWymL/HeRYhi0g=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=SEgfejkU2SVwGwM6gE6GgjMIsnGfMD0AEwji7dFuSi9/UpUxAkehUP7yGRw6fRHFXP NEH6wa2FfgsfKTadnV+xb+77xhJNSKx3X8TnVuHXw1PSj0wyk3IluM/PDlnAgZepLGRm 9316DlH6wyt0MRmKvxfuXgxSYvmt/ZdMdvBlc=
> In the case of EIGEN with the expression templates we have a very strong
> base that can support such an approach. As the compiler knows the
> calculations ahead it could parallelize some calcutations. E.g. look at
> the expression:
>
> E = A*B + C*D
>
> You could do it the dumb way to use a parallel A*B, then a parallel C*D
> and at the end a parallel E = prod1 + prod2. That's what OpenMP could
> offer you.
> But wouldn't it be much wiser to run A*B in one thread, C*D in another
> and a E = prod1 + prod2? That's much better with data location...
Cilk like parallelism then perhaps. But that would need a different
non-standard compiler.....
> But chaning that code to use a very lightweight sceduler and different
> tasks with minimal locking and still best data locality is hard work.
> But it'll be woth it - for the big matrix case (I *guess* small, fixed
> matrices won't benefit at the EIGEN level of parallelsation. There the
> bigger algorithms have to take care of it).
Which is the minimally lightweight scheduler in your opinion?
Pthreads? Intel TBB? OpenMP atleast has the advantage of being
compiler driven so can be atleast there will be no code to link to.
--
Rohit Garg
http://rpg-314.blogspot.com/
Senior Undergraduate
Department of Physics
Indian Institute of Technology
Bombay