![]() |
HDF5 Last Updated on 2026-09-19
The HDF5 Field Guide
|
Use the functions in this module to manage threads in HDF5.
Functions | |
| herr_t | H5TSset_internal_threads (unsigned num_threads) |
| Sets the number of internal threads to use for internal multithreading. | |
| herr_t H5TSset_internal_threads | ( | unsigned | num_threads | ) |
Sets the number of internal threads to use for internal multithreading.
| [in] | num_threads | Number of threads to use for internal multithreading |
H5TSset_internal_threads() directs the HDF5 library to us num_threads threads to accelerate parallelizable operations.
This is currently only used to accelerate read operations for chunked datasets that either have data filters applied or for which the chunks are small enough to fit in cache. In this case, the library parallelizes the reads from disk, the data filter operations, and the memory scatter operation. However, all of these operations are currently protected by a mutex so no performance gain is expected and this feature is purely experimental. These mutexes will be relaxed in the future to enable performance acceleration.
Currently, the library will immediately create num_threads threads and retain them until this function is called again. Calling this function with num_threads set to 0 will terminate these threads and disable internal multithreading.
This is currently only used to accelerate raw data reads of chunked datasets. This will occur when the following conditions are met:
num_threads > 0 . threads_enabled set to false .