Open
Description
Store the broadcast style of the blocks in BlockSparseArrayStyle
. This would help with generic code, for example if a block sparse array has GPU blocks, BlockSparseArrayStyle
could keep track of that by storing the block style as the corresponding GPU array broadcasting style. Then, we can more accurately determine the destination type of a broadcast expression from all of the arguments that were input.
This is analogous to how ArrayLayouts.MemoryLayout
definitions for BlockArrays.jlBlockedArray
store information about the memory layout of the blocks: https://github.com/JuliaArrays/BlockArrays.jl/blob/v1.4.0/src/blocklinalg.jl#L82-L83
Currently, we determine the output type just based on the first argument:
which is not ideal and could make some mistakes (like making a destination with sparse blocks that should have dense blocks).