|
WarpX
|
#include <ShuffleFisherYates.H>
Public Member Functions | |
| IndependentPairHelper (int a_n_cells, index_type const *AMREX_RESTRICT a_cell_offsets_1, index_type const *AMREX_RESTRICT a_cell_offsets_2) | |
| Constructor. | |
| void | Initialize () |
| void | shuffle (index_type *AMREX_RESTRICT a_indices_1, index_type *AMREX_RESTRICT a_indices_2) |
| Shuffle the particles in each cell using the Fisher-Yates algorithm, for both species. | |
| int | numIndependentPairs () const |
| const index_type * | collisionOffsetsPtr () const |
Public Attributes | |
| int | m_n_cells |
| index_type const *AMREX_RESTRICT | m_cell_offsets_1 |
| index_type const *AMREX_RESTRICT | m_cell_offsets_2 |
| amrex::Gpu::DeviceVector< index_type > | m_n_ind_pairs_in_each_cell |
| amrex::Gpu::DeviceVector< index_type > | m_coll_offsets |
| int | m_n_independent_pairs |
|
inline |
Constructor.
| [in] | a_n_cells | the number of cells in this tile |
| [in] | a_cell_offsets_1 | the offset array storing the number of particles per cell for species 1 |
| [in] | a_cell_offsets_2 | the offset array storing the number of particles per cell for species 2 |
|
inlinenodiscard |
|
inline |
|
inlinenodiscard |
|
inline |
Shuffle the particles in each cell using the Fisher-Yates algorithm, for both species.
| [in,out] | a_indices_1 | the indices of the particles sorted by cell for species 1 |
| [in,out] | a_indices_2 | the indices of the particles sorted by cell for species 2 |
| index_type const* AMREX_RESTRICT IndependentPairHelper< index_type >::m_cell_offsets_1 |
| index_type const* AMREX_RESTRICT IndependentPairHelper< index_type >::m_cell_offsets_2 |
| amrex::Gpu::DeviceVector<index_type> IndependentPairHelper< index_type >::m_coll_offsets |
| int IndependentPairHelper< index_type >::m_n_cells |
| amrex::Gpu::DeviceVector<index_type> IndependentPairHelper< index_type >::m_n_ind_pairs_in_each_cell |
| int IndependentPairHelper< index_type >::m_n_independent_pairs |