refactored linalg's dot product
Merge pull request #2367 from khalednasr/feature/linalg

refactored linalg's dot product