Skip to content

Instantly share code, notes, and snippets.

@tkfx
Last active July 21, 2016 15:36
Show Gist options
  • Save tkfx/0b9b3f0a42af867075d6471362b4f61c to your computer and use it in GitHub Desktop.
Save tkfx/0b9b3f0a42af867075d6471362b4f61c to your computer and use it in GitHub Desktop.
private static double[] loopUnrolling(double[][] matrix1, double[] vector1) {
double[] result = new double[vector1.length];
for (int i = 0; i < matrix1.length; i++) {
for (int j = 0; j < vector1.length; j++) {
result[i] += matrix1[i][j] * vector1[j];
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment