PixelMagic.SimdExtras.Dp2Add C# (CSharp) Method

Dp2Add() public static method

public static Dp2Add ( Mono.Simd.Vector4f a, Mono.Simd.Vector4f b, Mono.Simd.Vector4f c ) : Mono.Simd.Vector4f
a Mono.Simd.Vector4f
b Mono.Simd.Vector4f
c Mono.Simd.Vector4f
return Mono.Simd.Vector4f
        public static Vector4f Dp2Add(Vector4f a, Vector4f b, Vector4f c)
        {
            Vector4f res = a * b;
            //XX we could use HorizontalAdd here
            res = res + res.Shuffle (ShuffleSel.XFromY) + c;
            return res.Shuffle (ShuffleSel.ExpandX);
        }