[Issue 7917] -inline option fails for complex expressions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 16 04:55:16 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7917
--- Comment #3 from bearophile_hugs at eml.cc 2012-04-16 04:56:08 PDT ---
(In reply to comment #2)
> import std.algorithm ;
> import std.range ;
> import std.stdio ;
> import std.typecons ;
>
> double partialSum ( immutable Tuple ! ( int , int , double ) data ) {
> return 1.0 ;
> }
>
> void execute ( immutable int numberOfTasks ) {
> immutable n = 1000000000 ;
> immutable delta = 1.0 / n ;
> immutable sliceSize = n / numberOfTasks ;
> immutable pi = reduce ! ( ( a , b ) => a + b ) ( 0.0 , map ! ( partialSum ) (
> map ! ( i => tuple ( i , cast ( int ) sliceSize , cast ( double ) delta ) )
> ( iota ( numberOfTasks ) ) ) ) ;
> }
>
> int main ( immutable string[] args ) {
> execute ( 1 ) ;
> return 0 ;
> }
Maybe you are able to trim away some more stuff from that code, to minimize it
some more.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list