aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-01-18 17:50:23 -0500
committerErik Schnetter <schnetter@gmail.com>2013-01-18 17:50:23 -0500
commit07f4d7cfc35892e8128a4d5f7db697d875ab730c (patch)
tree7bd2805be95341af45dec4aaaf8ca5ce68768bde /Carpet/CarpetLib
parent321818fb9dcefcb8775906e8af1b50aa52736277 (diff)
CarpetLib: Use C++ wrapper madd instead of mul and add
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_rf2.cc72
1 files changed, 36 insertions, 36 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_rf2.cc
index 8cb9c6f6d..93cbb52eb 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_rf2.cc
+++ b/Carpet/CarpetLib/src/prolongate_3d_rf2.cc
@@ -268,66 +268,66 @@ namespace CarpetLib {
switch (coeffs::ncoeffs / VP::size()) {
// Note that all case statements fall through
case 12:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 11:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 10:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 9:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 8:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 7:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 6:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 5:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 4:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 3:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
case 2:
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
i += VP::size();
}
#else
for (; i + VP::size() <= ptrdiff_t(coeffs::imax); i += VP::size()) {
- vres = VP::add(vres,
- VP::mul(VP::load(typ::fromreal(coeffs::get(i))),
- VP::loadu(interp0<T,ORDER> (p + i))));
+ vres = VP::madd(VP::load(typ::fromreal(coeffs::get(i))),
+ VP::loadu(interp0<T,ORDER> (p + i)),
+ vres);
}
#endif
for (int d=0; d<ptrdiff_t(VP::size()); ++d) {