A simple pair list for an all-to-all calculation with exclusion masks. The list stores masks for 16 x 16 tiles of atoms indexed according to the atom order in some original topology. Each 16 x 16 tile mask will store the exclusions of 16 sending and 16 receiving atoms in the low 16 bits of an unsigned integer (probably 32-bit, but 16-bit format is also acceptable). The 16 x 16 tile masks are, in turn, arranged in groups of 16 x 16 such that each group of tiles covers the interactions of two consecutive sequences of 256 atoms apiece, for a total of 65,536 unique bits in 32kB (which counts the wasted high bits in each sending atom's mask as well as the reserved nature of the second sixteen bits). Many groups will have no exclusions at all, and these will all index into the first group stored in a master list. In this manner, a system of N atoms can have a complete pairlist constructed with ((N + 255) / 256)^2 super-tiles, with a storage requirement growing as N^2 but with a very small prefactor. With further hierarchical ordering, the pair list could even become O(N log N) in storage requirements. In the present scheme, simple pair lists can be built for very large systems if the exclusions are not spread throughout: a system of 131072 atoms with exclusions only between atoms +/-255 indices from one another would have space requirements of at most 52MB, probably much less. It is far better than the 2GB which would be required to store every exclusion as a unique bit.
More...
#include <static_exclusionmask.h>
|
int | getAtomCount () const |
| Get the total atom count.
|
|
int | getSuperTileStrideCount () const |
| Get the number of supertile strides that the system contains (how many groups of up to 256 atoms will this system break into?)
|
|
int | getTileStrideCount () const |
| Get the number of supertile strides that the system contains (how many groups of up to 16 atoms will this system break into?)
|
|
int | getUniqueSuperTileCount () const |
| Get the total number of unique mask super-tiles.
|
|
std::vector< uint > | getTileExclusions (int supertile_i_index, int supertile_j_index, int tile_i_index, int tile_j_index) const |
| Get the exclusion masks for sending atoms in a particular tile.
|
|
const AtomGraph * | getTopologyPointer () const |
| Return a pointer to the topology that built this exclusion mask.
|
|
const StaticExclusionMaskReader | data (HybridTargetLevel tier=HybridTargetLevel::HOST) const |
| Get the abstract for this exclusion mask object.
|
|
const StaticExclusionMask * | getSelfPointer () const |
| Get a pointer ot the object itself (useful when passing the object by const reference)
|
|
bool | testExclusion (int atom_i, int atom_j) const |
| Test whether some atom pair is an exclusion.
|
|
|
| StaticExclusionMask (const AtomGraph *ag_in=nullptr) |
| The constructor requires a topology, which will have lists of exclusions.
|
|
| StaticExclusionMask (const AtomGraph &ag_in) |
|
|
| StaticExclusionMask (const StaticExclusionMask &original)=default |
| The default copy and move constructors as well as the copy assignment operator will suffice for this object, which has no POINTER-kind Hybrid objects among its members.
|
|
| StaticExclusionMask (StaticExclusionMask &&original)=default |
|
StaticExclusionMask & | operator= (const StaticExclusionMask &other)=default |
|
StaticExclusionMask & | operator= (StaticExclusionMask &&other)=default |
|
|
int | getUniqueTileCount () const |
| Get the total number of unique tiles within a given super-tile.
|
|
int | getUniqueTileCount (int supertile_i_index, int supertile_j_index) const |
|
A simple pair list for an all-to-all calculation with exclusion masks. The list stores masks for 16 x 16 tiles of atoms indexed according to the atom order in some original topology. Each 16 x 16 tile mask will store the exclusions of 16 sending and 16 receiving atoms in the low 16 bits of an unsigned integer (probably 32-bit, but 16-bit format is also acceptable). The 16 x 16 tile masks are, in turn, arranged in groups of 16 x 16 such that each group of tiles covers the interactions of two consecutive sequences of 256 atoms apiece, for a total of 65,536 unique bits in 32kB (which counts the wasted high bits in each sending atom's mask as well as the reserved nature of the second sixteen bits). Many groups will have no exclusions at all, and these will all index into the first group stored in a master list. In this manner, a system of N atoms can have a complete pairlist constructed with ((N + 255) / 256)^2 super-tiles, with a storage requirement growing as N^2 but with a very small prefactor. With further hierarchical ordering, the pair list could even become O(N log N) in storage requirements. In the present scheme, simple pair lists can be built for very large systems if the exclusions are not spread throughout: a system of 131072 atoms with exclusions only between atoms +/-255 indices from one another would have space requirements of at most 52MB, probably much less. It is far better than the 2GB which would be required to store every exclusion as a unique bit.
◆ StaticExclusionMask()
stormm::energy::StaticExclusionMask::StaticExclusionMask |
( |
const AtomGraph * | ag_in = nullptr | ) |
|
The constructor requires a topology, which will have lists of exclusions.
- Parameters
-
ag_in | The topology to base this all-to-all pair list upon (fed in as a pointer so that a private member variable may retain a pointer to the original topology) |
◆ getTileExclusions()
std::vector< uint > stormm::energy::StaticExclusionMask::getTileExclusions |
( |
int | supertile_i_index, |
|
|
int | supertile_j_index, |
|
|
int | tile_i_index, |
|
|
int | tile_j_index ) const |
Get the exclusion masks for sending atoms in a particular tile.
- Parameters
-
supertile_i_index | The ith stretch of 256 atoms is interacting with the jth |
supertile_j_index | The jth stretch of 256 atoms is interacting with the ith |
tile_i_index | The ith group of 16 atoms within the supertile is sending to collect interactions |
tile_j_index | The jth group of 16 atoms within the supertile is receiving to collect interactions |
◆ getUniqueTileCount()
int stormm::energy::StaticExclusionMask::getUniqueTileCount |
( |
| ) |
const |
Get the total number of unique tiles within a given super-tile.
Overloaded:
- Get the total number of unique 16 x 16 atom tiles in all super-tiles (no arguments)
- Get the number of unique 16 x 16 atom tiles in a particular super-tile
- Parameters
-
supertile_i_index | The ith group of 256 atoms is sending to collect interactions |
supertile_j_index | The jth group of 256 atoms is receiving to collect interactions |
◆ testExclusion()
bool stormm::energy::StaticExclusionMask::testExclusion |
( |
int | atom_i, |
|
|
int | atom_j ) const |
Test whether some atom pair is an exclusion.
- Parameters
-
atom_i | The ith atom to test for a pair exclusion with atom_j |
atom_j | The jth atom to test for a pair exclusion with atom_i |
The documentation for this class was generated from the following files: