Skip to content

Commit bdf91b7

Browse files
committed
Redirect to base broadcast for DefaultArrayStyle{0}, fixes #319
1 parent 38cf5a1 commit bdf91b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.12.64"
4+
version = "0.12.65"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/broadcast.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ end
408408
storeop = add_simple_store!(ls, :destination, ArrayReference(:dest, loopsyms), elementbytes)
409409
doaddref!(ls, storeop)
410410
resize!(ls.loop_order, num_loops(ls)) # num_loops may be greater than N, eg Product
411+
# return ls
411412
sc = setup_call(ls, :(Base.Broadcast.materialize!(dest, bc)), LineNumberNode(0), inline, false, u₁, u₂, v, threads%Int, warncheckarg)
412413
Expr(:block, Expr(:meta,:inline), sc, :dest)
413-
# setup_call_debug(ls)
414414
end
415415
@generated function vmaterialize!(
416416
dest′::Union{Adjoint{T,A},Transpose{T,A}}, bc::BC, ::Val{Mod}, ::Val{UNROLL}
@@ -460,6 +460,9 @@ end
460460
end
461461
end
462462

463+
@inline function vmaterialize(bc::Broadcasted{Base.Broadcast.DefaultArrayStyle{0}}, ::Val{Mod}, ::Val{UNROLL}) where {Mod,UNROLL}
464+
Base.materialize(bc)
465+
end
463466
@inline function vmaterialize(
464467
bc::Broadcasted, ::Val{Mod}, ::Val{UNROLL}
465468
) where {Mod,UNROLL}

0 commit comments

Comments
 (0)