![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <cstddef>#include <cstring>
Include dependency graph for packing.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| template<typename FloatType > | |
| void | fft_pack_block (FloatType const *const in, FloatType *const out, int const *start, int const *size, int const *dim, int element) |
Pack a 3D-block of size size starting at start of an input 3D-grid in with dimension dim into an output 3D-block out. | |
| template<typename FloatType > | |
| void | fft_unpack_block (FloatType const *const in, FloatType *const out, int const *start, int const *size, int const *dim, int element) |
Unpack a 3D-block in of size size into an output 3D-grid out of size dim starting at position start. | |
| void fft_pack_block | ( | FloatType const *const | in, |
| FloatType *const | out, | ||
| int const * | start, | ||
| int const * | size, | ||
| int const * | dim, | ||
| int | element | ||
| ) |
Pack a 3D-block of size size starting at start of an input 3D-grid in with dimension dim into an output 3D-block out.
The block is stored in 'row-major-order' or 'C-order', that means the first index is changing slowest when running through the linear array. The element (i0 (slow), i1 (mid), i2 (fast)) has the linear index li = i2 + size[2] * (i1 + (size[1] * i0)).
| [in] | in | pointer to input 3D-grid. |
| [out] | out | pointer to output 3D-block. |
| [in] | start | start index of the block in the input 3D-grid. |
| [in] | size | size of the output 3D-block. |
| [in] | dim | size of the input 3D-grid. |
| [in] | element | size of a grid element (e.g. 1 for Real, 2 for Complex). |
Definition at line 44 of file packing.hpp.
References stream.
Referenced by p3m_send_mesh< FloatType >::gather_grid(), fft::fft_data_struct< FloatType >::initialize_fft(), and p3m_send_mesh< FloatType >::spread_grid().
| void fft_unpack_block | ( | FloatType const *const | in, |
| FloatType *const | out, | ||
| int const * | start, | ||
| int const * | size, | ||
| int const * | dim, | ||
| int | element | ||
| ) |
Unpack a 3D-block in of size size into an output 3D-grid out of size dim starting at position start.
See also fft_pack_block.
| [in] | in | pointer to input 3D-block. |
| [out] | out | pointer to output 3D-grid. |
| [in] | start | start index of the block in the input 3D-grid. |
| [in] | size | size of the input 3D-block. |
| [in] | dim | size of the output 3D-grid. |
| [in] | element | size of a grid element (e.g. 1 for Real, 2 for Complex). |
Definition at line 83 of file packing.hpp.
References stream.
Referenced by p3m_send_mesh< FloatType >::spread_grid().