Hi all,<br><br>While compiling ITK master, I ran into this error: <br><br>1&gt;D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_c_vector.txx(261) : error C2039: &#39;arg_max&#39; : is not a member of &#39;vnl_sse&lt;double&gt;&#39;<br>
1&gt;        D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_sse.h(261) : see declaration of &#39;vnl_sse&lt;double&gt;&#39;<br>1&gt;        D:\itk\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl/vnl_c_vector.txx(259) : while compiling class template member function &#39;unsigned int vnl_c_vector&lt;T&gt;::arg_max(const T *,unsigned int)&#39;<br>
1&gt;        with<br>1&gt;        [<br>1&gt;            T=double<br>1&gt;        ]<br>1&gt;        ..\..\..\..\..\..\..\..\ITK\Modules\ThirdParty\VNL\src\vxl\core\vnl\Templates\vnl_c_vector+double-.cxx(3) : see reference to class template instantiation &#39;vnl_c_vector&lt;T&gt;&#39; being compiled<br>
1&gt;        with<br>1&gt;        [<br>1&gt;            T=double<br>1&gt;        ]<br><br>Apparently, vnl_sse&lt;float&gt; and vnl_sse&lt;double&gt; are missing the methods arg_min and arg_max. Adding them proved to be very simple - I simply copied over the generic implementation and specialized it. I&#39;m attaching my patch below.<br>
<br>Could someone take a look and see if this is OK?<br><br>Regards,<br>Shash<br><br>diff --git a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>index 5af0f7c..94138a5 100644<br>
-- a/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>++ b/Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h<br>@@ -543,6 +543,27 @@ class vnl_sse&lt;double&gt;<br>    _mm_store_sd(&amp;ret,min);<br>    return ret;<br>
  }<br> static VNL_SSE_FORCE_INLINE unsigned arg_max(const double* v, unsigned n)<br> {<br>   if (n==0) return unsigned(-1); // the maximum of an empty set is undefined<br>   double tmp = *v;<br>   unsigned idx = 0;<br>   for (unsigned i=1; i&lt;n; ++i)<br>
     if (*++v &gt; tmp)<br>       tmp = *v, idx = i;<br>   return idx;<br> }<br><br> static VNL_SSE_FORCE_INLINE unsigned arg_min(const double* v, unsigned n)<br> {<br>   if (n==0) return unsigned(-1); // the minimum of an empty set is undefined<br>
   double tmp = *v;<br>   unsigned idx = 0;<br>   for (unsigned i=1; i&lt;n; ++i)<br>     if (*++v &lt; tmp)<br>       tmp = *v, idx = i;<br>   return idx;<br> }<br>};<br><br>//: SSE2 implementation for single precision floating point (32 bit)<br>
@@ -880,6 +901,27 @@ class vnl_sse&lt;float&gt;<br><br>    return ret;<br>  }<br>static VNL_SSE_FORCE_INLINE unsigned arg_max(const float* v, unsigned n)<br> {<br>   if (n==0) return unsigned(-1); // the maximum of an empty set is undefined<br>
   float tmp = *v;<br>   unsigned idx = 0;<br>   for (unsigned i=1; i&lt;n; ++i)<br>     if (*++v &gt; tmp)<br>       tmp = *v, idx = i;<br>   return idx;<br> }<br><br> static VNL_SSE_FORCE_INLINE unsigned arg_min(const float* v, unsigned n)<br>
 {<br>   if (n==0) return unsigned(-1); // the minimum of an empty set is undefined<br>   float tmp = *v;<br>   unsigned idx = 0;<br>   for (unsigned i=1; i&lt;n; ++i)<br>     if (*++v &lt; tmp)<br>       tmp = *v, idx = i;<br>
   return idx;<br> }<br>};<br><br>#endif // VNL_CONFIG_ENABLE_SSE2<br><br>