general interface to dot_product that aliases ddot and zdotc for certain cases
cherry pick 58963f5827986561597446d10dd431e8b3891088
quick fix