Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for 0 or 1 indexing with bu_parallel_id
Got bit by this with the new BoT raytracing - on Windows, bu_parallel_id() starts counting from 1, so the thread indexing into the hit array was offset accordingly. On Linux, however, bu_parallel_id() DOES return 0 - so that offset generated an invalid index and segfault. Simplest approach appears to be to increase the hit array allocation by 1, to allow either indexing approach to succeed. Additional cost of a single unused hit container is negligible and avoids any other need for conditional logic.
- Loading branch information