Negative global and local sizes
Using negative sizes inverts the order of indices in the respective dimension. The following example illustrate this. The code for the examples can be found in idxsection_examples.c.
Custom strides
With some limitations you can define index sections with custom strides. This is achieved by introducing additional dimensions (see following examples).
Custom stride in x
enum { num_dimensions = 3 };
static const Xt_int global_size[3] = {5,5,2};
static const int local_size [3] = {3,4,1};
static const Xt_int local_start[3] = {2,0,1};
local_size, local_start);
Xt_idxlist xt_idxsection_new(Xt_int start, int num_dimensions, const Xt_int global_size[num_dimensions], const int local_size[num_dimensions], const Xt_int local_start[num_dimensions])
Custom stride in x and y
enum { num_dimensions = 4 };
static const Xt_int global_size[4] = {3,2,5,2};
static const int local_size [4] = {3,1,4,1};
static const Xt_int local_start[4] = {0,1,1,0};
local_size, local_start);