/* C */ struct sidl_double__array * sidl_double__array_ensure(const struct sidl_double__array *src, int32_t dimen, int ordering); // C++ void sidl::array<double>::ensure(int32_t dimen, int ordering); C FORTRAN 77 subroutine sidl_double__array_ensure_f(src, dimen, ordering, result) integer*8 src, result integer*4 dimen, ordering ! FORTRAN 90 subroutine ensure(src, dimen, ordering, result) type(sidl_double_1d), intent(in) :: src ! type depends on array dimension type(sidl_double_1d), intent(out) :: result! type depends on array dimension integer (selected_int_kind(9)) :: dimen, ordering
This method is used to obtain a matrix with a guaranteed ordering and dimension from an array with uncertain properties. If the incoming array has the required ordering and dimension, its reference count is incremented, and it is returned. If it doesn't, a copy with the correct ordering is created and returned. In either case, the caller knows that the returned matrix (if not NULL) has the desired properties.
This method is used internally to enforce the array ordering constraints in SIDL. Clients can use it in similar ways. However, because the method was intended as an internal Babel feature, is not available in Java or Python.
The ordering parameter should be one of the constants defined in
enum sidl_array_ordering (e.g.
sidl_general_order,
sidl_column_major_order, or sidl_row_major_order). If
you pass in
sidl_general_order, this routine will only check
the dimension of the matrix.