Multi-thread Dispatching

 

In your module, if you have to execute an operation on multiple frames at the same time, you can take advantage of the "Fct_Dispatch_..." functions.  These function will dispatch your operation in different threads.  It will maximize the use of the available CPUs and do all the overhead for you.

 

You provide the function with a "Struct_Dispatch_1" structure containing a list of the frames you want to process and a pointer to your processing function.  Your function will be called with a pointer to a "Struct_Dispatch_2" structure containing a pointer to an individual frame.

 

The only thing you have to remember, is that your function must call the "Fct_Dispatch_End" function before it exit.

 

 

Fct_Dispatch_TAG

 

Used to process multiple frames when your operation change the frame's TAG values

 

Fct_Dispatch_GLI

 

Used to process multiple frames when your operation change the frame's GLI values

 

Fct_Dispatch_Other

 

Used to process multiple frames when your operation do not change the frame's TAG or GLI values

 

Fct_Dispatch_End

 

Must be present in your processing function before it exit.