/// <summary> /// Retrieves information about the output values for the given processor. /// </summary> /// <param name="processorIndex">The 0-based index of the processor in this context.</param> /// <param name="outArgumentIndex">The 0-based index of the output argument for this processor.</param> /// <param name="outArgument">Out parameter to receive the <see cref="ProcessorArgument"/> for this output argument.</param> /// <param name="inArguments">Out parameter to receive the collection of input value <see cref="ProcessorArgument"/>s.</param> /// <returns>An array of offsets in the input value pool for each of the input values.</returns> public int[] GetOutputValueInfo(int processorIndex, int outArgumentIndex, out ProcessorArgument outArgument, out ProcessorArgument[] inArguments) { Debug.Assert(processorIndex >= 0 && processorIndex < this.ProcessorValueInfos.Length, "processorIndex out of bounds"); OutputValueInfo info = this.ProcessorValueInfos[processorIndex].OutputValueInfos[outArgumentIndex]; outArgument = info.OutArgument; inArguments = info.InArguments; return(info.InputValueIndices); }
private OutputValueInfo[] CreateOutputValueInfos(Processor processor) { int numberOfOutArgs = processor.OutArguments.Count; OutputValueInfo[] result = new OutputValueInfo[numberOfOutArgs]; for (int outArgIndex = 0; outArgIndex < numberOfOutArgs; ++outArgIndex) { ProcessorArgument outArg = processor.OutArguments[outArgIndex]; ProcessorArgument[] inArgs = this.Pipeline.GetBoundToArguments(processor.OutArguments[outArgIndex]).ToArray(); int[] inputValueIndices = new int[inArgs.Length]; for (int inArgIndex = 0; inArgIndex < inArgs.Length; ++inArgIndex) { int slotOffset = this.SlotOffSetOfInArgument(inArgs[inArgIndex]); inputValueIndices[inArgIndex] = slotOffset; } result[outArgIndex] = new OutputValueInfo(outArg, inputValueIndices, inArgs); } return result; }
private OutputValueInfo[] CreateOutputValueInfos(Processor processor) { int numberOfOutArgs = processor.OutArguments.Count; OutputValueInfo[] result = new OutputValueInfo[numberOfOutArgs]; for (int outArgIndex = 0; outArgIndex < numberOfOutArgs; ++outArgIndex) { ProcessorArgument outArg = processor.OutArguments[outArgIndex]; ProcessorArgument[] inArgs = this.Pipeline.GetBoundToArguments(processor.OutArguments[outArgIndex]).ToArray(); int[] inputValueIndices = new int[inArgs.Length]; for (int inArgIndex = 0; inArgIndex < inArgs.Length; ++inArgIndex) { int slotOffset = this.SlotOffSetOfInArgument(inArgs[inArgIndex]); inputValueIndices[inArgIndex] = slotOffset; } result[outArgIndex] = new OutputValueInfo(outArg, inputValueIndices, inArgs); } return(result); }