Modifier

Partager via


ParallelHelper.For Method

Definition

Overloads

For<TAction>(Range)

Executes a specified action in an optimized parallel loop.

For<TAction>(Int32, Int32)

Executes a specified action in an optimized parallel loop.

For<TAction>(Range, Int32)

Executes a specified action in an optimized parallel loop.

For<TAction>(Range, TAction)

Executes a specified action in an optimized parallel loop.

For<TAction>(Int32, Int32, Int32)

Executes a specified action in an optimized parallel loop.

For<TAction>(Int32, Int32, TAction)

Executes a specified action in an optimized parallel loop.

For<TAction>(Range, TAction, Int32)

Executes a specified action in an optimized parallel loop.

For<TAction>(Int32, Int32, TAction, Int32)

Executes a specified action in an optimized parallel loop.

For<TAction>(Range)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (Range range) where TAction : struct;
static member For : Range -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (range As Range)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

range
Range

The iteration range.

Remarks

None of the bounds of range can start from an end.

Applies to

For<TAction>(Int32, Int32)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (int start, int end) where TAction : struct;
static member For : int * int -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (start As Integer, end As Integer)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

start
Int32

The starting iteration index.

end
Int32

The final iteration index (exclusive).

Applies to

For<TAction>(Range, Int32)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (Range range, int minimumActionsPerThread) where TAction : struct;
static member For : Range * int -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (range As Range, minimumActionsPerThread As Integer)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

range
Range

The iteration range.

minimumActionsPerThread
Int32

The minimum number of actions to run per individual thread. Set to 1 if all invocations should be parallelized, or to a greater number if each individual invocation is fast enough that it is more efficient to set a lower bound per each running thread.

Remarks

None of the bounds of range can start from an end.

Applies to

For<TAction>(Range, TAction)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (Range range, in TAction action) where TAction : struct;
static member For : Range * 'Action -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (range As Range, ByRef action As TAction)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

range
Range

The iteration range.

action
TAction

The TAction instance representing the action to invoke.

Remarks

None of the bounds of range can start from an end.

Applies to

For<TAction>(Int32, Int32, Int32)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (int start, int end, int minimumActionsPerThread) where TAction : struct;
static member For : int * int * int -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (start As Integer, end As Integer, minimumActionsPerThread As Integer)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

start
Int32

The starting iteration index.

end
Int32

The final iteration index (exclusive).

minimumActionsPerThread
Int32

The minimum number of actions to run per individual thread. Set to 1 if all invocations should be parallelized, or to a greater number if each individual invocation is fast enough that it is more efficient to set a lower bound per each running thread.

Applies to

For<TAction>(Int32, Int32, TAction)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (int start, int end, in TAction action) where TAction : struct;
static member For : int * int * 'Action -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (start As Integer, end As Integer, ByRef action As TAction)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

start
Int32

The starting iteration index.

end
Int32

The final iteration index (exclusive).

action
TAction

The TAction instance representing the action to invoke.

Applies to

For<TAction>(Range, TAction, Int32)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (Range range, in TAction action, int minimumActionsPerThread) where TAction : struct;
static member For : Range * 'Action * int -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (range As Range, ByRef action As TAction, minimumActionsPerThread As Integer)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

range
Range

The iteration range.

action
TAction

The TAction instance representing the action to invoke.

minimumActionsPerThread
Int32

The minimum number of actions to run per individual thread. Set to 1 if all invocations should be parallelized, or to a greater number if each individual invocation is fast enough that it is more efficient to set a lower bound per each running thread.

Remarks

None of the bounds of range can start from an end.

Applies to

For<TAction>(Int32, Int32, TAction, Int32)

Executes a specified action in an optimized parallel loop.

public static void For<TAction> (int start, int end, in TAction action, int minimumActionsPerThread) where TAction : struct;
static member For : int * int * 'Action * int -> unit (requires 'Action : struct)
Public Shared Sub For(Of TAction As Structure) (start As Integer, end As Integer, ByRef action As TAction, minimumActionsPerThread As Integer)

Type Parameters

TAction

The type of action (implementing IAction) to invoke for each iteration index.

Parameters

start
Int32

The starting iteration index.

end
Int32

The final iteration index (exclusive).

action
TAction

The TAction instance representing the action to invoke.

minimumActionsPerThread
Int32

The minimum number of actions to run per individual thread. Set to 1 if all invocations should be parallelized, or to a greater number if each individual invocation is fast enough that it is more efficient to set a lower bound per each running thread.

Applies to