Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Boolean DoForLoop(Int32 IterMin, Int32 IterMax, TForLoopEvent MyLoop, TMtxForLoop Threads, Object[] Context) | Call this function to initiate threaded for-loop. |
| 2 | Boolean DoForLoop(Int32 IterMin, Int32 IterMax, TForLoopRangeEvent MyLoop, TMtxForLoop Threads, Object[] Context) | Call this function to initiate threaded for-loop. |
Overload 1: Boolean DoForLoop(Int32 IterMin, Int32 IterMax, TForLoopEvent MyLoop, TMtxForLoop Threads, Object[] Context)
Call this function to initiate threaded for-loop.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | IterMin | Int32 | |
| 2 | IterMax | Int32 | |
| 3 | MyLoop | TForLoopEvent | |
| 4 | Threads | TMtxForLoop | |
| 5 | Context | Object[] |
Returns: Boolean
The MyLoop method pointer must be a method. This is the function that will be called (IterMax - IterMin + 1) times. Threads parameter requires a TMtxForLoop object and Context can be used to pass any parameters to the threaded function. Computational load for each Iteration in the range from IterMin to IterMax is allowed to vary (possibly by a lot). Further vectorization within each threaded function call is not possible across the working Iteration range.
This overload will take advantage of the super-conductive MtxVec object cache, if MtxVec.Controller.ThreadDimension is more than Threads.ThreadCount+1. Calling DoForLoop in parallel from multiple threads will not work. The call is to be protected with a critical section or otherwise.
Overload 2: Boolean DoForLoop(Int32 IterMin, Int32 IterMax, TForLoopRangeEvent MyLoop, TMtxForLoop Threads, Object[] Context)
Call this function to initiate threaded for-loop.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | IterMin | Int32 | |
| 2 | IterMax | Int32 | |
| 3 | MyLoop | TForLoopRangeEvent | |
| 4 | Threads | TMtxForLoop | |
| 5 | Context | Object[] |
Returns: Boolean
The MyLoop method pointer must be a method. This is the function that will be called once by each thread. Threads parameter requires a TMtxForLoop object and the Context parameter can be used to pass any parameters to the threaded function. The threading engine will attempt to equaly partition the job between available threads assuming constant computational load for each Iteration in the range from IterMin to IterMax. However, further vectorization is possible within each threaded function call.
This overload will take advantage of the super-conductive MtxVec object cache, if MtxVec.Controller.ThreadDimension is more than Threads.ThreadCount+1. Calling DoForLoop in parallel from multiple threads will not work. The call is to be protected with a critical section or otherwise.