Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcasting Fields #55

Open
albert-de-montserrat opened this issue Oct 10, 2024 · 0 comments
Open

Broadcasting Fields #55

albert-de-montserrat opened this issue Oct 10, 2024 · 0 comments

Comments

@albert-de-montserrat
Copy link
Contributor

albert-de-montserrat commented Oct 10, 2024

Fields are compatible with broadcasting, but with the current behavior it returns an Array:

julia> N    = 16;
julia> arch = Arch(backend);
julia> grid = UniformGrid(arch; origin=(0, 0), extent=(1, 1), dims=(N,N));
julia> launch = Launcher(arch, grid);
julia> C = Field(backend, grid, Center())
2D 16×16 Field{Float64} located at (Center, Center)
julia> (C.*C) |> typeof
Matrix{Float64} (alias for Array{Float64, 2})

It would be nice if it returned a Field instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant