ThreadedCalculationFor Method |
Name | Description | |
---|---|---|
ForTParameter(Int32, Int32, TParameter, ITrackCalculationProgress, ThreadedCalculationBodyCallbackTParameter) |
A 'for' loop that is parallelized among multiple threads according to the
ThreadingPolicy active in the calling thread.
The loop behaves as if written as for (int i = start; i < stop; ++i).
Inside the body callback, the ThreadingPolicy will
be configured to use only the calling thread for any further parallelizable operations.
This usually improves performance by putting the parallelism where it is most useful:
in the 'for' loop itself. However, if you do wish to parallelize operations invoked
inside the 'for' loop, you must explicitly set the ThreadingPolicy
inside the callback.
| |
ForTParameter(Int32, Int32, TParameter, ITrackCalculationProgress, ThreadedCalculationBodyCallbackWithProgressTParameter) | A 'for' loop that is parallelized among multiple threads according to the ThreadingPolicy active in the calling thread. The loop behaves as if written as for (int i = start; i < stop; ++i). Inside the body callback, the ThreadingPolicy will be configured to use only the calling thread for any further parallelizable operations. This usually improves performance by putting the parallelism where it is most useful: in the 'for' loop itself. However, if you do wish to parallelize operations invoked inside the 'for' loop, you must explicitly set the ThreadingPolicy inside the callback. The body of the 'for' loop is given an ITrackCalculationProgress instance that can be used to report detailed information about the progress of individual loop iterations. It is not recommended to use this overload when looping through a large number of iterations or when detailed information about the progress of individual iterations is not required, because there is some overhead to the detailed progress reporting. | |
ForTParameter1, TParameter2(Int32, Int32, TParameter1, TParameter2, ITrackCalculationProgress, ThreadedCalculationBodyCallback2TParameter1, TParameter2) |
A 'for' loop that is parallelized among multiple threads according to the
ThreadingPolicy active in the calling thread.
The loop behaves as if written as for (int i = start; i < stop; ++i).
Inside the body callback, the ThreadingPolicy will
be configured to use only the calling thread for any further parallelizable operations.
This usually improves performance by putting the parallelism where it is most useful:
in the 'for' loop itself. However, if you do wish to parallelize operations invoked
inside the 'for' loop, you must explicitly set the ThreadingPolicy
inside the callback.
| |
ForTParameter1, TParameter2(Int32, Int32, TParameter1, TParameter2, ITrackCalculationProgress, ThreadedCalculationBodyCallbackWithProgress2TParameter1, TParameter2) | A 'for' loop that is parallelized among multiple threads according to the ThreadingPolicy active in the calling thread. The loop behaves as if written as for (int i = start; i < stop; ++i). Inside the body callback, the ThreadingPolicy will be configured to use only the calling thread for any further parallelizable operations. This usually improves performance by putting the parallelism where it is most useful: in the 'for' loop itself. However, if you do wish to parallelize operations invoked inside the 'for' loop, you must explicitly set the ThreadingPolicy inside the callback. The body of the 'for' loop is given an ITrackCalculationProgress instance that can be used to report detailed information about the progress of individual loop iterations. It is not recommended to use this overload when looping through a large number of iterations or when detailed information about the progress of individual iterations is not required, because there is some overhead to the detailed progress reporting. |