Skip to content

Commit

Permalink
Add mapreduce_cuda for DataF
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbozzolo committed Dec 5, 2023
1 parent 765e400 commit b6b84b7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Fields/mapreduce_cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ function LinearAlgebra.norm(
end
end

function mapreduce_cuda(
f,
op,
field::Field{V};
weighting = false,
opargs...,
) where {
S,
V <: DataLayouts.DataF{S},
}
data = Fields.field_values(field)
pdata = parent(data)
return DataLayouts.DataF{S}(Array(Array(f(pdata))[1, :]))
end

function mapreduce_cuda(
f,
op,
Expand Down

0 comments on commit b6b84b7

Please sign in to comment.