Is there a syntax for array comprehensions of different array types, such as CuArray
? Maybe such a thing would diminish the need for pre-allocation and for
loops to begin with. Something like this, perhaps?
Type{CuArray{Int}}[i*j for i=1:2, j=1:2]
It’s not consistent with the ElType[...]
syntax we’re accustomed to, but StaticArrays already broke that expectation with SA[...]
. It’s nice that Type{...}
doesn’t provide any constructors, so it wouldn’t break anything.