-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
In GPUArrays, this is implemented with broadcasting. This will probably require a breaking release since the backend
argument will no longer be able to be the last argument.
julia> import AcceleratedKernels as AK; a = ones(5); b = ones(5);
julia> mapreduce(+,+,a,b)
10.0
julia> AK.mapreduce(+,+,a,b; init=0)
ERROR: MethodError: no method matching mapreduce(::typeof(+), ::typeof(+), ::Vector{Float64}, ::Vector{Float64}; init::Int64)
You may have intended to import Base.mapreduce
The function `mapreduce` exists, but no method is defined for this combination of argument types.
Closest candidates are:
mapreduce(::Any, ::Any, ::AbstractArray, ::KernelAbstractions.Backend; init, kwargs...)
@ AcceleratedKernels ~/.julia/packages/AcceleratedKernels/xxjhi/src/reduce/reduce.jl:156
mapreduce(::Any, ::Any, ::AbstractArray; ...)
@ AcceleratedKernels ~/.julia/packages/AcceleratedKernels/xxjhi/src/reduce/reduce.jl:156
Stacktrace:
[1] top-level scope
@ REPL[10]:1
[2] top-level scope
@ ~/.julia/dev/Metal/src/initialization.jl:80
end
Metadata
Metadata
Assignees
Labels
No labels