![]() |
Sometimes it may be necessary to enforce the serial execution of specific operations. For this purpose, the Blaze library offers two possible options.
The first option is the temporary and local enforcement of a serial execution via the BLAZE_SERIAL_SECTION:
Within the scope of the BLAZE_SERIAL_SECTION
, all operations are guaranteed to run in serial. Outside the scope of the serial section, all operations are run in parallel (if beneficial for the performance).
The second option is the general deactivation of the parallel execution (even in case OpenMP is enabled on the command line). This can be achieved via the ./blaze/config/SMP.h configuration file: In case the BLAZE_ENABLE_PARALLEL_EXECUTION
switch is set to 0, the shared-memory parallelization is deactivated altogether.