BitMagic-C++
Data Structures | Public Types | Static Public Member Functions
bm::optimize_plan_builder< SVect, Lock > Class Template Reference

Builder class to prepare a batch of tasks for parallel optimization of a sparse vector. More...

#include <bmsparsevec_parallel.h>

Data Structures

struct  task_batch
 

Public Types

typedef SVect sparse_vector_type
 
typedef Lock lock_type
 
typedef sparse_vector_type::bvector_type bvector_type
 
typedef bvector_type::allocator_type allocator_type
 
typedef bvector_type::optmode optmode_type
 
typedef sparse_vector_type::statistics sv_statistics_type
 

Static Public Member Functions

static void build_plan (task_batch &batch, sparse_vector_type &sv, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename sparse_vector_type::statistics *st=0)
 Build paralell optimization batch (of tasks) for sparse vector. More...
 

Detailed Description

template<typename SVect, typename Lock>
class bm::optimize_plan_builder< SVect, Lock >

Builder class to prepare a batch of tasks for parallel optimization of a sparse vector.

Definition at line 36 of file bmsparsevec_parallel.h.

Member Function Documentation

◆ build_plan()

template<typename SVect , typename Lock >
static void bm::optimize_plan_builder< SVect, Lock >::build_plan ( task_batch batch,
sparse_vector_type sv,
typename bvector_type::optmode  opt_mode = bvector_type::opt_compress,
typename sparse_vector_type::statistics *  st = 0 
)
inlinestatic

Build paralell optimization batch (of tasks) for sparse vector.

Parameters
batch- target batch (can be re-used for multiple vectors)
sv- sparse vector for optimization
opt_mode- optimization mode (see bvector<>::optmode)
st- sparse vector statistics to compute with optimization pass (optional)

Definition at line 61 of file bmsparsevec_parallel.h.

References bm::task_batch< BVAlloc >::add(), BM_DECLARE_TEMP_BLOCK, bm::task_batch< BVAlloc >::get_task_vector(), and bm::bv_statistics::reset().


The documentation for this class was generated from the following file: