Skip to content

Commit

Permalink
Fixed gemv BUG and clear code.
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeiteng committed Sep 16, 2014
1 parent ad2c8a8 commit fd604cf
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/main/java/org/jblas/SimpleBlas.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static DoubleMatrix gemv(double alpha, DoubleMatrix a,
y.data[i] += a.get(i, j) * xj;
}
}
} else {// mayebe we can rm if else?
} else {// mayebe we can remove if else?
for (int i = 0; i < y.length; i++)
y.data[i] = beta * y.data[i];

Expand All @@ -206,12 +206,6 @@ public static DoubleMatrix gemv(double alpha, DoubleMatrix a,
y.data[i] += alpha * a.get(i, j) * xj;
}
}
// for (int j = 0; j < a.columns; j++) {
// double byj = beta * y.data[j];
// double xj = x.get(j);
// for (int i = 0; i < a.rows; i++)
// y.data[j] = a.get(i, j) * xj + byj;
// }
}
}
return y;
Expand Down Expand Up @@ -631,7 +625,7 @@ public static FloatMatrix gemv(float alpha, FloatMatrix a,
y.data[i] += a.get(i, j) * xj;
}
}
} else {// mayebe we can rm if else?
} else {// mayebe we can remove if else?
for (int i = 0; i < y.length; i++)
y.data[i] = beta * y.data[i];

Expand All @@ -642,13 +636,6 @@ public static FloatMatrix gemv(float alpha, FloatMatrix a,
y.data[i] += alpha * a.get(i, j) * xj;
}
}
// for (int j = 0; j < a.columns; j++) {
// double byj = beta * y.data[j];
// double xj = x.get(j);
// for (int i = 0; i < a.rows; i++)
// y.data[j] = a.get(i, j) * xj + byj;
// }

}
}
return y;
Expand Down

0 comments on commit fd604cf

Please sign in to comment.