Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bshoshany/thread-pool
/ functions
Functions
226 in github.com/bshoshany/thread-pool
⨍
Functions
226
◇
Types & classes
40
↓ 179 callers
Function
logln
tests/BS_thread_pool_test.cpp:386
↓ 142 callers
Function
check
* @brief Check if a condition is met, report the result, and keep count of the total number of successes and failures. * * @param condition The cond
tests/BS_thread_pool_test.cpp:465
↓ 68 callers
Method
wait
* @brief Wait for all the futures stored in this `BS::multi_future`. */
include/BS_thread_pool.hpp:520
↓ 56 callers
Function
logln_ansi
tests/BS_thread_pool_test.cpp:415
↓ 38 callers
Function
log
tests/BS_thread_pool_test.cpp:371
↓ 29 callers
Method
add_argument
* @brief Add an argument to the list of allowed arguments. * * @param arg The argument. * @param desc The description of the argument.
tests/BS_thread_pool_test.cpp:3896
↓ 28 callers
Function
print_header
* @brief Print a stylized header with the specified ANSI styles. * * @param text The text of the header. Will appear between two lines. * @param sy
tests/BS_thread_pool_test.cpp:427
↓ 25 callers
Method
size
* @brief Get the number of command line arguments. * * @return The number of arguments. */
tests/BS_thread_pool_test.cpp:3933
↓ 17 callers
Function
print_if_verbose
Print a message followed by a newline, but only if the verbose flag is set. Uses the given ANSI codes if specified.
scripts/compile_cpp.py:149
↓ 15 callers
Method
end
* @brief Get the index after the last index of a block. * * @param block The block number. * @return The index after the last index.
include/BS_thread_pool.hpp:610
↓ 15 callers
Function
log_ansi
tests/BS_thread_pool_test.cpp:399
↓ 14 callers
Function
affinity_to_string
* @brief Convert a `std::vector<bool>` representing CPU affinity to a string of 0s and 1s. * * @param affinity The affinity. * @return The string.
tests/BS_thread_pool_test.cpp:2983
↓ 14 callers
Method
get
* @brief Get the results from all the futures stored in this `BS::multi_future`, rethrowing any stored exceptions. * * @return If the future
include/BS_thread_pool.hpp:470
↓ 14 callers
Function
print_error_and_exit
Print an error message followed by a newline in red and exit.
scripts/compile_cpp.py:172
↓ 14 callers
Function
random_pair
tests/BS_thread_pool_test.cpp:572
↓ 13 callers
Function
print_key_values
Print a key-value pair with the key left-aligned to the given length, but only if the verbose flag is set.
scripts/compile_cpp.py:160
↓ 12 callers
Function
random
tests/BS_thread_pool_test.cpp:555
↓ 11 callers
Function
make_string
tests/BS_thread_pool_test.cpp:599
↓ 10 callers
Function
os_process_priority_name
* @brief Get the string representation of an OS process priority. * * @param priority A `std::optional<BS::os_process_priority>` object. * @return
tests/BS_thread_pool_test.cpp:2802
↓ 10 callers
Function
print_key_values
tests/BS_thread_pool_test.cpp:441
↓ 9 callers
Function
set_os_process_priority
* @brief Set the priority of the current process using the current platform's native API. This should work on Windows, Linux, and macOS. However, note
include/BS_thread_pool.hpp:950
↓ 8 callers
Function
relative_or_full_path
If the path is relative to the current working directory, return it as a relative path; otherwise, return it as a full path.
scripts/compile_cpp.py:178
↓ 8 callers
Method
wait_for
include/BS_thread_pool.hpp:535
↓ 7 callers
Function
check_root
* @brief Check if a condition is met, report the result, but do not keep count of the total number of successes and failures, because failure is expec
tests/BS_thread_pool_test.cpp:2838
↓ 6 callers
Function
check_copy
* @brief Check, for a specific member function which parallelizes loops or sequences of tasks, that the callable object does not get copied in the pro
tests/BS_thread_pool_test.cpp:2575
↓ 6 callers
Function
check_shared_ptr
* @brief Check, for a specific member function which parallelizes loops or sequences of tasks, that if a task that captures a shared pointer is submit
tests/BS_thread_pool_test.cpp:2643
↓ 6 callers
Method
get_flag
tests/BS_thread_pool_test.cpp:1143
↓ 6 callers
Function
get_os_process_affinity
* @brief Get the processor affinity of the current process using the current platform's native API. This should work on Windows and Linux, but is not
include/BS_thread_pool.hpp:842
↓ 6 callers
Function
os_thread_priority_name
* @brief Get the string representation of an OS thread priority. * * @param priority A `std::optional<BS::os_thread_priority>` object. * @return A
tests/BS_thread_pool_test.cpp:2823
↓ 6 callers
Method
print
include/BS_thread_pool.hpp:2459
↓ 6 callers
Function
print_separator
Print a separator line, but only if the verbose flag is set.
scripts/compile_cpp.py:155
↓ 6 callers
Method
release
* @brief Atomically increments the internal counter. Any thread(s) waiting for the counter to be greater than 0, such as due to being blocked in `acqu
tests/BS_thread_pool_test.cpp:170
↓ 5 callers
Method
ms
* @brief Get the number of milliseconds stored when `stop()` was last called. * * @return The number of milliseconds. */
tests/BS_thread_pool_test.cpp:3462
↓ 5 callers
Function
set_os_process_affinity
* @brief Set the processor affinity of the current process using the current platform's native API. This should work on Windows and Linux, but is not
include/BS_thread_pool.hpp:887
↓ 4 callers
Function
all_flags_equal
tests/BS_thread_pool_test.cpp:501
↓ 4 callers
Function
check_blocks_no_return
* @brief Check that detach_blocks() or submit_blocks() work for a specific range of indices split over a specific number of tasks, with no return valu
tests/BS_thread_pool_test.cpp:1751
↓ 4 callers
Function
check_loop_no_return
* @brief Check that detach_loop() or submit_loop() work for a specific range of indices split over a specific number of tasks, with no return value.
tests/BS_thread_pool_test.cpp:1629
↓ 4 callers
Function
detach_bulk
include/BS_thread_pool.hpp:1545
↓ 4 callers
Function
show_intro
* @brief Show basic information about the program. */
tests/BS_thread_pool_test.cpp:3791
↓ 4 callers
Method
wait_until
include/BS_thread_pool.hpp:556
↓ 3 callers
Method
acquire
* @brief Atomically decrements the internal counter by 1 if it is greater than 0; otherwise blocks until it is greater than 0 and can successfully dec
tests/BS_thread_pool_test.cpp:154
↓ 3 callers
Method
get_height
tests/BS_thread_pool_test.cpp:3222
↓ 3 callers
Method
get_width
tests/BS_thread_pool_test.cpp:3227
↓ 3 callers
Function
print_ansi
Print a message. Uses the given ANSI codes if specified. Does not add newline. Does not print color if the `NO_COLOR` environment variable is set.
scripts/compile_cpp.py:140
↓ 3 callers
Method
show_help
tests/BS_thread_pool_test.cpp:3911
↓ 3 callers
Method
stop
* @brief Stop measuring time and store the elapsed time since the object was constructed or since `start()` was last called. */
tests/BS_thread_pool_test.cpp:3452
↓ 3 callers
Function
submit_bulk
include/BS_thread_pool.hpp:1852
↓ 2 callers
Function
all_flags_set
tests/BS_thread_pool_test.cpp:517
↓ 2 callers
Function
calculate_mandelbrot
* @brief Calculate the colors of a range of pixels in an image, enumerated as a range of indices in a 1-dimensional array containing the flattened mat
tests/BS_thread_pool_test.cpp:3330
↓ 2 callers
Function
check_deadlock
tests/BS_thread_pool_test.cpp:2752
↓ 2 callers
Function
check_sequence_no_return
* @brief Check that detach_sequence() or submit_sequence() work for a specific range of indices, with no return value. * * @param pool The thread po
tests/BS_thread_pool_test.cpp:1911
↓ 2 callers
Function
check_task
* @brief Check that detach_task() or submit_task() work. * * @param which_func A string naming the function to check. */
tests/BS_thread_pool_test.cpp:885
↓ 2 callers
Function
compile_module
Compile a module with the given name. The first path in `paths` is the module file, and the rest are its dependencies. Returns True if the module was
scripts/compile_cpp.py:240
↓ 2 callers
Function
create_threads
include/BS_thread_pool.hpp:2064
↓ 2 callers
Function
destroy_threads
* @brief Destroy the threads in the pool. */
include/BS_thread_pool.hpp:2108
↓ 2 callers
Function
detach_task
include/BS_thread_pool.hpp:1627
↓ 2 callers
Function
find_vs_path
Find the Visual Studio installation path, if it exists.
scripts/compile_cpp.py:203
↓ 2 callers
Function
get_llvm_std_module
Get the path to the LLVM standard library module on Linux or macOS. If multiple paths are found, return the one with the latest LLVM version.
scripts/compile_cpp.py:191
↓ 2 callers
Function
get_module_flags
Get the appropriate flags to import a module with the given name from the given output path.
scripts/compile_cpp.py:230
↓ 2 callers
Method
get_num_blocks
* @brief Get the number of blocks. Note that this may be different than the desired number of blocks that was passed to the constructor. * *
include/BS_thread_pool.hpp:620
↓ 2 callers
Function
get_os_process_priority
* @brief Get the priority of the current process using the current platform's native API. This should work on Windows, Linux, and macOS. * * @return
include/BS_thread_pool.hpp:913
↓ 2 callers
Function
get_thread_count
* @brief Get the number of threads in the pool. * * @return The number of threads. */
include/BS_thread_pool.hpp:1692
↓ 2 callers
Function
move_only_function
include/BS_thread_pool.hpp:323
↓ 2 callers
Function
no_flags_set
tests/BS_thread_pool_test.cpp:533
↓ 2 callers
Function
plot_image_chars
* @brief Create a plot of an image as characters, using either 24-bit ANSI colors or monochrome blocks of different brightness. * * @param image The
tests/BS_thread_pool_test.cpp:3505
↓ 2 callers
Function
reset_pool
include/BS_thread_pool.hpp:2269
↓ 2 callers
Method
set_flag_no_args
tests/BS_thread_pool_test.cpp:1123
↓ 2 callers
Method
set_flag_one_arg
tests/BS_thread_pool_test.cpp:1128
↓ 2 callers
Method
start
* @brief Start (or restart) measuring time. Note that the timer starts ticking as soon as the object is created, so this is only necessary if we want
tests/BS_thread_pool_test.cpp:3444
↓ 2 callers
Method
start
* @brief Get the first index of a block. * * @param block The block number. * @return The first index. */
include/BS_thread_pool.hpp:631
↓ 2 callers
Function
wait
* @brief Wait for tasks to be completed. Normally, this function waits for all tasks, both those that are currently running in the threads and those t
include/BS_thread_pool.hpp:1964
↓ 2 callers
Function
worker
* @brief A worker function to be assigned to each thread in the pool. Waits until it is notified by `detach_task()` that a task is available, and then
include/BS_thread_pool.hpp:2283
↓ 1 callers
Method
add_stream
* @brief Add a stream to the list of output streams to print to. * * @param stream The stream. */
include/BS_thread_pool.hpp:2437
↓ 1 callers
Function
analyze
* @brief Calculate the mean and standard deviation of a set of integers. * * @param timings The integers. * @return A struct containing the mean an
tests/BS_thread_pool_test.cpp:3175
↓ 1 callers
Function
brightness_block
* @brief Map a color to a monochrome Unicode block based on its brightness, using luma coefficients. * * @param col The color. * @return The Unicod
tests/BS_thread_pool_test.cpp:3485
↓ 1 callers
Method
call
include/BS_thread_pool.hpp:343
↓ 1 callers
Function
check_blocks
* @brief Check that detach_blocks() and submit_blocks() work using several different random values for the range of indices and number of tasks. */
tests/BS_thread_pool_test.cpp:1814
↓ 1 callers
Function
check_blocks_return
* @brief Check that submit_blocks() works for a specific range of indices split over a specific number of tasks, with a return value. * * @param poo
tests/BS_thread_pool_test.cpp:1794
↓ 1 callers
Function
check_callables
* @brief Check that different callable types are accepted by the thread pool. */
tests/BS_thread_pool_test.cpp:1353
↓ 1 callers
Function
check_cleanup
* @brief Check that thread cleanup functions work. */
tests/BS_thread_pool_test.cpp:2456
↓ 1 callers
Function
check_common_index_type
* @brief Check that the type trait `BS::common_index_type` works as expected. */
tests/BS_thread_pool_test.cpp:2716
↓ 1 callers
Function
check_copy_all
* @brief Check, for all member functions which parallelize loops or sequences of tasks, that the callable object does not get copied in the process.
tests/BS_thread_pool_test.cpp:2603
↓ 1 callers
Function
check_exceptions_multi_future
* @brief Check that exceptions are forwarded correctly by `BS::multi_future`. */
tests/BS_thread_pool_test.cpp:2195
↓ 1 callers
Function
check_exceptions_submit
* @brief Check that exceptions are forwarded correctly by submit_task(). */
tests/BS_thread_pool_test.cpp:2175
↓ 1 callers
Function
check_get_pool
* @brief Check that get_pool() works. */
tests/BS_thread_pool_test.cpp:2491
↓ 1 callers
Function
check_init
* @brief Check that thread initialization functions and get_index() work. */
tests/BS_thread_pool_test.cpp:2409
↓ 1 callers
Function
check_loop
* @brief Check that detach_loop() and submit_loop() work using several different random values for the range of indices and number of tasks. */
tests/BS_thread_pool_test.cpp:1662
↓ 1 callers
Function
check_member_function
* @brief Check that submitting member functions works. */
tests/BS_thread_pool_test.cpp:1220
↓ 1 callers
Function
check_member_function_within_object
* @brief Check that submitting member functions within an object works. */
tests/BS_thread_pool_test.cpp:1292
↓ 1 callers
Function
check_os_process_affinity
* @brief Check that getting and setting OS process affinity works. */
tests/BS_thread_pool_test.cpp:2999
↓ 1 callers
Function
check_os_process_priorities
* @brief Check that getting and setting OS process priorities works. */
tests/BS_thread_pool_test.cpp:2867
↓ 1 callers
Function
check_os_thread_affinity
* @brief Check that getting and setting OS thread affinity works. */
tests/BS_thread_pool_test.cpp:3042
↓ 1 callers
Function
check_os_thread_names
* @brief Check that getting and setting OS thread names works. */
tests/BS_thread_pool_test.cpp:2957
↓ 1 callers
Function
check_os_thread_priorities
* @brief Check that getting and setting OS thread priorities works. */
tests/BS_thread_pool_test.cpp:2912
↓ 1 callers
Function
check_pausing
* @brief Check that pausing works. */
tests/BS_thread_pool_test.cpp:2090
↓ 1 callers
Function
check_performance
* @brief Benchmark multithreaded performance by calculating the Mandelbrot set. * * @param benchmark Whether to perform the full benchmarks. * @par
tests/BS_thread_pool_test.cpp:3599
↓ 1 callers
Function
check_priority
* @brief Check that task priority works as expected with all task submission methods. */
tests/BS_thread_pool_test.cpp:2281
↓ 1 callers
Function
check_purge
* @brief Check that purge() works. */
tests/BS_thread_pool_test.cpp:2123
↓ 1 callers
Function
check_reset
* @brief Check that reset() works. */
tests/BS_thread_pool_test.cpp:830
↓ 1 callers
Function
check_sequence
* @brief Check that detach_sequence() and submit_sequence() work using several different random values for the range of indices. */
tests/BS_thread_pool_test.cpp:1968
next →
1–100 of 226, ranked by callers