Created
August 28, 2015 16:38
-
-
Save FrankNiemeyer/41d78f5220ddcb68e452 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Dot3SoaVectorized(float[] xs, float[] ys, float[] zs, float[] dp) { | |
for (var j = 0; j < reps; ++j) { | |
for (var i = 0; i < dp.Length; i += laneWidth) { | |
var x = new Vector<float>(xs, i); | |
var y = new Vector<float>(ys, i); | |
var z = new Vector<float>(zs, i); | |
var d = x * x + y * y + z * z; | |
d.CopyTo(dp, i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment