Algebraic-Programming / ALP

Home of ALP/GraphBLAS and ALP/Pregel, featuring shared- and distributed-memory auto-parallelisation of linear algebraic and vertex-centric programs. Soon with more to come!
Apache License 2.0
24 stars 4 forks source link

clean dot product for complex numbers #311

Open djelovina opened 5 months ago

djelovina commented 5 months ago

It is possible that this issue gets resolved with #308 . All places where if( grb::utils::is_complex (in combination with eWiseLambda) pattern is used to perform dot product between two complex vectors, should be replaced with the single call to dot() with grb::operators::conjugate_right_mul (or grb::operators::conjugate_left_mul) passed explicitly. In this way the proper call is ensured for both complex and real numbers and unnecessary call to eWiseLambda will be avoided. Here is an example of use of grb::operators::conjugate_right_mul in dot product.