/// <summary> /// Applies a binary operation using the two operands. /// Assumes that the target array is allocated and shaped for broadcast. /// </summary> /// <typeparam name="Ta">The type of input data to operate on</typeparam> /// <typeparam name="Tb">The type of output data to operate on</typeparam> /// <typeparam name="C">The type of operation to perform</typeparam> /// <param name="op">The operation to use</param> /// <param name="in1">One input operand</param> /// <param name="in2">Another input operand</param> /// <param name="out">The target operand, must be allocated and shaped for broadcast</param> /// <returns>True if the operation was applied, false otherwise</returns> public static void ApplyBinaryConvOp <Ta, Tb, C>(C op, NdArray <Ta> in1, NdArray <Ta> in2, NdArray <Tb> @out) where C : struct, IBinaryConvOp <Ta, Tb> { foreach (var n in _handlers) { if (n.Item2.ApplyBinaryConvOp <Ta, Tb, C>(op, in1, in2, @out)) { return; } } //Fallback Threads.BinaryConvOp <Ta, Tb, C>(op, in1, in2, @out); }