Skip to content

Instantly share code, notes, and snippets.

@FrankNiemeyer
Created August 28, 2015 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FrankNiemeyer/4098009c9f198743152e to your computer and use it in GitHub Desktop.
Save FrankNiemeyer/4098009c9f198743152e to your computer and use it in GitHub Desktop.
void dot3_soa_scalar(const vector<float>& xs, const vector<float>& ys, const vector<float>& zs, vector<float>& dp) {
for (auto j = 0; j < reps; ++j) {
auto i = vector_len;
while(i--) {
dp[i] = xs[i] * xs[i] + ys[i] * ys[i] + zs[i] * zs[i];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment