From da17a015c7636e7adcd80ef480b841343230b7b2 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Mon, 23 Jul 2018 06:12:45 -0400 Subject: [PATCH] Pack the stencil smaller for 128 bit access --- lib/stencil/Stencil.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/stencil/Stencil.h b/lib/stencil/Stencil.h index 181c9f7c..8eee302a 100644 --- a/lib/stencil/Stencil.h +++ b/lib/stencil/Stencil.h @@ -94,13 +94,20 @@ void Gather_plane_exchange_table(std::vector >& table,const L } struct StencilEntry { - uint64_t _offset; - uint64_t _byte_offset; - uint16_t _is_local; - uint16_t _permute; - uint16_t _around_the_world; //256 bits, 32 bytes, 1/2 cacheline - uint16_t _pad; +#ifdef GRID_NVCC + uint64_t _byte_offset; // 8 bytes + uint32_t _offset; // 8 bytes +#else + uint64_t _byte_offset; // 8 bytes + uint64_t _offset; // 4 bytes (8 ever required?) +#endif + uint8_t _is_local; // 1 bytes + uint8_t _permute; // 1 bytes + uint8_t _around_the_world; // 1 bytes + uint8_t _pad; // 1 bytes }; +// Could pack to 8 + 4 + 4 = 128 bit and use + template class CartesianStencilView { public: