Hi Luis,<br><br>I tried it again today, with a current checkout (commit hash 6ebd49640341277bdc6fc3c3ce77f85eb3150026) on Windows, using Visual Studio 2008. I can try with GCC on Linux too, though I don&#39;t think this is platform-dependent.<br>
<br>This problem exists here too. I have VNL_CONFIG_ENABLE_SSE2:BOOL=ON and VNL_CONFIG_ENABLE_SSE2_ROUNDING:BOOL=ON.<br><br>I don&#39;t think the rest of the config flags mean anything. There are explicit template specializations of vnl_sse&lt;T&gt; that are enabled when VNL_CONFIG_ENABLE_SSE2 is on (#if VNL_CONFIG_ENABLE_SSE2). If I turn it off, it works correctly. Interestingly, vnl_sse doesn&#39;t seem dependent on this variable. Only the float and double specializations are enabled/disabled using this flag.<br>
<br>For now, I&#39;m just turning SSE2 off.<br><br>Thanks,<br>Shash<br><br><div class="gmail_quote">On Sun, May 22, 2011 at 12:55 AM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Shashwath<br>
<br>
1) How recent is your checkout of ITK ?<br>
<br>
2) Did you purposely enabled any SSE options,<br>
     when configuring with CMake ?<br>
<br>
3) Here are the SSE related flag in my working<br>
    build of ITK on Linux:<br>
<br>
CMakeCache.txt:VNL_CONFIG_ENABLE_SSE2:BOOL=OFF<br>
CMakeCache.txt:VNL_CONFIG_ENABLE_SSE2_ROUNDING:BOOL=ON<br>
CMakeCache.txt://Have include HAVE_ASSERT_H<br>
CMakeCache.txt:HAVE_ASSERT_H:INTERNAL=1<br>
CMakeCache.txt://Test ITK_COMPILER_DOES_NOT_NEED_MSSE2_FLAG<br>
CMakeCache.txt:ITK_COMPILER_DOES_NOT_NEED_MSSE2_FLAG:INTERNAL=1<br>
CMakeCache.txt://Test ITK_COMPILER_SUPPORTS_SSE2_32<br>
CMakeCache.txt:ITK_COMPILER_SUPPORTS_SSE2_32:INTERNAL=1<br>
CMakeCache.txt://Test ITK_COMPILER_SUPPORTS_SSE2_64<br>
CMakeCache.txt:ITK_COMPILER_SUPPORTS_SSE2_64:INTERNAL=1<br>
CMakeCache.txt:VCL_CXX_HAS_HEADER_CASSERT:INTERNAL=1<br>
CMakeCache.txt://ADVANCED property for variable: VNL_CONFIG_ENABLE_SSE2<br>
CMakeCache.txt:VNL_CONFIG_ENABLE_SSE2-ADVANCED:INTERNAL=1<br>
CMakeCache.txt://ADVANCED property for variable: VNL_CONFIG_ENABLE_SSE2_ROUNDING<br>
CMakeCache.txt:VNL_CONFIG_ENABLE_SSE2_ROUNDING-ADVANCED:INTERNAL=1<br>
CMakeCache.txt:VXL_HAS_SSE2_HARDWARE_SUPPORT:INTERNAL=1<br>
CMakeCache.txt:VXL_HAS_SSE2_HARDWARE_SUPPORT_COMPILED:INTERNAL=TRUE<br>
<br>
<br>
<br>
      Luis<br>
