On Sunday, 9 October 2016 at 05:34:06 UTC, Ilya Yaroshenko wrote:
On Sunday, 9 October 2016 at 05:21:32 UTC, Manu wrote:
On 9 October 2016 at 14:03, Nicholas Wilson via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
[...]

Well the trouble is the lambda that you might give to 'map' won't work anymore. Operators don't work on batches, you need to use a completely different API, and I think that's unfortunate.

Could you please give an example what type of operation should be vectorized?

anything that is able to be. Given that ElementType!InBatchesOfN are a static array of ElementType!(R), the compiler can* (assuming no branching and anything else that impedes vectorisation) combine most expressions into equivalent vector instruction. This approach might not work so well for colours as is but should work if we "transpose" the colour i.e. rgbargbargbargba -> rrrrggggbbbbaaaa and then transpose it back.

*I know this is the sufficiently intelligent compiler argument

Reply via email to