MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / Vaxpy

Function Vaxpy

externalpackages/PVODE/source/nvector.cpp:814–840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812}
813
814static void Vaxpy(real a, N_Vector x, N_Vector y)
815{
816 integer N;
817 real *xd, *yd;
818
819 N = x->length;
820 xd = x->data;
821 yd = y->data;
822
823 if (a == ONE) {
824 #pragma omp parallel for
825 for (integer i=0; i < N; i++)
826 yd[i] += xd[i];
827 return;
828 }
829
830 if (a == -ONE) {
831 #pragma omp parallel for
832 for (integer i=0; i < N; i++)
833 yd[i] -= xd[i];
834 return;
835 }
836
837 #pragma omp parallel for
838 for (integer i=0; i < N; i++)
839 yd[i] += a * xd[i];
840}
841
842static void VScaleBy(real a, N_Vector x)
843{

Callers 1

N_VLinearSumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected