<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I just checked, and MSVC does appear to support more than 3 __m128 parameters if parameters 4 and up are pointers. Your solution would probably work, but we'd be working around - and introducing additional complexity for - a braindead compiler, on a platform where icc does the right thing.<div><br></div><div>The other issue with MSVC is that it doesn't support fftw: we might as well require icc+mkl or cygwin for Windows. People who use Windows and insist on the MSVC development environment are probably used to paying for their compiler and OS anyway...&nbsp;<br><div><div><br></div><div>Once C++ is allowed, the easy solution would be to make those parameters const references, so there's no need to change the calling code.</div><div><br></div><div>Sander<br><div><br></div><div><div><div><div><br><div><div>On Jul 26, 2010, at 07:00 , Roland Schulz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>gmx_sse2_single.h doesn't compile with MSVC 2010 on 32bit. As the COMPILER RANT in the file states MSVC doesn't support more than 3 __m128 parameters.&nbsp;</div><div>In the rant it also says that&nbsp;&nbsp;some compilers don't support&nbsp;pointers to __m128. For what compiler is this still true? If none, I suggest to change the arguments to const pointers.</div>

<div><br></div><div>If there are still, some: Are there also compilers which don't support either pointers nor unlimited __m128 parameters?</div><div><br></div><div>If not, I suggest a mixed approach. Where we detect which version is supported and use macros to have to write each function only once. See the below example. I think this is much less error prone than converting all functions to macros as the rant suggests. Mainly because of the double evaluation pitfall of macros.&nbsp;</div>

<div><br></div><div>Roland</div><div><br></div><div>sample:</div><div><div>#include &lt;xmmintrin.h&gt;</div><div><br></div><div>#ifdef SSE_POINTER</div><div>#define SSE_M128(a) const __m128 *a</div><div>#define SSE_REF(a) (&amp;a)</div>

<div>#define SSE_IND(a) (*a)</div><div>#else</div><div>#define SSE_M128(a) __m128 a</div><div>#define SSE_REF(a) (a)</div><div>#define SSE_IND(a) (a)</div><div>#endif</div><div><br></div><div>static inline void f(SSE_M128(b)) {</div>

<div>&nbsp;&nbsp;__m128 x = SSE_IND(b);</div><div>}</div><div><br></div><div>int main() {</div><div>&nbsp;&nbsp;__m128 x;</div><div>&nbsp;&nbsp;f(SSE_REF(x));</div><div>&nbsp;&nbsp;return 0;</div><div>}</div><div><br></div></div><div><br></div><div><br>-- <br>
ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov/">cmb.ornl.gov</a><br>
865-241-1537, ORNL PO BOX 2008 MS6309<br>
</div>
-- <br>gmx-developers mailing list<br><a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a><br>http://lists.gromacs.org/mailman/listinfo/gmx-developers<br>Please don't post (un)subscribe requests to the list. Use the <br>www interface or send it to gmx-developers-request@gromacs.org.</blockquote></div><br></div></div></div></div></div></div></div></body></html>