We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1cb12e commit c580ee2Copy full SHA for c580ee2
src/indexing.jl
@@ -23,9 +23,12 @@ end
23
24
function Base.findall(bools::WrappedMtlArray{Bool})
25
I = keytype(bools)
26
- indices = cumsum(reshape(bools, prod(size(bools))))
+ boolslen = prod(size(bools))
27
28
- n = @allowscalar indices[end]
+ indices = MtlVector{Int64, Metal.SharedStorage}(undef, boolslen)
29
+ cumsum!(indices, reshape(bools, boolslen))
30
+
31
+ n = indices[end]
32
ys = similar(bools, I, n)
33
34
if n > 0
0 commit comments