Task parallel programming
BitMagic Library

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

Collaboration diagram for Task parallel programming:

## Data Structures

struct | bm::task_descr
| BitMagic task with a captured function. 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).
typedef std::function< int(void *)> | bm::task_function_t
| Typedef for a call-back functional for lambda capture.

## Functions

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

## 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 49 of file bmtask.h.

## task_function_t

typedef std::function<int(void*)> bm::task_function_t

Typedef for a call-back functional for lambda capture.

Definition at line 54 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 194 of file bmtask.h.

References bm::task_descr::argp, bm::task_batch_base::get_task(), bm::task_descr::run(), and bm::task_batch_base::size().