BitMagic-C++
|
Descriptor for a task as a callback function, arguments, result. More...
#include <bmtask.h>
Public Types | |
enum | task_flags { no_flag = 0 , barrier_ok = 1u , barrier_any = (1u << 1) , barrier_ok_delayed = (1u << 2) } |
Public Member Functions | |
task_description () BMNOEXCEPT | |
task_description (const task_description &td) BMNOEXCEPT | |
More... | |
task_description (task_func_type f, void *argptr=0) BMNOEXCEPT | |
More... | |
void | init (task_func_type f, void *argptr, void *c0, void *c1, bm::id64_t p0) BMNOEXCEPT |
More... | |
Data Fields | |
task_func_type | func |
pthread-like function callback More... | |
void * | argp |
arg pointer More... | |
void * | ret |
ret pointer More... | |
void * | ctx0 |
reserved More... | |
void * | ctx1 |
reserved More... | |
bm::id64_t | param0 |
reserved More... | |
union { | |
int i32 | |
unsigned u32 | |
unsigned long long u64 | |
float fp32 | |
double fp64 | |
void * void_ptr | |
} | payload0 |
Union to add extra flexible payload to tasks. More... | |
union { | |
int i32 | |
unsigned u32 | |
unsigned long long u64 | |
float fp32 | |
double fp64 | |
void * void_ptr | |
} | payload1 |
More... | |
bm::id64_t | flags |
task flags to designate barriers More... | |
unsigned | err_code |
error code More... | |
std::atomic_uint | done |
0 - pending More... | |
Descriptor for a task as a callback function, arguments, result.
Structure contains pointers but being a descriptor it does not own their scope or nature (how it is allocated).
void* bm::task_description::argp |
arg pointer
Definition at line 67 of file bmtask.h.
Referenced by init(), bm::thread_pool_executor< TPool >::run(), bm::run_task_batch(), task_description(), and bm::thread_pool< QValue, Lock >::worker_func().
void* bm::task_description::ctx0 |
reserved
Definition at line 70 of file bmtask.h.
Referenced by init(), task_description(), bm::optimize_plan_builder< SVect, Lock >::task_run(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().
void* bm::task_description::ctx1 |
reserved
Definition at line 71 of file bmtask.h.
Referenced by init(), task_description(), bm::optimize_plan_builder< SVect, Lock >::task_run(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().
std::atomic_uint bm::task_description::done |
0 - pending
Definition at line 87 of file bmtask.h.
Referenced by init(), bm::thread_pool_executor< TPool >::run(), bm::run_task_batch(), task_description(), bm::thread_pool_executor< TPool >::wait_for_batch_done(), and bm::thread_pool< QValue, Lock >::worker_func().
unsigned bm::task_description::err_code |
bm::id64_t bm::task_description::flags |
task flags to designate barriers
Definition at line 85 of file bmtask.h.
Referenced by bm::sv_serialization_plan_builder< SV >::build_plan(), init(), bm::thread_pool_executor< TPool >::run(), and task_description().
task_func_type bm::task_description::func |
pthread-like function callback
Definition at line 66 of file bmtask.h.
Referenced by init(), bm::thread_pool_executor< TPool >::run(), bm::run_task_batch(), task_description(), and bm::thread_pool< QValue, Lock >::worker_func().
bm::id64_t bm::task_description::param0 |
reserved
Definition at line 72 of file bmtask.h.
Referenced by init(), task_description(), bm::optimize_plan_builder< SVect, Lock >::task_run(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().
union { ... } bm::task_description::payload0 |
Union to add extra flexible payload to tasks.
Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), bm::sv_serialization_plan_builder< SV >::build_plan(), init(), task_description(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().
union { ... } bm::task_description::payload1 |
void* bm::task_description::ret |
ret pointer
Definition at line 68 of file bmtask.h.
Referenced by bm::sv_serialization_plan_builder< SV >::build_plan(), init(), bm::thread_pool_executor< TPool >::run(), bm::run_task_batch(), task_description(), and bm::thread_pool< QValue, Lock >::worker_func().
unsigned bm::task_description::u32 |
Definition at line 78 of file bmtask.h.
Referenced by bm::sv_serialization_plan_builder< SV >::build_plan().
unsigned long long bm::task_description::u64 |
Definition at line 79 of file bmtask.h.
Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().
void* bm::task_description::void_ptr |
Definition at line 82 of file bmtask.h.
Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), and bm::compute_sim_matrix_plan_builder< BV >::task_run().