On Wed, Feb 8, 2012 at 01:12, Jack Poulson <[email protected]> wrote:
Yes, one could argue that PetscScalar can behave like a custom complex class, but with only a single instantiation choice through the preprocessor where each implementation was completely separate. If this type of logic was pulled into the language instead of lying at the preprocessor stage, then it would result in a custom complex class like I am arguing for. Either way std::complex is not being used for quads.
I think the typedefs are good enough for the 99%, but I was just teasing.
Any way, it sounds like the current approach will work just fine for PETSc, so I will shut up. The only other argument would be if someone wanted to compute using some exotic datatype like the Gaussian integers, but that would require a subset of the functionality of standard complex class that only assumed a ring instead of a field.
;-)