| op_all_meat.hpp | | op_all_meat.hpp | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| const uword n_elem = P.get_n_elem(); | | const uword n_elem = P.get_n_elem(); | |
| | | | |
| uword count = 0; | | uword count = 0; | |
| | | | |
| if(Proxy<T1>::prefer_at_accessor == false) | | if(Proxy<T1>::prefer_at_accessor == false) | |
| { | | { | |
| typename Proxy<T1>::ea_type Pea = P.get_ea(); | | typename Proxy<T1>::ea_type Pea = P.get_ea(); | |
| | | | |
| for(uword i=0; i<n_elem; ++i) | | for(uword i=0; i<n_elem; ++i) | |
| { | | { | |
|
| if(Pea[i] != eT(0)) { ++count; } | | count += (Pea[i] != eT(0)) ? uword(1) : uword(0); | |
| } | | } | |
| } | | } | |
| else | | else | |
| { | | { | |
| const uword n_rows = P.get_n_rows(); | | const uword n_rows = P.get_n_rows(); | |
| const uword n_cols = P.get_n_cols(); | | const uword n_cols = P.get_n_cols(); | |
| | | | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 83 | |
| uword count = 0; | | uword count = 0; | |
| | | | |
| if(Proxy<T1>::prefer_at_accessor == false) | | if(Proxy<T1>::prefer_at_accessor == false) | |
| { | | { | |
| typename Proxy<T1>::ea_type Pea = P.get_ea(); | | typename Proxy<T1>::ea_type Pea = P.get_ea(); | |
| | | | |
| for(uword i=0; i < n_elem; ++i) | | for(uword i=0; i < n_elem; ++i) | |
| { | | { | |
| const eT tmp = Pea[i]; | | const eT tmp = Pea[i]; | |
| | | | |
|
| if(is_same_type<op_type, op_rel_lt_pre >::yes) { if(val < tm | | if(is_same_type<op_type, op_rel_lt_pre >::yes) { count += (va | |
| p) { ++count; } } | | l < tmp) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_lt_post >::yes) { if(tmp < va | | else if(is_same_type<op_type, op_rel_lt_post >::yes) { count += (tm | |
| l) { ++count; } } | | p < val) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_gt_pre >::yes) { if(val > tm | | else if(is_same_type<op_type, op_rel_gt_pre >::yes) { count += (va | |
| p) { ++count; } } | | l > tmp) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_gt_post >::yes) { if(tmp > va | | else if(is_same_type<op_type, op_rel_gt_post >::yes) { count += (tm | |
| l) { ++count; } } | | p > val) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_lteq_pre >::yes) { if(val <= tm | | else if(is_same_type<op_type, op_rel_lteq_pre >::yes) { count += (va | |
| p) { ++count; } } | | l <= tmp) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_lteq_post>::yes) { if(tmp <= va | | else if(is_same_type<op_type, op_rel_lteq_post>::yes) { count += (tm | |
| l) { ++count; } } | | p <= val) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_gteq_pre >::yes) { if(val >= tm | | else if(is_same_type<op_type, op_rel_gteq_pre >::yes) { count += (va | |
| p) { ++count; } } | | l >= tmp) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_gteq_post>::yes) { if(tmp >= va | | else if(is_same_type<op_type, op_rel_gteq_post>::yes) { count += (tm | |
| l) { ++count; } } | | p >= val) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_eq >::yes) { if(tmp == va | | else if(is_same_type<op_type, op_rel_eq >::yes) { count += (tm | |
| l) { ++count; } } | | p == val) ? uword(1) : uword(0); } | |
| else if(is_same_type<op_type, op_rel_noteq >::yes) { if(tmp != va | | else if(is_same_type<op_type, op_rel_noteq >::yes) { count += (tm | |
| l) { ++count; } } | | p != val) ? uword(1) : uword(0); } | |
| } | | } | |
| } | | } | |
| else | | else | |
| { | | { | |
| const uword n_rows = P.get_n_rows(); | | const uword n_rows = P.get_n_rows(); | |
| const uword n_cols = P.get_n_cols(); | | const uword n_cols = P.get_n_cols(); | |
| | | | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
| | | | |
| skipping to change at line 164 | | skipping to change at line 164 | |
| if(prefer_at_accessor == false) | | if(prefer_at_accessor == false) | |
| { | | { | |
| ea_type1 PA = A.get_ea(); | | ea_type1 PA = A.get_ea(); | |
| ea_type2 PB = B.get_ea(); | | ea_type2 PB = B.get_ea(); | |
| | | | |
| for(uword i=0; i<n_elem; ++i) | | for(uword i=0; i<n_elem; ++i) | |
| { | | { | |
| const eT1 tmp1 = PA[i]; | | const eT1 tmp1 = PA[i]; | |
| const eT2 tmp2 = PB[i]; | | const eT2 tmp2 = PB[i]; | |
| | | | |
|
| if(is_same_type<glue_type, glue_rel_lt >::yes) { if(tmp1 < | | if(is_same_type<glue_type, glue_rel_lt >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 < tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_gt >::yes) { if(tmp1 > | | else if(is_same_type<glue_type, glue_rel_gt >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 > tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_lteq >::yes) { if(tmp1 <= | | else if(is_same_type<glue_type, glue_rel_lteq >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 <= tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_gteq >::yes) { if(tmp1 >= | | else if(is_same_type<glue_type, glue_rel_gteq >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 >= tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_eq >::yes) { if(tmp1 == | | else if(is_same_type<glue_type, glue_rel_eq >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 == tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_noteq >::yes) { if(tmp1 != | | else if(is_same_type<glue_type, glue_rel_noteq >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 != tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_and >::yes) { if(tmp1 && | | else if(is_same_type<glue_type, glue_rel_and >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 && tmp2) ? uword(1) : uword(0); } | |
| else if(is_same_type<glue_type, glue_rel_or >::yes) { if(tmp1 || | | else if(is_same_type<glue_type, glue_rel_or >::yes) { count += (t | |
| tmp2) { ++count; } } | | mp1 || tmp2) ? uword(1) : uword(0); } | |
| } | | } | |
| } | | } | |
| else | | else | |
| { | | { | |
| const uword n_rows = A.get_n_rows(); | | const uword n_rows = A.get_n_rows(); | |
| const uword n_cols = A.get_n_cols(); | | const uword n_cols = A.get_n_cols(); | |
| | | | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
| | | | |
| skipping to change at line 241 | | skipping to change at line 241 | |
| const unwrap<typename Proxy<T1>::stored_type> U(P.Q); | | const unwrap<typename Proxy<T1>::stored_type> U(P.Q); | |
| | | | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| { | | { | |
| const eT* colmem = U.M.colptr(col); | | const eT* colmem = U.M.colptr(col); | |
| | | | |
| uword count = 0; | | uword count = 0; | |
| | | | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
|
| if(colmem[row] != eT(0)) { ++count; } | | count += (colmem[row] != eT(0)) ? uword(1) : uword(0); | |
| } | | } | |
| | | | |
| out_mem[col] = (n_rows == count) ? uword(1) : uword(0); | | out_mem[col] = (n_rows == count) ? uword(1) : uword(0); | |
| } | | } | |
| } | | } | |
| else | | else | |
| { | | { | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| { | | { | |
| uword count = 0; | | uword count = 0; | |
| | | | |
| skipping to change at line 280 | | skipping to change at line 280 | |
| if(is_Mat<typename Proxy<T1>::stored_type>::value == true) | | if(is_Mat<typename Proxy<T1>::stored_type>::value == true) | |
| { | | { | |
| const unwrap<typename Proxy<T1>::stored_type> U(P.Q); | | const unwrap<typename Proxy<T1>::stored_type> U(P.Q); | |
| | | | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| { | | { | |
| const eT* colmem = U.M.colptr(col); | | const eT* colmem = U.M.colptr(col); | |
| | | | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
|
| if(colmem[row] != eT(0)) { ++out_mem[row]; } | | out_mem[row] += (colmem[row] != eT(0)) ? uword(1) : uword(0); | |
| } | | } | |
| } | | } | |
| } | | } | |
| else | | else | |
| { | | { | |
| for(uword col=0; col < n_cols; ++col) | | for(uword col=0; col < n_cols; ++col) | |
| { | | { | |
| for(uword row=0; row < n_rows; ++row) | | for(uword row=0; row < n_rows; ++row) | |
| { | | { | |
| if(P.at(row,col) != eT(0)) { ++out_mem[row]; } | | if(P.at(row,col) != eT(0)) { ++out_mem[row]; } | |
| | | | |
End of changes. 5 change blocks. |
| 39 lines changed or deleted | | 39 lines changed or added | |
|