diff --git a/src/cmakeFindModules/OptimizeForArchitecture.cmake b/src/cmakeFindModules/OptimizeForArchitecture.cmake index 660fa42241..f99cb8d45d 100644 --- a/src/cmakeFindModules/OptimizeForArchitecture.cmake +++ b/src/cmakeFindModules/OptimizeForArchitecture.cmake @@ -41,8 +41,8 @@ macro(AutodetectHostArchitecture) if(_vendor_id STREQUAL "GenuineIntel") if(_cpu_family EQUAL 6) # Any recent Intel CPU except NetBurst - if(_cpu_model EQUAL 70) #intel core i7-3720qm MacBook Pro Retina - set(TARGET_ARCHITECTURE "ivy-bridge") + if(_cpu_model EQUAL 70) #intel haswell + set(TARGET_ARCHITECTURE "haswell") elseif(_cpu_model EQUAL 69) # Core i5/i7-4xxxU CPUs set(TARGET_ARCHITECTURE "haswell") elseif(_cpu_model EQUAL 63) # Xeon E5 series diff --git a/src/openMVG/image/image_io.cpp b/src/openMVG/image/image_io.cpp index 9f2c21e626..84dabd5fa2 100644 --- a/src/openMVG/image/image_io.cpp +++ b/src/openMVG/image/image_io.cpp @@ -586,7 +586,8 @@ int ReadTiff(const char * filename, } } else { for (size_t i=0; i::max()) { TIFFClose(tiff); return 0; } diff --git a/src/openMVG/matching/kvld/kvld.h b/src/openMVG/matching/kvld/kvld.h index c4fe3a3b19..1d5ffe7405 100644 --- a/src/openMVG/matching/kvld/kvld.h +++ b/src/openMVG/matching/kvld/kvld.h @@ -112,11 +112,11 @@ class VLD { for( int j = 0; j < subdirection; j++ ) {// term of descriptor - diff[ 0 ] += abs( descriptor[ i * subdirection + j ] - vld2.descriptor[ i * subdirection + j ] ); + diff[ 0 ] += std::abs( descriptor[ i * subdirection + j ] - vld2.descriptor[ i * subdirection + j ] ); } //term of main SIFT like orientation - diff[ 1 ] += std::min( abs( principleAngle[ i ] - vld2.principleAngle[ i ] ), - binNum - abs( principleAngle[ i ] - vld2.principleAngle[ i ] ) ) * ( weight[ i ] + vld2.weight[ i ] );// orientation term + diff[ 1 ] += std::min( std::abs( principleAngle[ i ] - vld2.principleAngle[ i ] ), + binNum - std::abs( principleAngle[ i ] - vld2.principleAngle[ i ] ) ) * ( weight[ i ] + vld2.weight[ i ] );// orientation term } diff[ 0 ] *= 0.36;