Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion base/linalg/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

module BLAS

import ..axpy!
import Base: copy!
import Base.LinAlg: axpy!, dot

export
# Level 1
asum,
axpy!,
blascopy!,
dot,
dotc,
dotu,
scal!,
Expand Down
1 change: 0 additions & 1 deletion base/linalg/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ include("exceptions.jl")
include("generic.jl")

include("blas.jl")
import .BLAS: gemv! # consider renaming gemv! in matmul
include("matmul.jl")
include("lapack.jl")

Expand Down
11 changes: 6 additions & 5 deletions test/linalg/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,15 @@ end
# issue #6450
@test dot(Any[1.0,2.0], Any[3.5,4.5]) === 12.5

for elty in (Float32,Float64,Complex64,Complex128)
x = convert(Vector{elty},[1.0,2.0,3.0])
y = convert(Vector{elty},[3.5,4.5,5.5])
@testset "dot" for elty in (Float32, Float64, Complex64, Complex128)
x = convert(Vector{elty},[1.0, 2.0, 3.0])
y = convert(Vector{elty},[3.5, 4.5, 5.5])
@test_throws DimensionMismatch dot(x, 1:2, y, 1:3)
@test_throws BoundsError dot(x, 1:4, y, 1:4)
@test_throws BoundsError dot(x, 1:3, y, 2:4)
@test dot(x,1:2,y,1:2) == convert(elty,12.5)
@test x.'*y == convert(elty,29.0)
@test dot(x, 1:2,y, 1:2) == convert(elty, 12.5)
@test x.'*y == convert(elty, 29.0)
@test_throws MethodError dot(rand(elty, 2, 2), randn(elty, 2, 2))
end

vecdot_(x,y) = invoke(vecdot, Tuple{Any,Any}, x,y) # generic vecdot
Expand Down