# PetscPolymorphicScalar

allows defining a C++ polymorphic version of a PETSc function that replaces a PetscScalar * argument with a PetscScalar argument Not collective

### Synopsis

    PetscPolymorphicScalar(Functionname,(arguments of C++ function),(arguments of C function))

### Example

PetscPolymorphicScalar(VecAXPY,(PetscScalar _val,Vec x,Vec y),(&_Val,x,y)) generates the new routine PetscErrorCode VecAXPY(PetscScalar _val,Vec x,Vec y) = {PetscScalar _Val = _val; return VecAXPY(&_Val,x,y);}

### See Also

PetscPolymorphicFunction(),PetscPolymorphicSubroutine()

Level:developer
Location: include/petsc.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages