Skip to content

Commit a71016b

Browse files
committed
Fix matmul
1 parent cf15e34 commit a71016b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/matmul.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,11 @@ function __mul(A::AbstractMatrix{Interval{T}}, B::AbstractVecOrMat{Interval{T}})
453453
U = mA; U .= _add_round.(abs.(mA), rA, RoundUp)
454454
V = mB; V .= _add_round.(abs.(mB), rB, RoundUp)
455455

456-
rC = _call_gem_openblas_upward!(cache_1, U, V)
457-
rC .+= .- μ .+ 2 .* γ
456+
cache_3 = zeros(T, size(A, 1), size(B, 2))
457+
rC = _call_gem_openblas_upward!(cache_3, U, V)
458+
rC .= _add_round.(_sub_round.(rC, μ, RoundUp), 2 .* γ, RoundUp)
458459

459-
return mC, rC
460+
return @show mC, rC
460461
end
461462

462463
function _vec_or_mat_midradius(A::AbstractVecOrMat{Interval{T}}) where {T<:AbstractFloat}
@@ -536,16 +537,15 @@ function _call_gem_openblas_upward!(C, A::AbstractMatrix{Float64}, B::AbstractMa
536537
end
537538

538539
function _call_gem_openblas_upward!(C, A::AbstractMatrix{Float64}, B::AbstractVector{Float64})
539-
prev_rounding = _getrounding() # save current rounding mode
540-
_setrounding(JL_FE_UPWARD) # set rounding mode to upward
541-
542540
m, k = size(A)
543541

544542
α = 1.0
545543
β = 0.0
546544

547545
transA = 'N'
548546

547+
prev_rounding = _getrounding() # save current rounding mode
548+
_setrounding(JL_FE_UPWARD) # set rounding mode to upward
549549
try
550550
ccall((:dgemv_64_, OpenBLASConsistentFPCSR_jll.libopenblas), Cvoid,
551551
(Ref{UInt8}, Ref{LinearAlgebra.BLAS.BlasInt}, Ref{LinearAlgebra.BLAS.BlasInt},

0 commit comments

Comments
 (0)