Skip to content

Commit

Permalink
moved decl for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Jan 9, 2020
1 parent 72c5bd5 commit 7114c75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clib/pio_rearrange.c
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,9 @@ box_rearrange_create(iosystem_desc_t *ios, int maplen, const PIO_Offset *compmap
PLOG((3, "start[%d] = %lld count[%d] = %lld", d, start[d], d, count[d]));
#endif /* PIO_ENABLE_LOGGING */

/* Moved this outside of loop over maplen, for performance. */
PIO_Offset lcoord[ndims];

/* For each element of the data array on the compute task,
* find the IO task to send the data element to, and its
* offset into the global data array. */
Expand All @@ -1437,7 +1440,6 @@ box_rearrange_create(iosystem_desc_t *ios, int maplen, const PIO_Offset *compmap
if (dest_ioproc[k] >= 0)
continue;

PIO_Offset lcoord[ndims];
bool found = true;

/* Find a destination for each entry in the compmap. */
Expand Down

0 comments on commit 7114c75

Please sign in to comment.