zhipeng93 commented on code in PR #90:
URL: https://github.com/apache/flink-ml/pull/90#discussion_r860652423


##########
flink-ml-core/src/main/java/org/apache/flink/ml/linalg/BLAS.java:
##########
@@ -34,10 +34,16 @@ public static double asum(DenseVector x) {
     /** y += a * x . */
     public static void axpy(double a, Vector x, DenseVector y) {
         Preconditions.checkArgument(x.size() == y.size(), "Vector size 
mismatched.");
+        axpy(a, x, y, x.size());
+    }
+
+    /** y += a * x for the first k dimensions, with the other dimensions 
unchanged. */
+    public static void axpy(double a, Vector x, DenseVector y, int k) {

Review Comment:
   Now it is used for computing loss and update model in `BinaryLogisticLoss`, 
`LeastSquareLoss` and `SGD`. It is used to avoid create a new double array 
instance to improve the performance.
   
   Let's see how others think. The plan B could be: we remove this method in 
`BLAS` and add an internal utility function.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to