On Mon, Sep 10, 2012 at 5:48 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> > On Sep 10, 2012, at 5:43 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote: > > > ScalarComplex was just a typo that I noticed shortly after sending. > > > > As for LogScalar versus ScalarLog, I can change it, but it's kind of > intrusive to users and > > What do you mean intrusive? How is PetscScalarLog any more intrusive > than PetscLogScalar? It is the same number of letters, same concepts; but > one is right and one is wrong. > I meant that the change would be intrusive because it would impact a lot of user code. > > and I'm not convinced it matters. > > What do you mean? Consistent use of notation doesn't matter? Why not > have KSPGMRESSetRestart() and KSPSetHaptolGMRES() and > CGSetUseComplexSymmetric() all in the same library? Why bother having > consistent notation anywhere? > This is static type dependence for something that is semantically the same operation. The KSPGMRESSetXXX style notation is used consistently for dynamically typed specialized operations. I would consider PetscLogScalar() to be more like KSPSolve_YYY(), but where we can't hide the suffix because of the type system. Note that if we could rely on C99, we could use tgmath.h (type-generic math) and wouldn't need the type suffixes any more. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130106/672c4587/attachment.html>
