Diff
Not logged in

Differences From Artifact [81322e1ce041bb24]:

To Artifact [ae16b2462960bb78]:


50 : N1(2), N2(N2), N3(N3), data(N1*N2*N3, t) { assert(data.size()* 50 : N1(2), N2(N2), N3(N3), data(N1*N2*N3, t) { assert(data.size()* 51 T& operator()(int i1, int i2, int i3) 51 T& operator()(int i1, int i2, int i3) 52 { i1&=1; return data[ ((i1*N2)+i2)*N3+i3 ]; } 52 { i1&=1; return data[ ((i1*N2)+i2)*N3+i3 ]; } 53 void swap(DP3x& rhs) 53 void swap(DP3x& rhs) 54 { data.swap(rhs.data); } 54 { data.swap(rhs.data); } 55 }; 55 }; 56 56 57 // Not Tested | 57 // Tested: SRM 520 Lv2 58 template<typename T> 58 template<typename T> 59 struct DP4 59 struct DP4 60 { 60 { 61 int N1, N2, N3, N4; 61 int N1, N2, N3, N4; 62 vector<T> data; 62 vector<T> data; 63 DP4(int N1, int N2, int N3, int N4, const T& t = T()) 63 DP4(int N1, int N2, int N3, int N4, const T& t = T()) 64 : N1(N1), N2(N2), N3(N3), N4(N4), data(N1*N2*N3*N4, t) { assert( 64 : N1(N1), N2(N2), N3(N3), N4(N4), data(N1*N2*N3*N4, t) { assert(