Commit 6df9cb18 authored by Davis King's avatar Davis King

Clarified spec

parent 1eeab0b9
...@@ -23,6 +23,7 @@ namespace dlib ...@@ -23,6 +23,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This is a convenience function for submitting a block of jobs to a thread_pool. - This is a convenience function for submitting a block of jobs to a thread_pool.
In particular, given the half open range [begin, end), this function will In particular, given the half open range [begin, end), this function will
...@@ -59,6 +60,7 @@ namespace dlib ...@@ -59,6 +60,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following block of code: - This function is equivalent to the following block of code:
thread_pool tp(num_threads); thread_pool tp(num_threads);
...@@ -79,6 +81,7 @@ namespace dlib ...@@ -79,6 +81,7 @@ namespace dlib
requires requires
- chunks_per_thread > 0 - chunks_per_thread > 0
- begin <= end - begin <= end
- funct does not throw any exceptions
ensures ensures
- This is a convenience function for submitting a block of jobs to a - This is a convenience function for submitting a block of jobs to a
thread_pool. In particular, given the range [begin, end), this function will thread_pool. In particular, given the range [begin, end), this function will
...@@ -113,6 +116,7 @@ namespace dlib ...@@ -113,6 +116,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following block of code: - This function is equivalent to the following block of code:
thread_pool tp(num_threads); thread_pool tp(num_threads);
...@@ -135,6 +139,7 @@ namespace dlib ...@@ -135,6 +139,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following function call: - This function is equivalent to the following function call:
parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub) parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub)
...@@ -164,6 +169,7 @@ namespace dlib ...@@ -164,6 +169,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following block of code: - This function is equivalent to the following block of code:
thread_pool tp(num_threads); thread_pool tp(num_threads);
...@@ -184,6 +190,7 @@ namespace dlib ...@@ -184,6 +190,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following function call: - This function is equivalent to the following function call:
parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub) parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub)
...@@ -211,6 +218,7 @@ namespace dlib ...@@ -211,6 +218,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is equivalent to the following block of code: - This function is equivalent to the following block of code:
thread_pool tp(num_threads); thread_pool tp(num_threads);
...@@ -233,6 +241,7 @@ namespace dlib ...@@ -233,6 +241,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for() routine defined above except - This function is identical to the parallel_for() routine defined above except
that it will print messages to cout showing the progress in executing the that it will print messages to cout showing the progress in executing the
...@@ -254,6 +263,7 @@ namespace dlib ...@@ -254,6 +263,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for() routine defined above except - This function is identical to the parallel_for() routine defined above except
that it will print messages to cout showing the progress in executing the that it will print messages to cout showing the progress in executing the
...@@ -274,6 +284,7 @@ namespace dlib ...@@ -274,6 +284,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for() routine defined above except - This function is identical to the parallel_for() routine defined above except
that it will print messages to cout showing the progress in executing the that it will print messages to cout showing the progress in executing the
...@@ -294,6 +305,7 @@ namespace dlib ...@@ -294,6 +305,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for() routine defined above except - This function is identical to the parallel_for() routine defined above except
that it will print messages to cout showing the progress in executing the that it will print messages to cout showing the progress in executing the
...@@ -316,6 +328,7 @@ namespace dlib ...@@ -316,6 +328,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for_blocked() routine defined - This function is identical to the parallel_for_blocked() routine defined
above except that it will print messages to cout showing the progress in above except that it will print messages to cout showing the progress in
...@@ -337,6 +350,7 @@ namespace dlib ...@@ -337,6 +350,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for_blocked() routine defined - This function is identical to the parallel_for_blocked() routine defined
above except that it will print messages to cout showing the progress in above except that it will print messages to cout showing the progress in
...@@ -357,6 +371,7 @@ namespace dlib ...@@ -357,6 +371,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for_blocked() routine defined - This function is identical to the parallel_for_blocked() routine defined
above except that it will print messages to cout showing the progress in above except that it will print messages to cout showing the progress in
...@@ -377,6 +392,7 @@ namespace dlib ...@@ -377,6 +392,7 @@ namespace dlib
requires requires
- begin <= end - begin <= end
- chunks_per_thread > 0 - chunks_per_thread > 0
- funct does not throw any exceptions
ensures ensures
- This function is identical to the parallel_for_blocked() routine defined - This function is identical to the parallel_for_blocked() routine defined
above except that it will print messages to cout showing the progress in above except that it will print messages to cout showing the progress in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment