[petsc-dev] sor smoothers
Barry Smith
bsmith at mcs.anl.gov
Sun Sep 8 16:04:49 CDT 2013
I actually like having the typedefs in these situations even if there is a portable alternative. It makes it clear what the purpose of the variable is, if everything is just labeled double, int or long int you don't know immediately what it represents. For example PetscErrorCode and PetscLogDouble (maybe a bad name) or PetscClassId. We started with int for PetscErrorCode and I found changing it really clarified the source code.
For these we could use PetscObjectState, PetscObjectId, or something else.
Barry
On Sep 8, 2013, at 3:57 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>
>> #if (PETSC_SIZEOF_LONG_LONG == 8)
>> typedef long long Petsc64bitInt;
>> #elif defined(PETSC_HAVE___INT64)
>> typedef __int64 Petsc64bitInt;
>> #else
>> typedef unknown64bit Petsc64bitInt
>> #endif
>>
>> I assume all machines support one or the other of these ?
>>
>> Should we introduce an unsigned version of this Petsc64bitUInt, for these type of things?
>
> Fewer typedefs would be nice if we can get away with it. Where is
> stdint.h NOT supported? AFAIK, it is only missing on quite old versions
> of MSVC, and there is a portable implementation that can be dropped in.
More information about the petsc-dev
mailing list