2#ifndef STORMM_SIMPLE_EXCLUSIONMASK_H
3#define STORMM_SIMPLE_EXCLUSIONMASK_H
7#include "Accelerator/hybrid.h"
8#include "DataTypes/common_types.h"
9#include "Topology/atomgraph.h"
15using card::HybridTargetLevel;
16using topology::AtomGraph;
20constexpr int max_supertile_count = 46300;
23constexpr int max_unique_tiles = 67108864;
26constexpr int supertile_length = 256;
30constexpr int tile_length = 16;
31constexpr int half_tile_length = tile_length / 2;
32constexpr int three_halves_tile_length = (tile_length * 3) / 2;
33constexpr int tile_length_bits_mask = tile_length - 1;
34constexpr int tile_length_bits = 4;
38constexpr int tile_lengths_per_supertile = supertile_length / tile_length;
41constexpr int tiles_per_supertile = tile_lengths_per_supertile * tile_lengths_per_supertile;
49 const int* supertile_map_idx_in,
const int* tile_map_idx_in,
50 const uint* mask_data_in);
137 std::vector<uint>
getTileExclusions(
int supertile_i_index,
int supertile_j_index,
138 int tile_i_index,
int tile_j_index)
const;
165 int supertile_stride_count;
167 int tile_stride_count;
169 int unique_supertile_count;
172 int unique_tile_count;
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
StaticExclusionMask(const StaticExclusionMask &original)=default
The default copy and move constructors as well as the copy assignment operator will suffice for this ...
int getUniqueTileCount() const
Get the total number of unique tiles within a given super-tile.
Definition static_exclusionmask.cpp:297
int getAtomCount() const
Get the total atom count.
Definition static_exclusionmask.cpp:277
const StaticExclusionMaskReader data(HybridTargetLevel tier=HybridTargetLevel::HOST) const
Get the abstract for this exclusion mask object.
Definition static_exclusionmask.cpp:342
bool testExclusion(int atom_i, int atom_j) const
Test whether some atom pair is an exclusion.
Definition static_exclusionmask.cpp:370
int getUniqueSuperTileCount() const
Get the total number of unique mask super-tiles.
Definition static_exclusionmask.cpp:292
StaticExclusionMask(const AtomGraph *ag_in=nullptr)
The constructor requires a topology, which will have lists of exclusions.
Definition static_exclusionmask.cpp:21
const StaticExclusionMask * getSelfPointer() const
Get a pointer ot the object itself (useful when passing the object by const reference)
Definition static_exclusionmask.cpp:349
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.
Definition static_exclusionmask.cpp:327
const AtomGraph * getTopologyPointer() const
Return a pointer to the topology that built this exclusion mask.
Definition static_exclusionmask.cpp:337
int getSuperTileStrideCount() const
Get the number of supertile strides that the system contains (how many groups of up to 256 atoms will...
Definition static_exclusionmask.cpp:282
int getTileStrideCount() const
Get the number of supertile strides that the system contains (how many groups of up to 16 atoms will ...
Definition static_exclusionmask.cpp:287
A struct to hold information relating to an Amber topology. This struct's member functions are limite...
Definition atomgraph.h:50
The abstract for a StaticExclusionMask object, read-only due to the const-ness of the data() member f...
Definition static_exclusionmask.h:45
const int * tile_map_idx
Definition static_exclusionmask.h:57
StaticExclusionMaskReader(int natom_in, int supertile_stride_count_in, const int *supertile_map_idx_in, const int *tile_map_idx_in, const uint *mask_data_in)
Constructor works as any other abstract, taking a list of relevant constants and pointers.
Definition static_exclusionmask.cpp:11
const int supertile_stride_count
Number of supertiles in the system.
Definition static_exclusionmask.h:53
const int * supertile_map_idx
Definition static_exclusionmask.h:54
const uint * mask_data
The actual exclusion mask data.
Definition static_exclusionmask.h:60
const int natom
Number of atoms in the system.
Definition static_exclusionmask.h:52