jipolanco / PencilArrays.jl

Distributed Julia arrays using the MPI protocol
https://jipolanco.github.io/PencilArrays.jl/dev/
MIT License
60 stars 8 forks source link

Improve broadcasting on GPU arrays #43

Closed jipolanco closed 2 years ago

jipolanco commented 2 years ago

We make sure that broadcasting with GPU arrays avoids scalar indexing.

This also changes a bit the logic when broadcasting PencilArrays and other types of arrays, such that PencilArrays always broadcast in contiguous memory order. In other words, when broadcasting, the size of a PencilArray is the one given by size_local(::PencilArray, MemoryOrder()). This is only relevant when one is working with index permutations, and when one is combining PencilArrays and other kinds of arrays (such as base Arrays) in a single broadcast.

Closes #42.