| 215 | |
| 216 | template<typename T> |
| 217 | static int countNonZero_(const T* src, int len ) |
| 218 | { |
| 219 | int i=0, nz = 0; |
| 220 | #if CV_ENABLE_UNROLLED |
| 221 | for(; i <= len - 4; i += 4 ) |
| 222 | nz += (src[i] != 0) + (src[i+1] != 0) + (src[i+2] != 0) + (src[i+3] != 0); |
| 223 | #endif |
| 224 | for( ; i < len; i++ ) |
| 225 | nz += src[i] != 0; |
| 226 | return nz; |
| 227 | } |
| 228 | |
| 229 | static int countNonZero8u( const uchar* src, int len ) |
| 230 | { |
no outgoing calls
no test coverage detected