@@ -319,18 +319,19 @@ end
319
319
320
320
@inline function _transblockmul! (y, A:: BlockMap , x, α, β, transform)
321
321
maps, rows, xinds, yinds = A. maps, A. rows, A. rowranges, A. colranges
322
- mapind = 0
323
- # first block row (rowind = 1) of A, meaning first block column of A', fill all of y
324
322
@views @inbounds begin
325
- xcol = selectdim (x, 1 , xinds[ 1 ])
326
- for colind in 1 : rows[ 1 ]
327
- mapind += 1
328
- mul! (selectdim (y, 1 , yinds[mapind ]), transform (maps[mapind ]), xcol, α, β)
323
+ # first block row (rowind = 1) of A, meaning first block column of A', fill all of y
324
+ xcol = selectdim (x, 1 , first (xinds))
325
+ for rowind in 1 : first (rows)
326
+ mul! (selectdim (y, 1 , yinds[rowind ]), transform (maps[rowind ]), xcol, α, β)
329
327
end
330
- # subsequent block rows of A, add results to corresponding parts of y
328
+ mapind = first (rows)
329
+ # subsequent block rows of A (block columns of A'),
330
+ # add results to corresponding parts of y
331
+ # TODO : think about multithreading
331
332
for rowind in 2 : length (rows)
332
333
xcol = selectdim (x, 1 , xinds[rowind])
333
- for colind in 1 : rows[rowind]
334
+ for _ in 1 : rows[rowind]
334
335
mapind += 1
335
336
mul! (selectdim (y, 1 , yinds[mapind]), transform (maps[mapind]), xcol, α, true )
336
337
end
0 commit comments