dot product (GPU+CPU)

basic dot product for #1973