1 // Copyright ©2015 The Gonum Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
8 "gonum.org/v1/gonum/internal/asm/f64"
11 // Ddot computes the dot product of the two vectors
13 func (Implementation) Ddot(n int, x []float64, incX int, y []float64, incY int) float64 {
26 if incX == 1 && incY == 1 {
33 return f64.DotUnitary(x[:n], y)
42 if ix >= len(x) || ix+(n-1)*incX >= len(x) {
45 if iy >= len(y) || iy+(n-1)*incY >= len(y) {
48 return f64.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))