TaskUtils AssignWorkSegment Method NFX Class Library

[This is preliminary documentation and is subject to change.]

Returns the count of items in work segment along with the start index of the first item to be processed by a particular worker in the worker set

Namespace: NFX
Assembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
Syntax

public static int AssignWorkSegment(
	int totalItemCount,
	int totalWorkerCount,
	int thisWorkerIndex,
	out int startIndex
)

Parameters

totalItemCount
Type: OnlineSystem Int32
Total item count in the set processed by all workers
totalWorkerCount
Type: OnlineSystem Int32
Total number of workers int the set operating over the totalItemCount
thisWorkerIndex
Type: OnlineSystem Int32
The index of THIS worker in the whole worker set
startIndex
Type: OnlineSystem Int32 
Returns the index of the first item in the assigned segment

Return Value

Type: OnlineInt32
The count of items in the assigned segment
See Also