Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6209#discussion_r30467455
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala ---
    @@ -500,6 +503,55 @@ private[spark] object BLAS extends Serializable with 
Logging {
         nativeBLAS.dgemv(tStrA, mA, nA, alpha, A.values, mA, x.values, 1, beta,
           y.values, 1)
       }
    + 
    +  /**
    +   * y := alpha * A * x + beta * y
    +   * For `DenseMatrix` A and SparseVector x.
    +   */
    +  private def gemv(
    +      alpha: Double,
    +      A: DenseMatrix,
    +      x: SparseVector,
    +      beta: Double,
    +      y: DenseVector): Unit =  {
    +    val mA: Int = A.numRows
    +    val nA: Int = A.numCols
    +
    +    val Avals = A.values
    +    var colCounterForA = 0
    +
    +    var xIndices = x.indices
    +    var xNnz = xIndices.size
    +    var xValues = x.values
    +
    +    scal(beta, y)
    +
    +    if (!A.isTransposed) {
    --- End diff --
    
    `if (A.isTransposed)` and change the order of code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to