Revert "Removed cuda_matrix_dot function"

This reverts commit 7f07ef2a3fa3fc5d667b783f80030c7a6b600f3d.
Revert "Removed cuda matrix dot declaration"

This reverts commit d0de1c648478ed618337346d0213629856ce2169.