@@ -726,10 +726,6 @@ function generic_matmatmul(tA, tB, A::AbstractVecOrMat{T}, B::AbstractMatrix{S})
726
726
end
727
727
728
728
const tilebufsize = 10800 # Approximately 32k/3
729
- # per-thread arrays of buffers resized by __init__ if needed
730
- const Abuf = [Vector {UInt8} (undef, tilebufsize)]
731
- const Bbuf = [Vector {UInt8} (undef, tilebufsize)]
732
- const Cbuf = [Vector {UInt8} (undef, tilebufsize)]
733
729
734
730
function generic_matmatmul! (C:: AbstractMatrix , tA, tB, A:: AbstractMatrix , B:: AbstractMatrix ,
735
731
_add:: MulAddMul = MulAddMul ())
@@ -775,9 +771,8 @@ function _generic_matmatmul!(C::AbstractVecOrMat{R}, tA, tB, A::AbstractVecOrMat
775
771
@inbounds begin
776
772
if tile_size > 0
777
773
sz = (tile_size, tile_size)
778
- # FIXME : This code is completely invalid!!!
779
- Atile = unsafe_wrap (Array, convert (Ptr{T}, pointer (Abuf[Threads. threadid ()])), sz)
780
- Btile = unsafe_wrap (Array, convert (Ptr{S}, pointer (Bbuf[Threads. threadid ()])), sz)
774
+ Atile = Array {T} (undef, sz)
775
+ Btile = Array {S} (undef, sz)
781
776
782
777
z1 = zero (A[1 , 1 ]* B[1 , 1 ] + A[1 , 1 ]* B[1 , 1 ])
783
778
z = convert (promote_type (typeof (z1), R), z1)
@@ -797,8 +792,7 @@ function _generic_matmatmul!(C::AbstractVecOrMat{R}, tA, tB, A::AbstractVecOrMat
797
792
end
798
793
end
799
794
else
800
- # FIXME : This code is completely invalid!!!
801
- Ctile = unsafe_wrap (Array, convert (Ptr{R}, pointer (Cbuf[Threads. threadid ()])), sz)
795
+ Ctile = Array {R} (undef, sz)
802
796
for jb = 1 : tile_size: nB
803
797
jlim = min (jb+ tile_size- 1 ,nB)
804
798
jlen = jlim- jb+ 1
0 commit comments