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

Function N_VDotProd

externalpackages/PVODE/source/nvector.cpp:418–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416
417
418real N_VDotProd(N_Vector x, N_Vector y)
419{
420 integer loclen;
421 real sum = ZERO, *xd, *yd, gsum;
422 machEnvType machenv;
423
424 loclen = x->length;
425 xd = x->data;
426 yd = y->data;
427 machenv = x->machEnv;
428
429 #pragma omp parallel for reduction(+: sum)
430 for (integer i=0; i < loclen; i++)
431 sum += xd[i] * yd[i];
432
433 gsum = PVecAllReduce(sum, 1, machenv);
434 return(gsum);
435}
436
437
438real N_VMaxNorm(N_Vector x)

Callers 3

SpgmrSolveFunction · 0.85
ModifiedGSFunction · 0.85
ClassicalGSFunction · 0.85

Calls 1

PVecAllReduceFunction · 0.85

Tested by

no test coverage detected