#1610: Switch Cactus to 64 bits --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
If you need an integer grid functions with a particular range, then you would be using CCTK_INT4 or CCTK_INT8. CCTK_INT is a "natural integer type", same as CCTK_REAL is a "natural floating-point type". If you run on a machine where ints have 64 bits, then CCTK_INT has 64 bits.
Using ptrdiff_t doesn't interoperate well with Fortran. We can introduce a new type for this -- CCTK_PTRDIFF_T or some equivalent name --and make this type available e.g. for aliased functions etc.
CCTK_INT is currently most used in aliased functions as well as in source code as an integer type e.g. for index variables and similar, and less for grid functions where a particular number of bits is expected. Thus introducing CCTK_PTRDIFF_T would require channging a lot of code, whereas the places where people use CCTK_INT in grid functions in a way that would break when CCTK_INT has 64 bits is very rare.