The NavData generation system is designed to be fast enough that generation times should not represent a problem for your production workflow or pipeline, even on large terrains. However, it could always be faster! To this end, the system offers the ability to run parts of the generation process in parallel on multiple processors.
Gameware Navigation provides built-in support for generating NavData on multiple cores of the host machine, through the use of the open-source Threaded Building Blocks (TBB) libraries from Intel. If you integrate the API of the NavData generation system into your own tools, you can also extend the framework in order to make use of a different third-party utility for managing the parallel computations.
In principle, splitting the generation process over multiple cores can decrease generation time in direct proportion to the number of cores available. In practice, the real gains are somewhat less due to the pre-processing and post-processing phases of NavData generation, which are not parallelized. In any case, you should see significant gains in speed when using parallel computations, particularly for large terrains.
The steps and considerations involved in using multiple processors are slightly different depending on whether you use the Navigation Lab or the API of the NavData generation system.
Multi-processor generation is enabled by default in the Navigation Lab.
To enable or disable generation of NavData on multiple processors in the Navigation Lab:
The Navigation Lab uses TBB internally to distribute NavData generation across all available processors on your computer.
Note that multi-core support is available only in Release builds of the standalone tools. Because Debug builds of TBB have been found to run very slowly, Debug builds of the standalone tools always generate NavData in sequence on a single processor without using TBB.
If you have followed the instructions for integrating the API of the NavData generation system given under Integration Phase 6: Using the NavData Generation API, you should already be set up to use TBB through the TbbParallelForInterface class.
To use a custom utility for managing parallel computations:
For details, see the IParallelForInterface class description. In addition, full source code is provided for the TbbParallelForInterface implementation, so you can use this implementation as a model for your own class.
It is up to you to ensure that any other requirements of your custom parallelization system are met.