Skip to content
Snippets Groups Projects
Commit a88f4f9c authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

relax pre-fetching a bit.

Former-commit-id: dcbac2f4ed0c6d3738bbf60e731794465fd2f9e2
parent 8a60d2cd
No related branches found
No related tags found
No related merge requests found
......@@ -532,17 +532,11 @@ void runner_dokick2 ( struct runner *r , struct cell *c ) {
TIMER_TIC
/* Loop over the particles and kick them. */
__builtin_prefetch( &parts[0] , 0 , 1 );
__builtin_prefetch( &parts[0].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[1] , 0 , 1 );
__builtin_prefetch( &parts[1].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[2] , 0 , 1 );
__builtin_prefetch( &parts[2].rho_dh , 0 , 1 );
for ( k = 0 ; k < nr_parts ; k++ ) {
/* Get a handle on the part. */
__builtin_prefetch( &parts[k+3] , 0 , 1 );
__builtin_prefetch( &parts[k+3].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[k+1] , 0 , 1 );
__builtin_prefetch( &xparts[k+1] , 0 , 1 );
p = &parts[k];
xp = &xparts[k];
......@@ -649,17 +643,11 @@ void runner_dokick1 ( struct runner *r , struct cell *c ) {
dx_max = 0.0f;
/* Loop over parts. */
__builtin_prefetch( &parts[0] , 0 , 1 );
__builtin_prefetch( &parts[0].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[1] , 0 , 1 );
__builtin_prefetch( &parts[1].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[2] , 0 , 1 );
__builtin_prefetch( &parts[2].rho_dh , 0 , 1 );
for ( k = 0 ; k < c->count ; k++ ) {
/* Get a handle on the kth particle. */
__builtin_prefetch( &parts[k+3] , 0 , 1 );
__builtin_prefetch( &parts[k+3].rho_dh , 0 , 1 );
__builtin_prefetch( &parts[k+1] , 0 , 1 );
__builtin_prefetch( &xparts[k+1] , 0 , 1 );
p = &parts[k];
xp = &xparts[k];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment