MCPcopy Create free account
hub / github.com/Singular/Singular / vAdd

Function vAdd

Singular/svd_si.h:2402–2416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2400
2401 template<unsigned int Precision>
2402 void vAdd(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc)
2403 {
2404 ap::ap_error::make_assertion(vDst.GetLength()==vSrc.GetLength());
2405 int i, cnt = vDst.GetLength();
2406 ampf<Precision> *pDst = vDst.GetData();
2407 const ampf<Precision> *pSrc = vSrc.GetData();
2408 for(i=0; i<cnt; i++)
2409 {
2410 mpfr_ptr v = pDst->getWritePtr();
2411 mpfr_srcptr vs = pSrc->getReadPtr();
2412 mpfr_add(v, v, vs, GMP_RNDN);
2413 pDst += vDst.GetStep();
2414 pSrc += vSrc.GetStep();
2415 }
2416 }
2417
2418 template<unsigned int Precision, class T2>
2419 void vAdd(ap::raw_vector< ampf<Precision> > vDst, ap::const_raw_vector< ampf<Precision> > vSrc, T2 alpha)

Callers 1

vSubFunction · 0.70

Calls 5

GetLengthMethod · 0.45
GetDataMethod · 0.45
getWritePtrMethod · 0.45
getReadPtrMethod · 0.45
GetStepMethod · 0.45

Tested by

no test coverage detected