Using sub-arrays in the scanByKey function results in undefined behaviour in the opencl backend.
The offsets were not taken into account in the opencl code.
28bd6b0 : adds the the function toTempFormat to the test helpers. This function generates the different temporary array formats (JIT array, SUB-array, Linear array, ...) used by arrayfire.
986a0da : Adds the offset to the cl code files & adds extra tests for scan.
Is this a new feature or a bug fix?
BUG
Why these changes are necessary.
PREVIOUSLY THE RESULT IS UNDEFINED FOR ABOVE SITUATION
Potential impact on specific hardware, software or backends.
OPENCL only
New functions and their functionality.
NO
Can this PR be backported to older versions?
YES, changes are very local
Future changes not implemented in this PR.
NONE, although the function toTempFormat will be used in following PRs.