1 #include<DD-AVX_internal.hpp>
3 using namespace ddavx_core;
11 if(size() != vec1.
size() || size() != vec2.
size()){
12 std::cerr <<
"error bad vector size" << std::endl;
17 #pragma omp parallel private(regs)
20 get_isie(size(), is, ie);
21 for(i = is; i < (ie-SIMD_Length+1); i += SIMD_Length){
22 reg a_hi = load(hi[i]);
23 reg a_lo = load(lo[i]);
25 reg b_hi = load(vec1.
hi[i]);
26 reg b_lo = load(vec1.
lo[i]);
28 reg c_hi = load(vec2.
hi[i]);
29 reg c_lo = load(vec2.
lo[i]);
31 Mul(a_hi, a_lo, b_hi, b_lo, c_hi, c_lo, regs);
37 Mul(hi[i], lo[i], vec1.
hi[i], vec1.
lo[i], vec2.
hi[i], vec2.
lo[i]);
44 if(size() != vec1.
size() || size() != vec2.size()){
45 std::cerr <<
"error bad vector size" << std::endl;
50 #pragma omp parallel private(regs)
53 get_isie(size(), is, ie);
54 for(i = is; i < (ie-SIMD_Length+1); i += SIMD_Length){
55 reg a_hi = load(hi[i]);
56 reg a_lo = load(lo[i]);
58 reg b_hi = load(vec1.
hi[i]);
59 reg b_lo = load(vec1.
lo[i]);
61 reg c_hi = load(vec2.data()[i]);
63 Muld(a_hi, a_lo, b_hi, b_lo, c_hi, regs);
69 Muld(hi[i], lo[i], vec1.
hi[i], vec1.
lo[i], vec2.data()[i]);
82 if(size() != vec1.size() || size() != vec2.size()){
83 std::cerr <<
"error bad vector size" << std::endl;
88 #pragma omp parallel private(regs)
91 get_isie(size(), is, ie);
92 for(i = is; i < (ie-SIMD_Length+1); i += SIMD_Length){
93 reg a_hi = load(hi[i]);
94 reg a_lo = load(lo[i]);
96 reg b_hi = load(vec1.data()[i]);
97 reg b_lo = regs.zeros;
99 reg c_hi = load(vec2.data()[i]);
100 reg c_lo = regs.zeros;
102 Mul(a_hi, a_lo, b_hi, b_lo, c_hi, c_lo, regs);
108 Mul(hi[i], lo[i], vec1.data()[i], 0.0, vec2.data()[i], 0.0);
Double precision vector class, This class is almost same as std::vector<double>
Double-double precision vector class.
dd_real_vector operator*(dd_real_vector &vec)
all elemetnt arithmetic function
void mul(dd_real_vector &vec1, dd_real_vector &vec2)
all elemetnt arithmetic function
dd_real_vector operator*=(dd_real_vector &vec)
all elemetnt arithmetic function