Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/6209#discussion_r30467395
--- 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)
--- End diff --
check if `beta == 0`
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]