sundials icon indicating copy to clipboard operation
sundials copied to clipboard

API inconsistency: some SUNDIALS "Space" functions use `sunindextype` and some use `long int`

Open balos1 opened this issue 1 year ago • 5 comments

For example, we have

N_VSpace(N_Vector x, sunindextype *lenrw, sunindextype *leniw);
SUNMatSpace(SUNMatrix A, long  int *lenrw, long int *liniw);

balos1 avatar Feb 16 '24 22:02 balos1

This is sort of related to conversation in #409. We use long in many places where we should now switch to either long long or a fixed-width type like int64_t since we are now requiring C99. However, in this case I think we want to use sunindextype.

balos1 avatar Feb 16 '24 22:02 balos1

The use of sunindextype in N_VSpace was an erroneous change when sunindextype was added. It would be good to address in 7.0 (at least for consistency).

gardner48 avatar Feb 16 '24 22:02 gardner48

Looks like sunindextype is used for ARKodeButcherTable_Space too.

balos1 avatar Feb 17 '24 01:02 balos1

This was fixed in 7.0

balos1 avatar Mar 29 '24 21:03 balos1

Actually, I was mistaken, this was not fixed in 7.0.0

balos1 avatar Mar 29 '24 22:03 balos1