Created
November 22, 2012 09:14
-
-
Save toruurakawa/4130129 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void mul2_SSE(double x, double xx, double y, double yy, double* z, double* zz){ | |
| double c, cc; | |
| mul12_SSE( x, y, &c, &cc); | |
| __m128d x_y = {x, y}; | |
| __m128d yy_xx = {yy, xx}; | |
| __m128d xyy_yxx = _mm_mul_pd(x_y, yy_xx); | |
| __m128d cc_cc = {cc, cc}; | |
| cc_cc = _mm_add_pd(_mm_add_pd(xyy_yxx, _mm_shuffle_pd(xyy_yxx, xyy_yxx, 1)), cc_cc); | |
| __m128d c_cSubz = {c, c-*z}; | |
| __m128d res = _mm_add_pd(c_cSubz, cc_cc); | |
| _mm_storel_pd(z, res); | |
| _mm_storeh_pd(zz, res); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment