DirectTrace  0.9
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Using multithreading

Explicit and implicit multithreading is possible. Currently, only explicit multithreading is supported. Check whether multithreading support is provided with your version.

Explicit Multithreading

With explicit multithreading, it is the programmer task to ensure that enough jobs are sent in parallel to the different cores on your computer. Explicit multithreading just works by running several intersectors at once, each with a different set of rays. However, only a scene at a time can be handled by the library. To avoid duplicated redundant information for a given scene and still ensure atomicity of some (hidden) operations, you will need to create cloned scenes. Explicit multithreading may be needed if you have several cores available, and/or Multi GPUs setups. When correctly employed, speed-up should be linear.
Explicit multithreading is only supported at the moment by the CL version of DirectTrace.

Implicit Multithreading

With implicit multithreading, the API takes care of parallelizing tasks, and you should not have too much to do, except potentially notifying the number of resources (cores) you want to allocate to a particular job. Implicit nultithreading is supported on GPUs, but you will need to check the support by the X86 version. It is the programmer task to ensure that enough jobs are sent in parallel to the different cores on your computer.
Implicit Multithreading (OpenCL version only) is under development at the moment, for both the Intersector and the IntersectorCL functions.