Debian Codegraph @

src/gromacs/nbnxm/pairlist.h

raw symbols SCIP
1 /*
2 * This file is part of the GROMACS molecular simulation package.
3 *
4 * Copyright 2012- The GROMACS Authors
5 * and the project initiators Erik Lindahl, Berk Hess and David van der Spoel.
6 * Consult the AUTHORS/COPYING files and https://www.gromacs.org for details.
7 *
8 * GROMACS is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1
11 * of the License, or (at your option) any later version.
12 *
13 * GROMACS is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with GROMACS; if not, see
20 * https://www.gnu.org/licenses, or write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 *
23 * If you want to redistribute modifications to GROMACS, please
24 * consider that scientific software is very special. Version
25 * control is crucial - bugs must be traceable. We will be happy to
26 * consider code for inclusion in the official distribution, but
27 * derived work must not be called official GROMACS. Details are found
28 * in the README & COPYING files - if they are missing, get the
29 * official version at https://www.gromacs.org.
30 *
31 * To help us fund GROMACS development, we humbly ask that you cite
32 * the research papers on the package. Check out https://www.gromacs.org.
33 */
34
35 #ifndef GMX_NBNXM_PAIRLIST_H
36 #define GMX_NBNXM_PAIRLIST_Hcxx . . $ `src/gromacs/nbnxm/pairlist.h:36:9`!
37
38 #include "config.h"cxx . . $ `<file>/build/src/include/config.h`/
39
40 #include <algorithm>
41 #include <iterator>
42 #include <memory>
43 #include <vector>
44
45 #include "gromacs/gpu_utils/hostallocator.h"cxx . . $ `<file>/src/gromacs/gpu_utils/hostallocator.h`/
46 #include "gromacs/utility/basedefinitions.h"cxx . . $ `<file>/api/legacy/include/gromacs/utility/basedefinitions.h`/
47 #include "gromacs/utility/defaultinitializationallocator.h"cxx . . $ `<file>/src/gromacs/utility/include/gromacs/utility/defaultinitializationallocator.h`/
48 #include "gromacs/utility/real.h"cxx . . $ `<file>/api/legacy/include/gromacs/utility/real.h`/
49
50 #include "nbnxm_enums.h"cxx . . $ `<file>/src/gromacs/nbnxm/nbnxm_enums.h`/
51
52 namespace gmxcxx . . $ gmx/
53 {
54 class AtomPairlistcxx . . $ gmx/AtomPairlist#;
55
56 //! Currently hard coded default GPU pairlist layout
57 static constexpr auto sc_layoutTypecxx . . $ gmx/sc_layoutType. = PairlistTypecxx . . $ gmx/PairlistType#::Hierarchical8x8x8cxx . . $ gmx/PairlistType#Hierarchical8x8x8.;
58
59 struct NbnxmPairlistCpuWorkcxx . . $ gmx/NbnxmPairlistCpuWork#;
60 struct NbnxmPairlistGpuWorkcxx . . $ gmx/NbnxmPairlistGpuWork#;
61
62 /*! \brief Cache-line protection buffer
63 *
64 * A buffer data structure of 64 bytes
65 * to be placed at the beginning and end of structs
66 * to avoid cache invalidation of the real contents
67 * of the struct by writes to neighboring memory.
68 */
69 typedef structcxx . . $ gmx/$anonymous_type_9c3bfab3a3ab2c85_0#
70 {
71 //! Unused field used to create space to protect cache lines that are in use
72 int dummycxx . . $ gmx/$anonymous_type_9c3bfab3a3ab2c85_0#dummy.[16];
73 } gmx_cache_protect_tcxx . . $ gmx/gmx_cache_protect_t#;
74
75 /*! \brief This is the actual cluster-pair list j-entry.
76 *
77 * cj is the j-cluster.
78 * The interaction bits in excl are indexed i-major, j-minor.
79 * The cj entries are sorted such that ones with exclusions come first.
80 * This means that once a full mask (=NBNXN_INTERACTION_MASK_ALL)
81 * is found, all subsequent j-entries in the i-entry also have full masks.
82 */
83 struct nbnxn_cj_tcxx . . $ gmx/nbnxn_cj_t#
84 {
85 //! The j-cluster
86 int cjcxx . . $ gmx/nbnxn_cj_t#cj.;
87 //! The exclusion (interaction) bits
88 unsigned int exclcxx . . $ gmx/nbnxn_cj_t#excl.;
89 };
90
91 //! Simple j-cluster list
92 class JClusterListcxx . . $ gmx/JClusterList#
93 {
94 public:
95 //! The list of packed j-cluster groups
96 FastVectorcxx . . $ gmx/FastVector#<nbnxn_cj_tcxx . . $ gmx/nbnxn_cj_t#> list_cxx . . $ gmx/JClusterList#list_.;
97
98 //! Return the j-cluster index for \c index from the pack list
99 int cjcxx . . $ gmx/JClusterList#cj(7ccb52b1bfe01045).(int index) const { return list_cxx . . $ gmx/JClusterList#list_.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).index].cjcxx . . $ gmx/nbnxn_cj_t#cj.; }
100 //! Return the exclusion mask for \c index
101 const unsigned int& exclcxx . . $ gmx/JClusterList#excl(8d42f596437b85f3).(int index) const { return list_cxx . . $ gmx/JClusterList#list_.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).index].exclcxx . . $ gmx/nbnxn_cj_t#excl.; }
102 //! Return the exclusion mask for \c index
103 unsigned int& exclcxx . . $ gmx/JClusterList#excl(2cc21ed9e4d86271).(int index) { return list_cxx . . $ gmx/JClusterList#list_.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).index].exclcxx . . $ gmx/nbnxn_cj_t#excl.; }
104 //! Return the size of the list (not the number of packed elements)
105 Indexcxx . . $ gmx/Index# sizecxx . . $ gmx/JClusterList#size(51018398d23244e3).() const noexcept { return list_cxx . . $ gmx/JClusterList#list_..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); }
106 //! Return whether the list is empty
107 bool emptycxx . . $ gmx/JClusterList#empty(3482b152b9333168).() const noexcept { return sizecxx . . $ gmx/JClusterList#size(51018398d23244e3).() == 0; }
108 //! Resize the list
109 void resizecxx . . $ gmx/JClusterList#resize(1624ee8275b10bda).(Indexcxx . . $ gmx/Index# count) { list_cxx . . $ gmx/JClusterList#list_..resizecxx . . $ std/vector#resize(2c44cd906ae4e829).(count); }
110 //! Add a new element to the list
111 void push_backcxx . . $ gmx/JClusterList#push_back(c41e37abb15f0f1a).(const decltypecxx . . $ std/vector#(list_)::value_typecxx . . $ std/vector#value_type#& value) { list_cxx . . $ gmx/JClusterList#list_..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(value); }
112 };
113
114 /*! \brief Constants for interpreting interaction flags
115 *
116 * In nbnxn_ci_t the integer shift contains the shift in the lower 7 bits.
117 * The upper bits contain information for non-bonded kernel optimization.
118 * Simply calculating LJ and Coulomb for all pairs in a cluster pair is fine.
119 * But three flags can be used to skip interactions, currently only for subc=0
120 * !(shift & NBNXN_CI_DO_LJ(subc)) => we can skip LJ for all pairs
121 * shift & NBNXN_CI_HALF_LJ(subc) => we can skip LJ for the second half of i
122 * !(shift & NBNXN_CI_DO_COUL(subc)) => we can skip Coulomb for all pairs
123 */
124 //! \{
125 #define NBNXN_CI_SHIFTcxx . . $ `src/gromacs/nbnxm/pairlist.h:125:9`! 127
126 #define NBNXN_CI_DO_LJcxx . . $ `src/gromacs/nbnxm/pairlist.h:126:9`!(subc) (1 << (7 + 3 * (subc)))
127 #define NBNXN_CI_HALF_LJcxx . . $ `src/gromacs/nbnxm/pairlist.h:127:9`!(subc) (1 << (8 + 3 * (subc)))
128 #define NBNXN_CI_DO_COULcxx . . $ `src/gromacs/nbnxm/pairlist.h:128:9`!(subc) (1 << (9 + 3 * (subc)))
129 //! \}
130
131 /*! \brief Cluster-pair Interaction masks
132 *
133 * Bit i*j-cluster-size + j tells if atom i and j interact.
134 */
135 //! \{
136 // TODO: Rename according to convention when moving into Nbnxn namespace
137 //! All interaction mask is the same for all kernels
138 constexpr unsigned int NBNXN_INTERACTION_MASK_ALLcxx . . $ gmx/NBNXN_INTERACTION_MASK_ALL. = 0xffffffffU;
139 //! \}
140
141 /*! \brief Lower limit for square interaction distances in nonbonded kernels.
142 *
143 * For smaller values we will overflow when calculating r^-1 or r^-12, but
144 * to keep it simple we always apply the limit from the tougher r^-12 condition.
145 */
146 #if GMX_DOUBLEcxx . . $ `<built-in>:487:9`!
147 // Some double precision SIMD architectures use single precision in the first
148 // step, so although the double precision criterion would allow smaller rsq,
149 // we need to stay in single precision with some margin for the N-R iterations.
150 constexpr double c_nbnxnMinDistanceSquared = 1.0e-36;
151 #else
152 // The worst intermediate value we might evaluate is r^-12, which
153 // means we should ensure r^2 stays above pow(GMX_FLOAT_MAX,-1.0/6.0)*1.01 (some margin)
154 constexpr float c_nbnxnMinDistanceSquaredcxx . . $ gmx/c_nbnxnMinDistanceSquared. = 3.82e-07F; // r > 6.2e-4
155 #endif
156
157 //! Returns the index of atom with index \p atomIndex within a split (or whole when not split) cluster-pair
158 template<PairlistTypecxx . . $ gmx/PairlistType# layoutType>
159 static inline int atomIndexInClusterpairSplitcxx . . $ gmx/atomIndexInClusterpairSplit(7864480464b09eea).(const int atomIndex)
160 {
161 constexpr int c_nbnxmClusterpairSplitSize =
162 detailcxx . . $ gmx/detail/::c_nbnxnGpuClusterSizecxx . . $ gmx/detail/c_nbnxnGpuClusterSize. / sc_gpuClusterPairSplitcxx . . $ gmx/sc_gpuClusterPairSplit(1bce82c046d487e4).(layoutType);
163
164 return atomIndex & (c_nbnxmClusterpairSplitSize - 1);
165 }
166
167 //! Whether we want to use GPU for neighbour list sorting
168 constexpr bool nbnxmSortListsOnGpucxx . . $ gmx/nbnxmSortListsOnGpu(c9857a73d68e59ba).()
169 {
170 return (GMX_GPUcxx . . $ `build/src/include/config.h:248:9`! && !GMX_GPU_OPENCLcxx . . $ `build/src/include/config.h:266:9`!);
171 }
172
173 /*! \internal
174 * \brief Simple pair-list i-unit
175 */
176 struct nbnxn_ci_tcxx . . $ gmx/nbnxn_ci_t#
177 {
178 //! i-cluster
179 int cicxx . . $ gmx/nbnxn_ci_t#ci.;
180 //! Shift vector index plus possible flags, see above
181 int shiftcxx . . $ gmx/nbnxn_ci_t#shift.;
182 //! Start index into cj
183 int cj_ind_startcxx . . $ gmx/nbnxn_ci_t#cj_ind_start.;
184 //! End index into cj
185 int cj_ind_endcxx . . $ gmx/nbnxn_ci_t#cj_ind_end.;
186 };
187
188 //! Grouped pair-list i-unit
189 struct nbnxn_sci_tcxx . . $ gmx/nbnxn_sci_t#
190 {
191 //! Returns the number of j-cluster groups in this entry
192 int numJClusterGroupscxx . . $ gmx/nbnxn_sci_t#numJClusterGroups(455f465bc33b4cdf).() const { return cjPackedEndcxx . . $ gmx/nbnxn_sci_t#cjPackedEnd. - cjPackedBegincxx . . $ gmx/nbnxn_sci_t#cjPackedBegin.; }
193
194 //! Check if two instances are the same.
195 bool operatorcxx . . $ gmx/nbnxn_sci_t#`operator==`(f82dfc629cbfcfc4).==(const nbnxn_sci_tcxx . . $ gmx/nbnxn_sci_t#& other) const
196 {
197 return scicxx . . $ gmx/nbnxn_sci_t#sci. == other.scicxx . . $ gmx/nbnxn_sci_t#sci. && shiftcxx . . $ gmx/nbnxn_sci_t#shift. == other.shiftcxx . . $ gmx/nbnxn_sci_t#shift. && cjPackedBegincxx . . $ gmx/nbnxn_sci_t#cjPackedBegin. == other.cjPackedBegincxx . . $ gmx/nbnxn_sci_t#cjPackedBegin.
198 && cjPackedEndcxx . . $ gmx/nbnxn_sci_t#cjPackedEnd. == other.cjPackedEndcxx . . $ gmx/nbnxn_sci_t#cjPackedEnd.;
199 }
200
201 //! i-super-cluster
202 int scicxx . . $ gmx/nbnxn_sci_t#sci.;
203 //! Shift vector index plus possible flags
204 int shiftcxx . . $ gmx/nbnxn_sci_t#shift.;
205 //! Start index into cjPacked
206 int cjPackedBegincxx . . $ gmx/nbnxn_sci_t#cjPackedBegin.;
207 //! End index into cjPacked (ie. one past the last element)
208 int cjPackedEndcxx . . $ gmx/nbnxn_sci_t#cjPackedEnd.;
209 };
210
211 //! Interaction data for a j-group for one warp
212 struct nbnxn_im_ei_tcxx . . $ gmx/nbnxn_im_ei_t#
213 {
214 //! The i-cluster interactions mask for 1 warp
215 unsigned int imaskcxx . . $ gmx/nbnxn_im_ei_t#imask. = 0U;
216 //! Index into the exclusion array for 1 warp, default index 0 which means no exclusions
217 int excl_indcxx . . $ gmx/nbnxn_im_ei_t#excl_ind. = 0;
218 //! Check if two instances are the same.
219 bool operatorcxx . . $ gmx/nbnxn_im_ei_t#`operator==`(f1e6395a8fded901).==(const nbnxn_im_ei_tcxx . . $ gmx/nbnxn_im_ei_t#& other) const
220 {
221 return imaskcxx . . $ gmx/nbnxn_im_ei_t#imask. == other.imaskcxx . . $ gmx/nbnxn_im_ei_t#imask. && excl_indcxx . . $ gmx/nbnxn_im_ei_t#excl_ind. == other.excl_indcxx . . $ gmx/nbnxn_im_ei_t#excl_ind.;
222 }
223 };
224
225 //! Packed j-cluster list element
226 struct nbnxn_cj_packed_tcxx . . $ gmx/nbnxn_cj_packed_t#
227 {
228 //! The packed j-clusters
229 int cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.[sc_gpuJgroupSizecxx . . $ gmx/sc_gpuJgroupSize(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.)];
230 //! The i-cluster mask data for 2 warps
231 nbnxn_im_ei_tcxx . . $ gmx/nbnxn_im_ei_t# imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.[sc_gpuClusterPairSplitcxx . . $ gmx/sc_gpuClusterPairSplit(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.)];
232 //! Check if two instances are the same.
233 bool operatorcxx . . $ gmx/nbnxn_cj_packed_t#`operator==`(17d77bde360b244d).==(const nbnxn_cj_packed_tcxx . . $ gmx/nbnxn_cj_packed_t#& other) const
234 {
235 return stdcxx . . $ std/::equalcxx . . $ std/equal(51c87e3d44d61bd6).(stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.), stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(other.imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(other.imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.))
236 && stdcxx . . $ std/::equalcxx . . $ std/equal(51c87e3d44d61bd6).(stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.), stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(other.cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(other.cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.));
237 }
238 };
239
240 /*! \brief Packed j-cluster list
241 *
242 * Four j-cluster indices are stored per integer in an nbnxn_cj_packed_t.
243 */
244 class PackedJClusterListcxx . . $ gmx/PackedJClusterList#
245 {
246 public:
247 explicit PackedJClusterListcxx . . $ gmx/PackedJClusterList#PackedJClusterList(6f75f4d4119f2c6).(const PinningPolicycxx . . $ gmx/PinningPolicy# pinningPolicy) : list_cxx . . $ std/vector#vector(9619226211e5a241).({cxx . . $ std/initializer_list#initializer_list(ced63f7c635d850d).}, {cxx . . $ gmx/Allocator#Allocator(3496de05b827211c). pinningPolicycxx . . $ gmx/HostAllocationPolicy#HostAllocationPolicy(56564b18d9e75577). }) {}
248 //! The list of packed j-cluster groups
249 HostVectorcxx . . $ gmx/HostVector#<nbnxn_cj_packed_tcxx . . $ gmx/nbnxn_cj_packed_t#> list_cxx . . $ gmx/PackedJClusterList#list_.;
250 //! Return the j-cluster index for \c index from the pack list
251 int cjcxx . . $ gmx/PackedJClusterList#cj(7ccb52b1bfe01045).(const int index) const
252 {
253 return list_cxx . . $ gmx/PackedJClusterList#list_.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).index / sc_gpuJgroupSizecxx . . $ gmx/sc_gpuJgroupSize(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.)].cjcxx . . $ gmx/nbnxn_cj_packed_t#cj.[index & (sc_gpuJgroupSizecxx . . $ gmx/sc_gpuJgroupSize(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.) - 1)];
254 }
255 //! Return the i-cluster interaction mask for the first cluster in \c index
256 unsigned int imask0cxx . . $ gmx/PackedJClusterList#imask0(2de5caacea52532e).(const int index) const
257 {
258 return list_cxx . . $ gmx/PackedJClusterList#list_.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).index / sc_gpuJgroupSizecxx . . $ gmx/sc_gpuJgroupSize(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.)].imeicxx . . $ gmx/nbnxn_cj_packed_t#imei.[0].imaskcxx . . $ gmx/nbnxn_im_ei_t#imask.;
259 }
260 //! Return the size of the list (not the number of packed elements)
261 Indexcxx . . $ gmx/Index# sizecxx . . $ gmx/PackedJClusterList#size(51018398d23244e3).() const noexcept { return list_cxx . . $ gmx/PackedJClusterList#list_..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); }
262 //! Return whether the list is empty
263 bool emptycxx . . $ gmx/PackedJClusterList#empty(3482b152b9333168).() const noexcept { return sizecxx . . $ gmx/PackedJClusterList#size(51018398d23244e3).() == 0; }
264 //! Resize the packed list
265 void resizecxx . . $ gmx/PackedJClusterList#resize(1624ee8275b10bda).(Indexcxx . . $ gmx/Index# count) { list_cxx . . $ gmx/PackedJClusterList#list_..resizecxx . . $ std/vector#resize(2c44cd906ae4e829).(count); }
266 //! Add a new element to the packed list
267 void push_backcxx . . $ gmx/PackedJClusterList#push_back(df466a38f94de0dd).(const decltypecxx . . $ std/vector#(list_)::value_typecxx . . $ std/vector#value_type#& value) { list_cxx . . $ gmx/PackedJClusterList#list_..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(value); }
268 };
269
270 //! Struct for storing the atom-pair interaction bits for a cluster pair in a GPU pairlist
271 struct nbnxn_excl_tcxx . . $ gmx/nbnxn_excl_t#
272 {
273 //! Constructor, sets no exclusions, so all atom pairs interacting
274 MSVC_DIAGNOSTIC_IGNOREcxx . . $ `api/legacy/include/gromacs/utility/basedefinitions.h:217:13`!(26495) // pair is not being initialized!
275 nbnxn_excl_tcxx . . $ gmx/nbnxn_excl_t#nbnxn_excl_t(49f6e7a06ebc5aa8).()
276 {
277 for (unsigned int& pairEntry : paircxx . . $ gmx/nbnxn_excl_t#pair.)
278 {
279 pairEntry = NBNXN_INTERACTION_MASK_ALLcxx . . $ gmx/NBNXN_INTERACTION_MASK_ALL.;
280 }
281 }
282 MSVC_DIAGNOSTIC_RESETcxx . . $ `api/legacy/include/gromacs/utility/basedefinitions.h:219:13`!
283
284 //! Topology exclusion interaction bits per warp
285 unsigned int paircxx . . $ gmx/nbnxn_excl_t#pair.[sc_gpuExclSizecxx . . $ gmx/sc_gpuExclSize(1bce82c046d487e4).(sc_layoutTypecxx . . $ gmx/sc_layoutType.)];
286 //! Check if two instances are the same.
287 bool operatorcxx . . $ gmx/nbnxn_excl_t#`operator==`(642b8540ef5b9de2).==(const nbnxn_excl_tcxx . . $ gmx/nbnxn_excl_t#& other) const
288 {
289 return stdcxx . . $ std/::equalcxx . . $ std/equal(51c87e3d44d61bd6).(stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(paircxx . . $ gmx/nbnxn_excl_t#pair.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(paircxx . . $ gmx/nbnxn_excl_t#pair.), stdcxx . . $ std/::begincxx . . $ std/begin(a8ca795d3c997dbe).(other.paircxx . . $ gmx/nbnxn_excl_t#pair.), stdcxx . . $ std/::endcxx . . $ std/end(a8ca795d3c997dbe).(other.paircxx . . $ gmx/nbnxn_excl_t#pair.));
290 }
291 };
292
293 //! Cluster pairlist type for use on CPUs
294 struct NbnxnPairlistCpucxx . . $ gmx/NbnxnPairlistCpu#
295 {
296 NbnxnPairlistCpucxx . . $ gmx/NbnxnPairlistCpu#NbnxnPairlistCpu(d4f767463ce0a6b3).(int iClusterSize);
297
298 //! Cache protection
299 gmx_cache_protect_tcxx . . $ gmx/gmx_cache_protect_t# cp0cxx . . $ gmx/NbnxnPairlistCpu#cp0.;
300
301 //! The number of atoms per i-cluster
302 int na_cicxx . . $ gmx/NbnxnPairlistCpu#na_ci.;
303 //! The number of atoms per j-cluster
304 int na_cjcxx . . $ gmx/NbnxnPairlistCpu#na_cj.;
305 //! The radius for constructing the list
306 realcxx . . $ real# rlistcxx . . $ gmx/NbnxnPairlistCpu#rlist.;
307 //! The i-cluster list
308 FastVectorcxx . . $ gmx/FastVector#<nbnxn_ci_tcxx . . $ gmx/nbnxn_ci_t#> cicxx . . $ gmx/NbnxnPairlistCpu#ci.;
309 //! The outer, unpruned i-cluster list
310 FastVectorcxx . . $ gmx/FastVector#<nbnxn_ci_tcxx . . $ gmx/nbnxn_ci_t#> ciOutercxx . . $ gmx/NbnxnPairlistCpu#ciOuter.;
311
312 //! The j-cluster list
313 JClusterListcxx . . $ gmx/JClusterList# cjcxx . . $ gmx/NbnxnPairlistCpu#cj.;
314 //! The outer, unpruned j-cluster list
315 FastVectorcxx . . $ gmx/FastVector#<nbnxn_cj_tcxx . . $ gmx/nbnxn_cj_t#> cjOutercxx . . $ gmx/NbnxnPairlistCpu#cjOuter.;
316 //! The number of j-clusters that are used by ci entries in this list, will be <= cj.list.size()
317 int ncjInUsecxx . . $ gmx/NbnxnPairlistCpu#ncjInUse.;
318
319 //! Working data storage for list construction
320 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<NbnxmPairlistCpuWorkcxx . . $ gmx/NbnxmPairlistCpuWork#> workcxx . . $ gmx/NbnxnPairlistCpu#work.;
321
322 //! Cache protection
323 gmx_cache_protect_tcxx . . $ gmx/gmx_cache_protect_t# cp1cxx . . $ gmx/NbnxnPairlistCpu#cp1.;
324 };
325
326 /* Cluster pairlist type, with extra hierarchies, for on the GPU
327 *
328 * NOTE: for better performance when combining lists over threads,
329 * all vectors should use default initialization. But when
330 * changing this, excl should be initialized when adding entries.
331 */
332 struct NbnxnPairlistGpucxx . . $ gmx/NbnxnPairlistGpu#
333 {
334 /*! \brief Constructor
335 *
336 * \param[in] pinningPolicy Sets the pinning policy for all buffers used on the GPU
337 */
338 NbnxnPairlistGpucxx . . $ gmx/NbnxnPairlistGpu#NbnxnPairlistGpu(6f75f4d4119f2c6).(PinningPolicycxx . . $ gmx/PinningPolicy# pinningPolicy);
339
340 //! Cache protection
341 gmx_cache_protect_tcxx . . $ gmx/gmx_cache_protect_t# cp0cxx . . $ gmx/NbnxnPairlistGpu#cp0.;
342
343 //! The number of atoms per i-cluster
344 int na_cicxx . . $ gmx/NbnxnPairlistGpu#na_ci.;
345 //! The number of atoms per j-cluster
346 int na_cjcxx . . $ gmx/NbnxnPairlistGpu#na_cj.;
347 //! The number of atoms per super cluster
348 int na_sccxx . . $ gmx/NbnxnPairlistGpu#na_sc.;
349 //! The radius for constructing the list
350 realcxx . . $ real# rlistcxx . . $ gmx/NbnxnPairlistGpu#rlist.;
351 //! The i-super-cluster list, indexes into cjPacked list;
352 HostVectorcxx . . $ gmx/HostVector#<nbnxn_sci_tcxx . . $ gmx/nbnxn_sci_t#> scicxx . . $ gmx/NbnxnPairlistGpu#sci.;
353 //! The list of packed j-cluster groups
354 PackedJClusterListcxx . . $ gmx/PackedJClusterList# cjPackedcxx . . $ gmx/NbnxnPairlistGpu#cjPacked.;
355 //! Atom interaction bits (non-exclusions)
356 HostVectorcxx . . $ gmx/HostVector#<nbnxn_excl_tcxx . . $ gmx/nbnxn_excl_t#> exclcxx . . $ gmx/NbnxnPairlistGpu#excl.;
357 //! The total number of i-clusters
358 int nci_totcxx . . $ gmx/NbnxnPairlistGpu#nci_tot.;
359
360 //! Working data storage for list construction
361 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<NbnxmPairlistGpuWorkcxx . . $ gmx/NbnxmPairlistGpuWork#> workcxx . . $ gmx/NbnxnPairlistGpu#work.;
362
363 //! Cache protection
364 gmx_cache_protect_tcxx . . $ gmx/gmx_cache_protect_t# cp1cxx . . $ gmx/NbnxnPairlistGpu#cp1.;
365 };
366
367 } // namespace gmx
368
369 #endif