Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Nov 5, 2024
1 parent f7b2ac2 commit cfbee75
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Fields/fieldvector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ end
parent(getfield(_values(fv), symb))
@inline transform_broadcasted(x, symb, axes) = x

# We pass `ToCPU` so that we can define unambiguous
# and recursion-friendly `copyto_per_field!` methods
# we don't use `ToCPU`, so its value doesn't matter.

@inline Base.copyto!(
dest::FieldVector,
bc::Union{FieldVector, Base.Broadcast.Broadcasted{FieldVectorStyle}},
Expand Down Expand Up @@ -350,7 +354,10 @@ for dev in (:ToCPU, :ToCUDA)
end
end

# Need
# We need multiple methods here to avoid ambiguities
# Also, we pass `ToCPU` so that we can define unambiguous
# and recursion-friendly `copyto_per_field_scalar!` methods
# we don't use `ToCPU`, so its value doesn't matter.

@inline Base.copyto!(
dest::FieldVector,
Expand Down

0 comments on commit cfbee75

Please sign in to comment.