Template error and parallel foreach bug?
simendsjo
simen.endsjo at pandavre.com
Sat Jun 4 05:02:07 PDT 2011
I just found Project Euler, and tried to solve the first problem.
https://gist.github.com/1007840
I did four implementations: template, ctfe, parallel foreach and
parallel map.
The template implementation works on low numbers, but not on 1000
(haven't checked when it fails). It gives me the following error:
euler1.d(23): Error: template instance
euler1.SumMultiple3Or5(499LU,Below,57918LU) recursive expansion
The parallel foreach loop works good on low numbers, but when increasing
BOLOW it starts giving wrong results. The higher the number, the more
often it calculates wrong results.
This is tested on dmd 2.053 on a dual core Win7.
More information about the Digitalmars-d-learn
mailing list