Github user WeichenXu123 commented on the issue:

    https://github.com/apache/spark/pull/14156
  
    @srowen
    The := operator in BDM is simply copy one BDM to another, and it is widely 
used in breeze source, e.g, we can check DenseMatrix.copy function in Breeze:
    it first use `DenseMatrix.create` to create a new Matrix with the same 
dimension
    `val result = DenseMatrix.create(...)`
    , and them use
    `result := this` to copy self into the matrix just created.
    
    The mechanism of := operator for DenseMatrix is that the DenseMatrix 
implements the `OpSet` trait.
    check `DenseMatrix` source file in breeze, in line 985, there is:
    implicit val setMV_D:OpSet.InPlaceImpl2[...] = new SetDMDVOp[Double]()
    so, the implementation code is in `SetDMDVOp` class
    and we can see that in `SetDMDVOp` it do Type Specialization for Double 
type so that the compiling code will have high efficiency.


---
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