[petsc-dev] f2ea636de175: switched VecGetArray2/3 etc to be macros instead of functions

Jed Brown jed at 59A2.org
Thu Jun 10 09:41:19 CDT 2010


On Thu, 10 Jun 2010 09:30:52 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
>    Jed,
> 
>     Currently VecGetArray() is a macro, so these just follow that style.

Okay, but almost all macros avoid calling CHKERRQ in their body, and
certainly don't call CHKERRQ(ierr) which is a reference outside their
scope (they use a local __ierr).  Also, DAVecGetArray and VecGetArray?d
are real functions (which are admittedly less trivial).

>     In the general move to make everything static inline functions instead of macros we can change them. But I don't see the hurry to do it today.

Sure, but they were already implemented as inline functions, why revert
that "progress"?

Jed



More information about the petsc-dev mailing list