@@ -527,31 +527,31 @@ end
527527function accumarray (subs, val:: Number , sz= (maximum (subs),))
528528 A = zeros (eltype (val), sz... )
529529 @inbounds for i = 1 : numel (subs)
530- A[subs[i]] += val[i]
530+ A[subs[i]] += val
531531 end
532532 A
533533end
534534
535535# --------------------------------------------------------------------------------------------------
536536function tic ()
537- t0 = time_ns ()
538- task_local_storage (:TIMERS , (t0, get (task_local_storage (), :TIMERS , ())))
539- return t0
537+ t0 = time_ns ()
538+ task_local_storage (:TIMERS , (t0, get (task_local_storage (), :TIMERS , ())))
539+ return t0
540540end
541541
542542function _toq ()
543- t1 = time_ns ()
544- timers = get (task_local_storage (), :TIMERS , ())
545- (timers === ()) && error (" `toc()` without `tic()`" )
546- t0 = timers[1 ]:: UInt64
547- task_local_storage (:TIMERS , timers[2 ])
548- (t1- t0)/ 1e9
543+ _ = time_ns ()
544+ timers = get (task_local_storage (), :TIMERS , ())
545+ (timers === ()) && error (" `toc()` without `tic()`" )
546+ t0 = timers[1 ]:: UInt64
547+ task_local_storage (:TIMERS , timers[2 ])
548+ (t1- t0)/ 1e9
549549end
550550
551551function toc (V= true )
552- t = _toq ()
553- (V) && println (" elapsed time: " , t, " seconds" )
554- return t
552+ t = _toq ()
553+ (V) && println (" elapsed time: " , t, " seconds" )
554+ return t
555555end
556556
557557# --------------------------------------------------------------------------------------------------
0 commit comments