If even the macro interface is not fast enough for you, you can access the internal data structure for all the basic types except string. You cannot access the internal data structure for arrays of strings, interfaces and objects.
The basic form of the C data structure for type XXXX is:
struct sidl_XXXX__array { <value type for XXXX> *d_firstElement; int32_t *d_lower; int32_t *d_upper; int32_t *d_stride; int32_t d_dimen; sidl_bool d_borrowed; };
The string ``value type for XXXX
'' should be replaced by something like
sidl_boolfor an array of bool,
int32_t for any array of int,
double for an array of double,
int64_t for an array of long, etc. (See Table 5.2)
Clients should not modify d_lower, d_upper, d_stride, d_dimen, d_borrowed or (in the case of pointers) the values to which they point.
The data structure was inspired by the data structure used by Numeric Python; although, in Numeric Python, the stride is in terms of bytes. In SIDL, the stride is in terms of number of objects. One can convert to the Numeric Python view of things by multiplying the stride by the sizeof the value type.