BitMagic-C++
Data Structures | Typedefs | Functions
Task parallel programming

Task parallel programming compatible with different execution models and runtimes. More...

Collaboration diagram for Task parallel programming:

Data Structures

struct  bm::task_description
 Descriptor for a task as a callback function, arguments, result. More...
 
class  bm::task_batch_base
 Interface definition (base class) for a group of tasks (batch) More...
 
class  bm::task_batch< BVAlloc >
 Basic implementation for collection of tasks for parallel execution. More...
 
class  bm::spin_lock< Pad >
 Spin-lock with two-phase acquire (read + cas) padding parameter optionally adds a buffer to avoid CPU cache line contention. More...
 
class  bm::queue_sync< Value, Lock >
 Thread-sync queue with MT access protecion. More...
 
class  bm::thread_pool< QValue, Lock >
 Thread pool with custom (thread safe) queue. More...
 
class  bm::thread_pool_executor< TPool >
 Utility class to submit task batch to the running thread pool and optionally wait for it getting done. More...
 
class  bm::optimize_plan_builder< SVect, Lock >
 Builder class to prepare a batch of tasks for parallel optimization of a sparse vector. More...
 
class  bm::compute_sim_matrix_plan_builder< BV >
 Parallel plan builder for the XOR filter scanner. More...
 
class  bm::sv_serialization_plan_builder< SV >
 Parallel plan builder for succinct sparse vector serialization. More...
 

Typedefs

typedef void *(* bm::task_func_type) (void *)
 Typedef for a call-back function pointer (pthread conformant signature) More...
 

Functions

void bm::run_task_batch (task_batch_base &tasks)
 Run task batch sequentially. More...
 

Detailed Description

Task parallel programming compatible with different execution models and runtimes.

Typedef Documentation

◆ task_func_type

typedef void*(* bm::task_func_type) (void *)

Typedef for a call-back function pointer (pthread conformant signature)

Definition at line 46 of file bmtask.h.

Function Documentation

◆ run_task_batch()

void bm::run_task_batch ( task_batch_base tasks)
inline

Run task batch sequentially.

Function is used for testing and debugging purposes or as a reference to implement custom parallel executors

Parameters
tasks- collection of tasks to run

Definition at line 192 of file bmtask.h.

References bm::task_description::argp, bm::task_description::done, bm::task_description::func, bm::task_batch_base::get_task(), bm::task_description::ret, and bm::task_batch_base::size().