DD-AVX  2.0.0
dd_real_vector_ref.cpp
Go to the documentation of this file.
1 #include<DD-AVX_internal.hpp>
2 
3 //Add
4 dd_real operator+(const dd_real a, const dd_real_vector_ref b){
5  dd_real tmp = b;
6  dd_real c = a + tmp;
7  return c;
8 }
9 
10 dd_real operator+(const double a, const dd_real_vector_ref b){
11  dd_real tmp = b;
12  dd_real c = a + tmp;
13  return c;
14 }
15 
16 //Sub
17 dd_real operator-(const dd_real a, const dd_real_vector_ref b){
18  dd_real tmp = b;
19  dd_real c = a - tmp;
20  return c;
21 }
22 
23 dd_real operator-(const double a, const dd_real_vector_ref b){
24  dd_real tmp = b;
25  dd_real c = a - tmp;
26  return c;
27 }
28 
29 //Mul
30 dd_real operator*(const dd_real a, const dd_real_vector_ref b){
31  dd_real tmp = b;
32  dd_real c = a * tmp;
33  return c;
34 }
35 
36 dd_real operator*(const double a, const dd_real_vector_ref b){
37  dd_real tmp = b;
38  dd_real c = a * tmp;
39  return c;
40 }
41 
42 //Div
43 dd_real operator/(const dd_real a, const dd_real_vector_ref b){
44  dd_real tmp = b;
45  dd_real c = a / tmp;
46  return c;
47 }
48 
49 dd_real operator/(const double a, const dd_real_vector_ref b){
50  dd_real tmp = b;
51  dd_real c = a / tmp;
52  return c;
53 }
54 
55 //Add
56 dd_real dd_real_vector_ref::operator+(const dd_real a){
57  dd_real tmp;
58  tmp.x[0] = *dd_hi_iter;
59  tmp.x[1] = *dd_lo_iter;
60  tmp = tmp + a;
61  return tmp;
62 }
63 
65  dd_real tmp1;
66  tmp1.x[0] = *dd_hi_iter;
67  tmp1.x[1] = *dd_lo_iter;
68 
69  dd_real tmp2;
70  tmp2.x[0] = *a.dd_hi_iter;
71  tmp2.x[1] = *a.dd_lo_iter;
72 
73  tmp1 = tmp1 + tmp2;
74  return tmp1;
75 }
76 
77 dd_real dd_real_vector_ref::operator+(const double a){
78  dd_real tmp;
79  tmp.x[0] = *dd_hi_iter;
80  tmp.x[1] = *dd_lo_iter;
81  tmp = tmp + a;
82  return tmp;
83 }
84 
85 //Sub
86 dd_real dd_real_vector_ref::operator-(const dd_real a){
87  dd_real tmp;
88  tmp.x[0] = *dd_hi_iter;
89  tmp.x[1] = *dd_lo_iter;
90  tmp = tmp - a;
91  return tmp;
92 }
93 
95  dd_real tmp1;
96  tmp1.x[0] = *dd_hi_iter;
97  tmp1.x[1] = *dd_lo_iter;
98 
99  dd_real tmp2;
100  tmp2.x[0] = *a.dd_hi_iter;
101  tmp2.x[1] = *a.dd_lo_iter;
102 
103  tmp1 = tmp1 - tmp2;
104  return tmp1;
105 }
106 
107 dd_real dd_real_vector_ref::operator-(const double a){
108  dd_real tmp;
109  tmp.x[0] = *dd_hi_iter;
110  tmp.x[1] = *dd_lo_iter;
111  tmp = tmp - a;
112  return tmp;
113 }
114 
115 //Mul
116 dd_real dd_real_vector_ref::operator*(const dd_real a){
117  dd_real tmp;
118  tmp.x[0] = *dd_hi_iter;
119  tmp.x[1] = *dd_lo_iter;
120  tmp = tmp * a;
121  return tmp;
122 }
123 
125  dd_real tmp1;
126  tmp1.x[0] = *dd_hi_iter;
127  tmp1.x[1] = *dd_lo_iter;
128 
129  dd_real tmp2;
130  tmp2.x[0] = *a.dd_hi_iter;
131  tmp2.x[1] = *a.dd_lo_iter;
132 
133  tmp1 = tmp1 * tmp2;
134  return tmp1;
135 }
136 
137 dd_real dd_real_vector_ref::operator*(const double a){
138  dd_real tmp;
139  tmp.x[0] = *dd_hi_iter;
140  tmp.x[1] = *dd_lo_iter;
141  tmp = tmp * a;
142  return tmp;
143 }
144 
145 //Div
146 dd_real dd_real_vector_ref::operator/(const dd_real a){
147  dd_real tmp;
148  tmp.x[0] = *dd_hi_iter;
149  tmp.x[1] = *dd_lo_iter;
150  tmp = tmp / a;
151  return tmp;
152 }
153 
155  dd_real tmp1;
156  tmp1.x[0] = *dd_hi_iter;
157  tmp1.x[1] = *dd_lo_iter;
158 
159  dd_real tmp2;
160  tmp2.x[0] = *a.dd_hi_iter;
161  tmp2.x[1] = *a.dd_lo_iter;
162 
163  tmp1 = tmp1 / tmp2;
164  return tmp1;
165 }
166 
167 dd_real dd_real_vector_ref::operator/(const double a){
168  dd_real tmp;
169  tmp.x[0] = *dd_hi_iter;
170  tmp.x[1] = *dd_lo_iter;
171  tmp = tmp / a;
172  return tmp;
173 }
Double-double precision vector reference class.
dd_real operator/(const dd_real a)
dd_real operator*(const dd_real a)
std::vector< double >::iterator dd_lo_iter
dd_real operator-(const dd_real a)
std::vector< double >::iterator dd_hi_iter
dd_real operator+(const dd_real a)
dd_real operator*(const dd_real a, const dd_real_vector_ref b)
dd_real operator+(const dd_real a, const dd_real_vector_ref b)
dd_real operator/(const dd_real a, const dd_real_vector_ref b)
dd_real operator-(const dd_real a, const dd_real_vector_ref b)