Sean Yes but I called shootrays and define parallel macros.So bu_parallel took as a function (shootrays_in_parallel). But the loop is returning false in shootrays_in_parallel. Tried with a for loop for nrays but got a memory stack error.Maybe got wrong with setup resource structure .
@scorp08 I understand what you did and what I'm saying is that you're using a non-public function that is NOT intended to be called by other codes. It should have a "static" label on it. In fact, I'm going to add one now because it's not public API and was never intended to be public API because of assumptions it has in it that would lead to exactly this sort of confusion. It (shootrays_in_parallel) will no longer be directly callable after the next release, only indirectly via rt_shootrays().
Is there a reason you cannot call rt_shootrays() or rt_shootray_bundle() ?
I would guess it's because rt_shootrays() currently isn't implemented in parallel and that's what you're trying to achieve? If so, that's current development that isn't finished (which is why the version that calls shootrays_in_parallel() is protected by a compile-time SHOOTRAYS_IN_PARALLEL ifdef check). As soon as someone get it working, parallel will either be the default or will at least be configurable.
Is there a reason you cannot call rt_shootrays() or rt_shootray_bundle() ?
I would guess it's because rt_shootrays() currently isn't implemented in parallel and that's what you're trying to achieve? If so, that's current development that isn't finished (which is why the version that calls shootrays_in_parallel() is protected by a compile-time SHOOTRAYS_IN_PARALLEL ifdef check). As soon as someone get it working, parallel will either be the default or will at least be configurable.
@Sean Yes, I wanted to see parallelism over serial shoot.
set ncpu to 1 for serial, >1 for parallel, and 0 for autodetect parallel
@scorp08 then you're probably going to want to implement your own callback function and call bu_parallel(), like rt does. or keep bugging me or others to finish the rt_shootrays() interface :)
(for parallel)
scorp08 then you're probably going to want to implement your own callback function and call bu_parallel(), like rt does. or keep bugging me or others to finish the rt_shootrays() interface :)
:)) @Sean Where can I start to study shootray_parallel? :)
@scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.
scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.
@Sean thnks. Do I need to setup a resource structure for each ray or for only one is enough ??
scorp08 I would study bu_parallel() first, figure out how you want to chop up work into sets/buckets, then use the ncpu key from bu_parallel to set up rt_shootray() calls for each bucket.
Sean thnks. Do I need to setup a resource structure for each ray or for only one is enough ??
No, you only need to setup a resource for each core that will be involved, which is typically the number of virtual cores your CPU has enabled
Last updated: Jan 09 2025 at 00:46 UTC