<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://499/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 6, 2013, at 8:43 AM, Matthias Kretz <<a href="mailto:kretz@compeng.uni-frankfurt.de">kretz@compeng.uni-frankfurt.de</a>> wrote:</div><blockquote type="cite"><div style="font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Hello Roberto,</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">great initiative! Supporting the use of SVML is a very nice feature. Obviously this needs to stay optional as you already implemented it.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">It would be fine to adjust the unit tests to simply expect different precision when compiled against SVML.</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">I would open up a new branch in git to integrate these changes. If you send me the patch as an attachement I would be able to easily apply it. Or you could register at <a href="http://code.compeng.uni-frankfurt.de">code.compeng.uni-frankfurt.de</a> and get commit access yourself (then the commit history would carry your name properly :) ).</div></div></blockquote><div><br></div><div>Sounds good, if you give me commit rights I will merge the patch myself in the next couple of weeks.</div></div><div><br><blockquote type="cite"><div style="font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">A few comments on the patch:</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">- The cmake logic should use a switch (like the BUILD_EXAMPLES switch) to request use of SVML. In that case cmake would search for the library (find_library is what you need) and if not found it would then error out.</div></div></blockquote><div><br></div><div>Ok</div><div><span style="white-space: pre-wrap; font-family: monospace; font-size: 9pt; "> </span></div><blockquote type="cite"><div style="font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">- Your functions now look like this:</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">static inline Vector<float> exp(VC_ALIGNED_PARAMETER(Vector<float>) x) {</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">    Vector<float> tmp;</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">    tmp.data() = __svml_expf4(x.data());</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">    return tmp;</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">}</span></div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Have you tried to do:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">static inline Vector<float> exp(VC_ALIGNED_PARAMETER(Vector<float>) x) {</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">    return __svml_expf4(x.data());</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">}</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">? If __svml_expf4 returns __m128/__m256 this should do exactly what you want, as the compiler sees it needs to call the Vector<float>(__m128) constructor.</span></div></div></blockquote><blockquote type="cite"><div style="font-size: 9pt; font-family: monospace; "><p style="white-space: pre-wrap; margin: 0px; "> </p></div></blockquote></div><div><blockquote type="cite"><div style="font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">- The sincos hack is dangerous. You should use VC_GNU_ASM to determine whether __asm__ is allowed. Then the movaps vs. vmovaps is determined by VC_USE_VEX_CODING. Note that you can compile Vc with SSE and VEX coding. Also, the Windows branch of the SSE implementation looks like a copy-paste error. :)</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">I find it strange, though, that SVML returns the cosine in xmm1/ymm1. Are you sure that it does not expect a pointer as one of it arguments? Is this documented somewhere?</span></div></div></blockquote><div><br></div>I followed the approach used in Agner Fog's vector library (<a href="http://www.agner.org/optimize/vectorclass.pdf">http://www.agner.org/optimize/vectorclass.pdf</a>); I assume there is a good reason why he is doing it this way but I will look into it in more detail.</div><div><br></div><div>Thanks,</div><div>Roberto</div><div><span style="white-space: pre-wrap; font-family: monospace; font-size: 9pt; "> </span></div><div><blockquote type="cite"><div style="font-size: 9pt; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family: monospace; "><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">Regards,</span></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "><span style="font-size: 12px; color: rgb(31, 28, 27); ">   Matthias</span></div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">On Thursday 31 January 2013 13:28:48 Roberto Agostino Vitillo wrote:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Hi,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> The following patch adds support for the Intel SVML library. Intel SVML has</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> an accuracy of 4 ulp (typically 2) and in general it seems to outperform Vc</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> by a factor of up to 2 (Ivy Bridge). The Intel library provides also a</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> higher accuracy for double precision which is vital for the science</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> experiment I am working for.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Support is enabled by passing to cmake the path of the Intel SVML library</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> through the INTEL_SVML_PATH flag i.e. cmake</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> -DINTEL_SVML_PATH=/opt/intel/composerxe/compiler/lib/intel64/.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> The following tests are failing on Linux when enabling SVML:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> c++11_math_sse (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> c++11_math_avx (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> math_VC_LOG_ILP_sse (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> math_VC_LOG_ILP_avx (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  c++11_math_VC_LOG_ILP_sse (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> c++11_math_VC_LOG_ILP_avx (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> math_VC_LOG_ILP2_sse (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> math_VC_LOG_ILP2_avx (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> c++11_math_VC_LOG_ILP2_sse (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> c++11_math_VC_LOG_ILP2_avx (Failed)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> They all fail on exp() and log(). Vc allows a distance of 1 and 2 for single</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> and double precision respectively while SVML has a distance of 3 in some</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> cases.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> I am sure the code can be organized better architecturally but it should</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> provide everything you need to hopefully add support for the Intel library.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Roberto</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> diff --git a/CMakeLists.txt b/CMakeLists.txt</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> index 9895338..83c4a46 100644</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> --- a/CMakeLists.txt</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +++ b/CMakeLists.txt</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -98,6 +98,11 @@ if(Vc_COMPILER_IS_INTEL)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w1 -fp-model precise")</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  endif()</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +if(INTEL_SVML_PATH)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    add_definitions(-DUSE_INTEL_SVML)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    set(CMAKE_EXE_LINKER_FLAGS "-L ${INTEL_SVML}/ -lsvml")</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +endif(INTEL_SVML_PATH)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  if(CMAKE_BUILD_TYPE STREQUAL "" AND NOT CMAKE_CXX_FLAGS MATCHES "-O[123]")</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>     message(STATUS "WARNING! It seems you are compiling without</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> optimization. Please set CMAKE_BUILD_TYPE.") endif(CMAKE_BUILD_TYPE</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> STREQUAL "" AND NOT CMAKE_CXX_FLAGS MATCHES "-O[123]") diff --git</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> a/common/exponential.h b/common/exponential.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> index 9063172..1f14e20 100644</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> --- a/common/exponential.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +++ b/common/exponential.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -49,6 +49,40 @@ namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      template<typename T> struct TypenameForLdexp { typedef Vector<int></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Type; }; template<> struct TypenameForLdexp<Vc::sfloat> { typedef</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Vector<short> Type; };</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(USE_INTEL_SVML)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(VC_IMPL_SSE)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline Vector<float> exp(VC_ALIGNED_PARAMETER(Vector<float>) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vector<float> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_expf4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline Vector<sfloat> exp(VC_ALIGNED_PARAMETER(Vector<sfloat>) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vector<sfloat> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_expf4(x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_expf4(x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline Vector<double> exp(VC_ALIGNED_PARAMETER(Vector<double>) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vector<double> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_exp2(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> exp(VC_ALIGNED_PARAMETER(Vector<T>) x) { +    Vector<T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_expf8(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> inline Vector<double> exp(VC_ALIGNED_PARAMETER(Vector<double>)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> x) { +    Vector<double> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_exp4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> exp(VC_ALIGNED_PARAMETER(Vector<T>) _x) { typedef Vector<T> V;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          typedef typename V::Mask M;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -131,6 +165,7 @@ namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          return x;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  } // namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  namespace VC__USE_NAMESPACE</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> diff --git a/common/logarithm.h b/common/logarithm.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> index f5b8455..5247ce6 100644</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> --- a/common/logarithm.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +++ b/common/logarithm.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -49,6 +49,8 @@</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #define VC_COMMON_LOGARITHM_H</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #include "macros.h"</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#include "svml.h"</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  namespace Vc</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -56,6 +58,9 @@ namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #ifdef VC__USE_NAMESPACE</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  using Vc::VC__USE_NAMESPACE::Const;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  using Vc::VC__USE_NAMESPACE::Vector;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +using Vc::VC__USE_NAMESPACE::float_v;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +using Vc::VC__USE_NAMESPACE::sfloat_v;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +using Vc::VC__USE_NAMESPACE::double_v;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  enum LogarithmBase {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      BaseE, Base10, Base2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -166,8 +171,8 @@ struct LogImpl</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> -    static inline Vc_ALWAYS_INLINE void log_series(Vector<double></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &VC_RESTRICT x, Vector<double>::AsArg exponent) { -        typedef</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Vector<double> V;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    static inline Vc_ALWAYS_INLINE void log_series(double_v &VC_RESTRICT x,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> double_v::AsArg exponent) { +        typedef double_v V;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          typedef Const<double> C;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          const V x2 = x * x;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>          V y = C::P(0);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -246,6 +251,107 @@ struct LogImpl</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  };</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(USE_INTEL_SVML)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(VC_IMPL_SSE)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline float_v log(VC_ALIGNED_PARAMETER(float_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_logf4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline sfloat_v log(VC_ALIGNED_PARAMETER(sfloat_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_logf4(x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_logf4(x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline double_v log(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log2(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log10</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline float_v log10(VC_ALIGNED_PARAMETER(float_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log10f4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline sfloat_v log10(VC_ALIGNED_PARAMETER(sfloat_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_log10f4(x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_log10f4(x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline double_v log10(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log102(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline float_v log2(VC_ALIGNED_PARAMETER(float_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log2f4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline sfloat_v log2(VC_ALIGNED_PARAMETER(sfloat_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_log2f4(x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_log2f4(x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +static inline double_v log2(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log22(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> log(VC_ALIGNED_PARAMETER(Vector<T>) x) { +    Vector<T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_logf8(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> inline double_v log(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log4(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log10</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> log10(VC_ALIGNED_PARAMETER(Vector<T>) x) { +    Vector<T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log10f8(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> inline double_v log10(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log104(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// log2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> log2(VC_ALIGNED_PARAMETER(Vector<T>) x) { +    Vector<T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log2f8(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> inline double_v log2(VC_ALIGNED_PARAMETER(double_v) x) {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_log24(x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> log(VC_ALIGNED_PARAMETER(Vector<T>) x) { typedef typename Vector<T>::Mask</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> M;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      typedef Const<T> C;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -261,6 +367,8 @@ template<typename T> static inline Vector<T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> log2(VC_ALIGNED_PARAMETER(Vector<T> typedef Const<T> C;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      return LogImpl<Base2>::calc(x);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  } // namespace Common</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #ifdef VC__USE_NAMESPACE</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  namespace VC__USE_NAMESPACE</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> diff --git a/common/svml.h b/common/svml.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> new file mode 100644</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> index 0000000..8ecd782</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> --- /dev/null</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +++ b/common/svml.h</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -0,0 +1,68 @@</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +/*  This file is part of the Vc library.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Copyright (C) 2010-2012 Matthias Kretz <<a href="mailto:kretz@kde.org">kretz@kde.org</a>></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vc is free software: you can redistribute it and/or modify</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    it under the terms of the GNU Lesser General Public License as</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    published by the Free Software Foundation, either version 3 of</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    the License, or (at your option) any later version.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vc is distributed in the hope that it will be useful, but</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    WITHOUT ANY WARRANTY; without even the implied warranty of</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    GNU Lesser General Public License for more details.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    You should have received a copy of the GNU Lesser General Public</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    License along with Vc.  If not, see <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +*/</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#ifndef VC_COMMON_SVML_H</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#define VC_COMMON_SVML_H</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(USE_INTEL_SVML)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +extern "C"{</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_sinf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_sin2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_cosf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_cos2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_sincosf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_sincos2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_asinf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_asin2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_atanf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_atan2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_atan2f4(__m128 v1, __m128 v2);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_atan22(__m128d v1, __m128d v2);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_logf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_log2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_log2f4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_log22(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_log10f4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_log102(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128 __svml_expf4(__m128 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m128d __svml_exp2(__m128d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_sinf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_sin4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_cosf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_cos4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_sincosf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_sincos4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_asinf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_asin4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_atanf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_atan4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_atan2f8(__m256 v1, __m256 v2);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_atan24(__m256d v1, __m256d v2);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_logf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_log4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_log2f8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_log24(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_log10f8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_log104(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256 __svml_expf8(__m256 v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +__m256d __svml_exp4(__m256d v1);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> diff --git a/src/trigonometric.cpp b/src/trigonometric.cpp</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> index e24bc93..2e41059 100644</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> --- a/src/trigonometric.cpp</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +++ b/src/trigonometric.cpp</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -20,6 +20,7 @@</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #include <Vc/Vc></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #if defined(VC_IMPL_SSE) || defined(VC_IMPL_AVX)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #include <common/macros.h></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#include <common/svml.h></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  namespace Vc</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  {</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -74,6 +75,229 @@ namespace</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  } // anonymous namespace</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(USE_INTEL_SVML)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(VC_IMPL_SSE)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// sin</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> float_v Trigonometric<VC_IMPL>::sin(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_sinf4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> sfloat_v Trigonometric<VC_IMPL>::sin(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_sinf4(_x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_sinf4(_x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::sin(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_sin2(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// cos</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> float_v Trigonometric<VC_IMPL>::cos(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_cosf4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> sfloat_v Trigonometric<VC_IMPL>::cos(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_cosf4(_x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_cosf4(_x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::cos(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_cos2(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// sincos</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> void Trigonometric<VC_IMPL>::sincos(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, float_v *_sin, float_v *_cos) { +    _sin->data() =</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> __svml_sincosf4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +     __asm__ __volatile__ ( "movaps %%xmm1, %0":"=m"(_cos->data()));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovapd _cos->data(), ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> void Trigonometric<VC_IMPL>::sincos(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, sfloat_v *_sin, sfloat_v *_cos) { +    _sin->data()[0] =</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> __svml_sincosf4(_x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +     __asm__ __volatile__ ( "movaps %%xmm1, %0":"=m"(_cos->data()[0]));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovapd _cos->data()[0], ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _sin->data()[1] = __svml_sincosf4(_x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +     __asm__ __volatile__ ( "movaps %%xmm1, %0":"=m"(_cos->data()[1]));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovapd _cos->data()[1], ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> void Trigonometric<VC_IMPL>::sincos(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, double_v *_sin, double_v *_cos) { +  _sin->data() =</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> __svml_sincos2(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +     __asm__ __volatile__ ( "movaps %%xmm1, %0":"=m"(_cos->data()));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovapd _cos->data(), ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// asin</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> float_v Trigonometric<VC_IMPL>::asin(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_asinf4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> sfloat_v Trigonometric<VC_IMPL>::asin(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_asinf4(_x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_asinf4(_x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::asin(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_asin2(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// atan</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> float_v Trigonometric<VC_IMPL>::atan(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atanf4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> sfloat_v Trigonometric<VC_IMPL>::atan(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_atanf4(_x.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_atanf4(_x.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::atan(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan2(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// atan2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> float_v Trigonometric<VC_IMPL>::atan2(const float_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, const float_v &_y){ +    float_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan2f4(_x.data(), _y.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> sfloat_v Trigonometric<VC_IMPL>::atan2(const sfloat_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, const sfloat_v &_y){ +    sfloat_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[0] = __svml_atan2f4(_x.data()[0], _y.data()[0]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data()[1] = __svml_atan2f4(_x.data()[1], _y.data()[1]);</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::atan2(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, const double_v &_y){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan22(_x.data(), _y.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// sin</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> Vector<_T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::sin(const Vector<_T> &_x){ +    Vector<_T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_sinf8(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::sin(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_sin4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// cos</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> Vector<_T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::cos(const Vector<_T> &_x){ +    Vector<_T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_cosf8(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::cos(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_cos4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// sincos</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> void Trigonometric<VC_IMPL>::sincos(const</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Vector<_T> &_x, Vector<_T> *_sin, Vector<_T> *_cos) { +    _sin->data() =</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> __svml_sincosf8(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    __asm__ __volatile__ ( "vmovaps %%ymm1, %0":"=m"(_cos->data()));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovaps _cos->data(), ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> void Trigonometric<VC_IMPL>::sincos(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, double_v *_sin, double_v *_cos) { +    _sin->data() =</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> __svml_sincos4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#if defined(__unix__) || defined(__GNUC__)</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    __asm__ __volatile__ ( "vmovaps %%ymm1, %0":"=m"(_cos->data()));</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else // Windows</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    _asm vmovaps _cos->data(), ymm1;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// asin</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> Vector<_T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::asin(const Vector<_T> &_x){ +    Vector<_T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_asinf8(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::asin(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_asin4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// atan</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> Vector<_T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::atan(const Vector<_T> &_x){ +    Vector<_T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atanf8(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::atan(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan4(_x.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +// atan2</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<typename _T> Vector<_T></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::atan2(const Vector<_T> &_x, const Vector<_T> &_y){</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    Vector<_T> tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan2f8(_x.data(), _y.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +template<> template<> double_v Trigonometric<VC_IMPL>::atan2(const double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> &_x, const double_v &_y){ +    double_v tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    tmp.data() = __svml_atan24(_x.data(), _y.data());</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +    return tmp;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +}</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#else</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  /*</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>   * algorithm for sine and cosine:</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>   *</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> @@ -472,6 +696,8 @@ template<> template<> double_v</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> Trigonometric<VC_IMPL>::atan2 (const double_v &y,</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>      return a;</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  }</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +#endif</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> +</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  } // namespace Vc</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">> </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">>  #include <common/undomacros.h></div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">-- </div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Dipl.-Phys. Matthias Kretz</div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Phone: +49 69 798 44110</div><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">Web:   <a href="http://compeng.uni-frankfurt.de/?mkretz">http://compeng.uni-frankfurt.de/?mkretz</a></div><p style="white-space: pre-wrap; margin: 0px; text-indent: 0px; "> </p><div style="white-space: pre-wrap; margin: 0px; text-indent: 0px; ">SIMD easy and portable: <a href="http://compeng.uni-frankfurt.de/?vc">http://compeng.uni-frankfurt.de/?vc</a></div></div></blockquote></div><br></body></html>