libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcvd-members] libcvd/cvd vision.h


From: Ethan Eade
Subject: [Libcvd-members] libcvd/cvd vision.h
Date: Tue, 16 May 2006 13:31:47 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Branch:         
Changes by:     Ethan Eade <address@hidden>     06/05/16 13:31:47

Modified files:
        cvd            : vision.h 

Log message:
        Now checks for CVD_HAVE_EMMINTRIN before using intrinsics.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd/vision.h.diff?tr1=1.16&tr2=1.17&r1=text&r2=text

Patches:
Index: libcvd/cvd/vision.h
diff -u libcvd/cvd/vision.h:1.16 libcvd/cvd/vision.h:1.17
--- libcvd/cvd/vision.h:1.16    Mon May  8 13:07:31 2006
+++ libcvd/cvd/vision.h Tue May 16 13:31:47 2006
@@ -203,7 +203,7 @@
   Gradient<S,T>::gradient(im,out);
 }
 
-#if defined( __GNUC__) && defined(CVD_HAVE_SSE2)
+#if defined(CVD_HAVE_SSE2) && defined(CVD_HAVE_EMMINTRIN)
 
  void gradient(const byte* in, short (*out)[2], int w, int h);
 
@@ -211,11 +211,11 @@
  {
      if( im.size() != out.size())
         throw Exceptions::Vision::IncompatibleImageSizes("gradient");
-     if (is_aligned<16>(im.data()) && is_aligned<16>(out.data())) {
+     if (is_aligned<16>(im.data()) && is_aligned<16>(out.data()))
         gradient(im.data(), out.data(), im.size().x, im.size().y);
-        zeroBorders(out);
-     } else
+     else
         gradient<byte,short[2]>(im,out);
+     zeroBorders(out);
  }
 
 static inline __m128i zero_si128() { __m128i x; asm ( "pxor %0, %0  \n\t" : 
"=x"(x) ); return x; }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]