<br>
<br>
--------------------------------------<br>
<div><div></div><div class="h5">On Tue, May 17, 2011 at 4:28 AM, Shashwath T.R. &lt;<a href="mailto:trshash@gmail.com">trshash@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; While compiling ITK master, I ran into this error:<br>
&gt;<br>
&gt; 1&gt;D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_c_vector.txx(261) :<br>
&gt; error C2039: &#39;arg_max&#39; : is not a member of &#39;vnl_sse&lt;double&gt;&#39;<br>
&gt; 1&gt;        D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_sse.h(261)<br>
&gt; : see declaration of &#39;vnl_sse&lt;double&gt;&#39;<br>
&gt; 1&gt;<br>
&gt; D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_c_vector.txx(259) :<br>
&gt; while compiling class template member function &#39;unsigned int<br>
&gt; vnl_c_vector&lt;T&gt;::arg_max(const T *,unsigned int)&#39;<br>
&gt; 1&gt;        with<br>
&gt; 1&gt;        [<br>
&gt; 1&gt;            T=double<br>
&gt; 1&gt;        ]<br>
&gt; 1&gt;<br>
&gt; ..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl\Templates\vnl_c_vector+double-.cxx(3)<br>
&gt; : see reference to class template instantiation &#39;vnl_c_vector&lt;T&gt;&#39; being<br>
&gt; compiled<br>
&gt; 1&gt;        with<br>
&gt; 1&gt;        [<br>
&gt; 1&gt;            T=double<br>
&gt; 1&gt;        ]<br>
&gt;<br>
&gt; Apparently, vnl_sse&lt;float&gt; and vnl_sse&lt;double&gt; are missing the methods<br>
&gt; arg_min and arg_max. Adding them proved to be very simple - I simply copied<br>
&gt; over the generic implementation and specialized it. I&#39;m attaching my patch<br>
&gt; below.<br>
&gt;<br>
&gt; Could someone take a look and see if this is OK?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Shash<br>
&gt;<br>
&gt; diff --git a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>
&gt; b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>
&gt; index 5af0f7c..94138a5 100644<br>
&gt; -- a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>
&gt; ++ b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>
&gt; @@ -543,6 +543,27 @@ class vnl_sse&lt;double&gt;<br>
&gt;     _mm_store_sd(&amp;ret,min);<br>
&gt;     return ret;<br>
&gt;   }<br>
&gt;  static VNL_SSE_FORCE_INLINE unsigned arg_max(const double* v, unsigned n)<br>
&gt;  {<br>
&gt;    if (n==0) return unsigned(-1); // the maximum of an empty set is<br>
&gt; undefined<br>
&gt;    double tmp = *v;<br>
&gt;    unsigned idx = 0;<br>
&gt;    for (unsigned i=1; i&lt;n; ++i)<br>
&gt;      if (*++v &gt; tmp)<br>
&gt;        tmp = *v, idx = i;<br>
&gt;    return idx;<br>
&gt;  }<br>
&gt;<br>
&gt;  static VNL_SSE_FORCE_INLINE unsigned arg_min(const double* v, unsigned n)<br>
&gt;  {<br>
&gt;    if (n==0) return unsigned(-1); // the minimum of an empty set is<br>
&gt; undefined<br>
&gt;    double tmp = *v;<br>
&gt;    unsigned idx = 0;<br>
&gt;    for (unsigned i=1; i&lt;n; ++i)<br>
&gt;      if (*++v &lt; tmp)<br>
&gt;        tmp = *v, idx = i;<br>
&gt;    return idx;<br>
&gt;  }<br>
&gt; };<br>
&gt;<br>
&gt; //: SSE2 implementation for single precision floating point (32 bit)<br>
&gt; @@ -880,6 +901,27 @@ class vnl_sse&lt;float&gt;<br>
&gt;<br>
&gt;     return ret;<br>
&gt;   }<br>
&gt; static VNL_SSE_FORCE_INLINE unsigned arg_max(const float* v, unsigned n)<br>
&gt;  {<br>
&gt;    if (n==0) return unsigned(-1); // the maximum of an empty set is<br>
&gt; undefined<br>
&gt;    float tmp = *v;<br>
&gt;    unsigned idx = 0;<br>
&gt;    for (unsigned i=1; i&lt;n; ++i)<br>
&gt;      if (*++v &gt; tmp)<br>
&gt;        tmp = *v, idx = i;<br>
&gt;    return idx;<br>
&gt;  }<br>
&gt;<br>
&gt;  static VNL_SSE_FORCE_INLINE unsigned arg_min(const float* v, unsigned n)<br>
&gt;  {<br>
&gt;    if (n==0) return unsigned(-1); // the minimum of an empty set is<br>
&gt; undefined<br>
&gt;    float tmp = *v;<br>
&gt;    unsigned idx = 0;<br>
&gt;    for (unsigned i=1; i&lt;n; ++i)<br>
&gt;      if (*++v &lt; tmp)<br>
&gt;        tmp = *v, idx = i;<br>
&gt;    return idx;<br>
&gt;  }<br>
&gt; };<br>
&gt;<br>
&gt; #endif // VNL_CONFIG_ENABLE_SSE2<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>