private void LoadSubJobs(MqMessages.SizeInt blockExtent, BlockingCollection <PointInt> subJobQ) { for (int j = 0; j < blockExtent.H; j++) { for (int i = 0; i < blockExtent.W; i++) { subJobQ.Add(new PointInt(i, j)); } } }
public FJobRequest(int jobId, string name, FJobRequestType requestType, Coords coords, RectangleInt area, SizeInt samplePoints, uint maxIterations, TransformType?transformType = null) { JobId = jobId; Name = name; Coords = coords; Area = area; SamplePoints = samplePoints; MaxIterations = maxIterations; RequestType = requestType; TransformType = transformType; }
public FJobResult GetResultFromSubJob(bool isFinalResult) { PointInt resultPos = new PointInt(Position.X * FGenerator.BLOCK_WIDTH, Position.Y * FGenerator.BLOCK_HEIGHT); MqMessages.SizeInt resultSize = new MqMessages.SizeInt(FGenerator.BLOCK_WIDTH, FGenerator.BLOCK_HEIGHT); MqMessages.RectangleInt area = new MqMessages.RectangleInt(resultPos, resultSize); FJobResult fJobResult = new FJobResult(ParentJob.JobId, area, SubJobResult.Counts, isFinalResult); return(fJobResult); }
private FJobResult GetResultFromSubJob(int jobId, PointInt position, SubJobResult subJobResult) { MqMessages.PointInt resultPos = new MqMessages.PointInt( position.X() * FGenerator.BLOCK_WIDTH, position.Y() * FGenerator.BLOCK_HEIGHT ); MqMessages.SizeInt resultSize = new MqMessages.SizeInt(FGenerator.BLOCK_WIDTH, FGenerator.BLOCK_HEIGHT); MqMessages.RectangleInt area = new MqMessages.RectangleInt(resultPos, resultSize); FJobResult fJobResult = new FJobResult(jobId, area, subJobResult.Counts); return(fJobResult); }
public RectangleInt(PointInt point, SizeInt size) { Point = point; Size = size; }