petsc-3.12.4 2020-02-04
Report Typos and Errors

# VecAXPBY

Computes y = alpha x + beta y.

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecAXPBY(Vec y,PetscScalar alpha,PetscScalar beta,Vec x)

Logically Collective on Vec

### Input Parameters

| alpha,beta | - the scalars
| x, y | - the vectors

### Output Parameter

y -output vector

### Notes

x and y MUST be different vectors The implementation is optimized for alpha and/or beta values of 0.0 and 1.0

### See Also

VecAYPX(), VecMAXPY(), VecWAXPY(), VecAXPY(), VecAXPBYPCZ()

### Level

intermediate

### Location

src/vec/vec/interface/rvector.c

### Implementations

VecAXPBY_Nest in src/vec/vec/impls/nest/vecnest.c
VecAXPBY_Node in src/vec/vec/impls/node/vecnode.c
VecAXPBY_Seq in src/vec/vec/impls/seq/bvec1.c
VecAXPBY_SeqCUDA in src/vec/vec/impls/seq/seqcuda/veccuda2.cu
VecAXPBY_SeqViennaCL in src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages