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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| //---------------------------------------------------------------------- | |
| #include <stdio.h> | |
| #include <immintrin.h> | |
| #include <iostream> |
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
| #include <stdio.h> | |
| #include <immintrin.h> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <random> | |
| #include <math.h> | |
| #include <assert.h> | |
| #include <sys/stat.h> | |
| #include <sys/time.h> | |
| const double density = 1.0; |
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
| #include <stdio.h> | |
| #include <immintrin.h> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <random> | |
| #include <math.h> | |
| #include <assert.h> | |
| #include <sys/stat.h> | |
| #include <sys/time.h> | |
| const double density = 1.0; |
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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| #include <iostream> | |
| #include <stdio.h> | |
| #include <vector> | |
| #include <chrono> |
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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| #include <iostream> | |
| #include <stdio.h> | |
| #include <vector> | |
| #include <chrono> |
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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| #include <iostream> | |
| #include <vector> | |
| #include <map> |
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
| #include <stdio.h> | |
| #include <mpi.h> | |
| int | |
| main(int argc, char **argv) { | |
| int rank = 0; | |
| MPI_Init(&argc, &argv); | |
| MPI_Comm_rank(MPI_COMM_WORLD, &rank); | |
| if (0 == rank) { | |
| int send_value = 12345; |
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
| #include <immintrin.h> | |
| extern __attribute__((aligned(64))) double z[1000000]; | |
| typedef double v8df __attribute__((vector_size(64))); | |
| typedef double v4df __attribute__((vector_size(32))); | |
| void | |
| func(int i, v4df &zl, v4df &zh){ | |
| v8df zi = _mm512_load_pd((double*)(z + i)); | |
| zl = _mm512_extractf64x4_pd(zi,0); | |
| zh = _mm512_extractf64x4_pd(zi,1); | |
| } |
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 | |
| force_sorted_z(void) { | |
| const int pn = particle_number; | |
| for (int i = 0; i < pn; i++) { | |
| const double qx_key = z[i][X]; | |
| const double qy_key = z[i][Y]; | |
| const double qz_key = z[i][Z]; | |
| const int np = number_of_partners[i]; | |
| double pfx = 0; | |
| double pfy = 0; |
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 | |
| force_sorted_z_intrin_swp(void) { | |
| const int pn = particle_number; | |
| const v8df vzero = _mm512_setzero_pd(); | |
| const v8df vcl2 = _mm512_set1_pd(CL2); | |
| const v8df vc24 = _mm512_set1_pd(24.0*dt); | |
| const v8df vc48 = _mm512_set1_pd(48.0*dt); | |
| const __m512i idx = _mm512_set_epi64(3,2,1,0,7,6,5,4); | |
| const __m512i idx_q = _mm512_set_epi64(11,10,9,8,3,2,1,0); | |
| const __m512i idx_p = _mm512_set_epi64(15,14,13,12,7,6,5,4); |