Threaded functions

In case you need more power Fann2MQL lets you perform parallel multithreaded processing on multiprocessor (or multicore) computer taking full advantage of Intel® Threading Building Blocks technology (works on Intel and AMD CPUs). You can achieve it using functions described below.

The C declarations of threaded functions look as follows:

int __stdcall f2M_run_parallel(DWORD anns_count, int *anns, double *input_vector);

Run fann networks in parallel using Intel TBB
anns_count – number of networks to run in paralel
anns[] – network handlers returned by f2M_create*
*input_vector – arrary of inputs
Returns:
0 on success, -1 on error
Note:
To obtain network output use f2M_get_output().
Any existing output is overwritten

int __stdcall f2M_train_parallel(DWORD anns_count, int* anns, double *input_vector, double *output_vector)

Train fann networks in parallel using Intel TBB
anns_count – number of networks to run in paralel
anns[] – network handlers returned by f2M_create*
*input_vector – arrary of inputs
*output_vector – array of outputs
Returns:
0 on success, <0 on error

int __stdcall f2M_parallel_init()

Initializes Intel TBB parallel processing interface
Returns:
0 on success

int __stdcall f2M_parallel_deinit()

Deinitiaizes Intel TBB parallel processing interface
Returns:
0 on success, -1 on error

Advertisements