39 namespace region_detector_tools{
41 template<
class IteratorA,
class IteratorB,
class Predicate>
42 inline void copy_if(IteratorA srcBegin, IteratorA srcEnd, IteratorB dstBegin, Predicate p){
43 while(srcBegin != srcEnd){
45 *dstBegin = *srcBegin;
54 int n = (int)((last - first) >> 3);
57 #define REGION_DETECTOR_2_ONE if(*first != val) return first; ++first; 67 switch (last - first){
68 #define REGION_DETECTOR_2_ONE_R(REST) case REST: REGION_DETECTOR_2_ONE 76 case 0:
default:
return last;
78 #undef REGION_DETECTOR_2_ONE 79 #undef REGION_DETECTOR_2_ONE_R 84 int n = (int)((last - first) >> 3);
87 #define REGION_DETECTOR_2_ONE if(*first != val) return first; ++first; 93 switch (last - first){
94 #define REGION_DETECTOR_2_ONE_R(REST) case REST: REGION_DETECTOR_2_ONE 102 case 0:
default:
return last;
104 #undef REGION_DETECTOR_2_ONE 105 #undef REGION_DETECTOR_2_ONE_R 108 #define REGION_DETECTOR_2_USE_OPT_4_BYTES 111 #ifdef REGION_DETECTOR_2_USE_OPT_4_BYTES 116 while( first < last && (
int)first & 0x3 ){
118 while( first < last && (int64_t)first & 0x3 ){
125 if(first >= last)
return first;
127 unsigned int n = (last-first)/4;
129 reinterpret_cast<const icl32u*>(first)+n,
130 (
icl32u)(val | (val<<8) | (val<<16) | (val<<24)) );
131 const icl8u *p8u = reinterpret_cast<const icl8u*>(p32);
132 while(p8u < last && *p8u == val) ++p8u;
undocument this line if you encounter any issues!
Definition: Any.h:37
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
uint32_t icl32u
32bit unsigned integer type for the ICL
Definition: BasicTypes.h:88