Software Open Access
thread_pool_test.cpphas been added to the package. It will perform automated tests of all aspects of the package, and benchmark some multithreaded matrix operations. Please run it on your system and submit a bug report if any of the tests fail. In addition, the code is thoroughly documented, and is meant to serve as an extensive example of how to properly use the package.
README.md. See this pull request.
THREAD_POOL_VERSION, which returns the version number and release date of the thread pool library as a string.
parallelize_loop()has undergone some major changes (and is now incompatible with v1.x):
[first, last). For example, for an array with
nindices, instead of
parallelize_loop(0, n - 1, ...)you should now write
parallelize_loop(0, n, ...).
loopfunction is now only called once per block, instead of once per index, as was the case before. This should provide a performance boost due to significantly reducing the number of function calls, and it also allows you to conserve resources by using them only once per block instead of once per index (an example can be found in the
thread_pool_test.cpp). It also means that
loopnow takes two arguments: the first index in the block and the index after the last index in the block. Thus,
loop(start, end)should typically involve a loop of the form
for (T i = start; i < end; i++).
parallelize_loop(0, i, ...)did not work if
iwas not an
0was interpreted as
int, and the two arguments had to be of the same type. Therefore, one had to use casting, e.g.
parallelize_loop((size_t)0, i), to make it work. Now this is no longer necessary; the common type is inferred automatically using
|All versions||This version|
|Data volume||621.5 kB||100.8 kB|