Skip to content

Instantly share code, notes, and snippets.

@KirkWylie
Created October 10, 2011 16:18
Show Gist options
  • Save KirkWylie/1275719 to your computer and use it in GitHub Desktop.
Save KirkWylie/1275719 to your computer and use it in GitHub Desktop.
A naive implementation of DGEMV() in Java
public double[] method(double[][] A, double[] x, int m, int n) {
double[] y = new double[m];
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
y[i] += A[i][j] * x[j];
}
}
return y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment