|
|
scott wrote:
>> Like this?
>> http://news.povray.org/povray.binaries.animations/thread/%3Cweb.4b02da
71bde7fd6d299b4a940%40news.povray.org%3E/
>>
>> That 256x256x256 df3 took a few minutes to generate on my machine, so
>> the proof of concept works.
>
> Hehe I just did the same :-) Mine was 1024x1024x1024 df3 file which
> took about half an hour multithreaded under c#.net (I decided the
> speedup I could get by easy multithreading in c# outweighed the speedup
> I could get with C++ over C#). The render only took about 2 minutes,
> it's just an isosurface and a few lights.
>
>> I haven't optimized the code too far yet, it's still using the trig
>> functions, but it can be used for any value N.
>
> Yeh mine too, it looks like there should be a way to lose the trig even
> with N=8, but it might get a bit scary...
>
>> Unfortunately it's not multi-threaded yet either, but as soon as I
>> learn a bit more about how to write that, the structure of the code
>> will require very little modification to allow that.
>
> Yeh, I chose to do it under C# because it's very easy to do the
> multithreading on there and I have no experience of doing multithreadin
g
> on normal C++. I just wanted to get something working this afternoon t
o
> see what it looked like.
>
Well, if your compiler supports OpenMP, the multithreading is as
simple as including omp.h and writing "#pragma omp parallel for
shared(a)" just before your outer loop (where "a" is the name of the
array in which you store your results)...
See: https://computing.llnl.gov/tutorials/openMP/
Jerome
--
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr
Post a reply to this message
Attachments:
Download 'us-ascii' (1 KB)
|
|