408
408
storeop = add_simple_store! (ls, :destination , ArrayReference (:dest , loopsyms), elementbytes)
409
409
doaddref! (ls, storeop)
410
410
resize! (ls. loop_order, num_loops (ls)) # num_loops may be greater than N, eg Product
411
- # return ls
412
411
sc = setup_call (ls, :(Base. Broadcast. materialize! (dest, bc)), LineNumberNode (0 ), inline, false , u₁, u₂, v, threads% Int, warncheckarg)
413
- # return sc
414
412
Expr (:block , Expr (:meta ,:inline ), sc, :dest )
413
+ # setup_call_debug(ls)
415
414
end
416
415
@generated function vmaterialize! (
417
416
dest′:: Union{Adjoint{T,A},Transpose{T,A}} , bc:: BC , :: Val{Mod} , :: Val{UNROLL}
@@ -434,31 +433,31 @@ end
434
433
end
435
434
# these are marked `@inline` so the `@turbo` itself can choose whether or not to inline.
436
435
@generated function vmaterialize! (
437
- dest:: AbstractArray{T,N} , bc:: Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(identity),Tuple{T2}} , :: Val{Mod} , :: Val{UNROLL}
438
- ) where {T <: NativeTypes , N, T2 <: Number , Mod, UNROLL}
436
+ dest:: AbstractArray{T,N} , bc:: Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(identity),Tuple{T2}} , :: Val{Mod} , :: Val{UNROLL}
437
+ ) where {T <: NativeTypes , N, T2 <: Number , Mod, UNROLL}
439
438
inline, u₁, u₂, v, isbroadcast, W, rs, rc, cls, l1, l2, l3, threads = UNROLL
440
- quote
441
- $ (Expr (:meta ,:inline ))
442
- arg = T (first (bc. args))
443
- @turbo inline= $ inline unroll= ($ u₁,$ u₂) thread= $ threads vectorize= $ v for i ∈ eachindex (dest)
444
- dest[i] = arg
445
- end
446
- dest
439
+ quote
440
+ $ (Expr (:meta ,:inline ))
441
+ arg = T (first (bc. args))
442
+ @turbo inline= $ inline unroll= ($ u₁,$ u₂) thread= $ threads vectorize= $ v for i ∈ eachindex (dest)
443
+ dest[i] = arg
447
444
end
445
+ dest
446
+ end
448
447
end
449
448
@generated function vmaterialize! (
450
- dest′:: Union{Adjoint{T,A},Transpose{T,A}} , bc:: Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(identity),Tuple{T2}} , :: Val{Mod} , :: Val{UNROLL}
451
- ) where {T <: NativeTypes , N, A <: AbstractArray{T,N} , T2 <: Number , Mod, UNROLL}
452
- inline, u₁, u₂, v, isbroadcast, W, rs, rc, cls, l1, l2, l3, threads = UNROLL
453
- quote
454
- $ (Expr (:meta ,:inline ))
455
- arg = T (first (bc. args))
456
- dest = parent (dest′)
457
- @turbo inline= $ inline unroll= ($ u₁,$ u₂) thread= $ threads vectorize= $ v for i ∈ eachindex (dest)
458
- dest[i] = arg
459
- end
460
- dest′
449
+ dest′:: Union{Adjoint{T,A},Transpose{T,A}} , bc:: Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(identity),Tuple{T2}} , :: Val{Mod} , :: Val{UNROLL}
450
+ ) where {T <: NativeTypes , N, A <: AbstractArray{T,N} , T2 <: Number , Mod, UNROLL}
451
+ inline, u₁, u₂, v, isbroadcast, W, rs, rc, cls, l1, l2, l3, threads = UNROLL
452
+ quote
453
+ $ (Expr (:meta ,:inline ))
454
+ arg = T (first (bc. args))
455
+ dest = parent (dest′)
456
+ @turbo inline= $ inline unroll= ($ u₁,$ u₂) thread= $ threads vectorize= $ v for i ∈ eachindex (dest)
457
+ dest[i] = arg
461
458
end
459
+ dest′
460
+ end
462
461
end
463
462
464
463
@inline function vmaterialize (
0 commit comments