2#ifndef STORMM_COORDINATE_SWAP_H
3#define STORMM_COORDINATE_SWAP_H
7#include "Accelerator/card_utilities.h"
8#include "Accelerator/gpu_details.h"
9#include "Accelerator/hybrid.h"
10#include "Reporting/error_format.h"
11#include "Synthesis/condensate.h"
12#include "Synthesis/phasespace_synthesis.h"
13#include "Topology/atomgraph_enumerators.h"
14#include "coordinate_series.h"
15#include "coordinate_util.h"
20using card::GpuDetails;
21using card::HpcKernelSync;
23using card::HybridTargetLevel;
24using synthesis::Condensate;
25using synthesis::CondensateBorders;
26using synthesis::CondensateWriter;
27using synthesis::PhaseSpaceSynthesis;
28using synthesis::PsSynthesisBorders;
29using synthesis::PsSynthesisWriter;
30using topology::UnitCellType;
39void swapValidatePrecisionModels(
int first_bits,
int second_bits,
const char* desc);
59void swapValidateFrameIndices(
int frm_first,
int count_first,
int frm_second,
int count_second);
61void swapValidateFrameIndices(
const int2* frm_pairs,
int pair_count,
int count_first,
72void swapValidateUnitCells(UnitCellType uca, UnitCellType ucb);
87void swapCheckSameObject(
bool is_same,
const int2* frm_pairs,
int pair_count,
88 HybridTargetLevel tier_first, HybridTargetLevel tier_second);
103void swapValidateAtomCounts(
int natom_first,
int natom_second);
106void swapValidateAtomCounts(
int frm_first,
const T* natom_first,
int frm_second,
107 const T* natom_second);
110void swapValidateAtomCounts(
const int2* frm_pairs,
int pair_count,
const T* natom_first,
111 const T* natom_second);
158void swapCoordinates(T* first_x, T* first_y, T* first_z, T* second_x, T* second_y, T* second_z,
159 size_t first_ofs,
size_t second_ofs,
size_t natom,
size_t frm_first = 0,
160 size_t frm_second = 0,
int* first_xovrf =
nullptr,
int* first_yovrf =
nullptr,
161 int* first_zovrf =
nullptr,
int* second_xovrf =
nullptr,
162 int* second_yovrf =
nullptr,
int* second_zovrf =
nullptr,
163 double* first_umat =
nullptr,
double* first_invu =
nullptr,
164 double* first_bdim =
nullptr,
double* second_umat =
nullptr,
165 double* second_invu =
nullptr,
double* second_bdim =
nullptr);
168void swapCoordinates(T* first_x, T* first_y, T* first_z, T* second_x, T* second_y, T* second_z,
169 size_t first_ofs,
size_t second_ofs,
size_t natom,
size_t frm_first,
170 size_t frm_second,
double* first_umat,
double* first_invu,
double* first_bdim,
171 double* second_umat,
double* second_invu,
double* second_bdim);
179 const int2* frm_pairs,
int pair_count);
209 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
210 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
211 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
214 const int2* frm_pairs,
int pair_count,
size_t ct,
215 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
216 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
217 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
221 size_t frm_second, HybridTargetLevel tier_first = HybridTargetLevel::HOST,
222 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
223 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
228 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
229 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
230 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
235 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
236 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
237 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
242 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
243 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
244 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
247 int idx_second, HybridTargetLevel tier_first = HybridTargetLevel::HOST,
248 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
249 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
253 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
254 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
255 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
260 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
261 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
262 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
267 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
268 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
269 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
272 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
273 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
274 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
277 HybridTargetLevel tier_first = HybridTargetLevel::HOST,
278 HybridTargetLevel tier_second = HybridTargetLevel::HOST,
279 const GpuDetails &gpu = null_gpu, HpcKernelSync sync = HpcKernelSync::MEMORY_AUTO);
285#include "coordinate_swap.tpp"
Pertinent aspects of one particular GPU. Condensing the data for each GPU in this manner helps to ens...
Definition gpu_details.h:27
An evolution of GpuBuffer in pmemd.cuda, the Composite array has elements that are accessible from ei...
Definition hybrid.h:202
Condense the data format, and possibly offer a reduced representation of coordinates,...
Definition condensate.h:146
A fixed-precision representation of coordinates, velocities, and forces to manage a set of simulation...
Definition phasespace_synthesis.h:325
Store the coordinates and box information for a series of frames, in one of several levels of precisi...
Definition coordinate_series.h:137
A read-only abstract for the system demarcations in the object. This information is sometimes critica...
Definition condensate.h:43
Writeable abstract for the Condensate class, wherein coordinates (only) can be modified as a conseque...
Definition condensate.h:64
A read-only abstract for the system demarcations in the object. This information is sometimes critica...
Definition phasespace_synthesis.h:61
The writer for a PhaseSpaceSynthesis object, containing all of the data relevant for propagating dyna...
Definition phasespace_synthesis.h:87
Collect C-style pointers and critical constants for a writeable CoordinateSeries object.
Definition coordinate_series.h:66