Yet Another eXchange Tool  DO_NOT_EDIT_HERE
Features of index sections

Table of Contents

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.

neg_size_idxsection_pppp.png
neg_size_idxsection_ppnp.png
neg_size_idxsection_pppn.png
neg_size_idxsection_ppnn.png
neg_size_idxsection_nppp.png
neg_size_idxsection_npnp.png
neg_size_idxsection_nppn.png
neg_size_idxsection_npnn.png
neg_size_idxsection_pnpp.png
neg_size_idxsection_pnnp.png
neg_size_idxsection_pnpn.png
neg_size_idxsection_pnnn.png
neg_size_idxsection_nnpp.png
neg_size_idxsection_nnnp.png
neg_size_idxsection_nnpn.png
neg_size_idxsection_nnnn.png

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

Xt_idxlist idxsection;
Xt_int start = 0;
int num_dimensions = 3;
Xt_int global_size[3] = {5,5,2};
int local_size [3] = {3,4,1};
Xt_int local_start[3] = {2,0,1};
// create index section
idxsection = xt_idxsection_new(start, num_dimensions, global_size,
local_size, local_start);
stride_idxsection_x.png

Custom stride in x and y

Xt_idxlist idxsection;
Xt_int start = 0;
int num_dimensions = 4;
Xt_int global_size[4] = {3,2,5,2};
int local_size [4] = {3,1,4,1};
Xt_int local_start[4] = {0,1,1,0};
// create index section
idxsection = xt_idxsection_new(start, num_dimensions, global_size,
local_size, local_start);
stride_idxsection_xy.png