[Developers] what datatype to use in inter-language APIs (was: Re: [Patches] more efficient synchronisation of groups)
goodale at cct.lsu.edu
Tue Jul 4 04:42:21 CDT 2006
On Mon, 3 Jul 2006, Erik Schnetter wrote:
> Given the current ambiguities with some functions using int, others using
> CCTK_INT, I don't know what is best. I seem to be advocating using int
> instead of CCTK_INT, but I really only want to point out some of the
> problems. I don't know what the best solution would be.
The best solution is to use CCTK_INT. We've gotten away with being lazy
in the past because not many Fortran thorns use flesh functions beyond the
interpolation and reduction APIs which do take CCTK_INTs. This is the
main reason why the aliased functions use CCTK_INT rather than plain ints.
As far as current and forward planning are concerned, let's make sure that
whenever we put something new in that it uses CCTK datatypes. I like
Thomas' idea to use plain ints for scalars (once we have size detection
and type equivalents), but as Erik points out it can lead to confusion if
the user stores the data in a CCTK_INT array.
So for the specific issue on the table, the revised CCTK_SyncGroupI should
take an array of CCTK_INTs.
More information about the Developers