STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::stmath::Condensate Class Reference

Condense the data format, and possibly offer a reduced representation of coordinates, along with work units detailing which systems should be imported by each block on a given GPU. More...

#include <condensate.h>

Public Member Functions

HybridFormat getFormat () const
 Get the memory layout of the object.
 
PrecisionModel getMode () const
 Get the compression mode.
 
StructureSource getBasis () const
 Get the basis for the coordinates in the object: synthesis or series.
 
int getSystemCount () const
 Get the number of systems found in the condensate.
 
bool ownsCoordinates () const
 Get an indication of whether the Condensate keeps its own copy of the coordinates.
 
size_t getAtomOffset (int system_index) const
 Get the starting index of atoms for one of the systems, using its index.
 
int getAtomCount (int system_index) const
 Get the number of atoms in one of the systems, using its index.
 
size_t getCoordinateSeriesTypeID () const
 Get the data type of the CoordinateSeries upon which this object is based.
 
template<typename T>
const CoordinateSeries< T > * getSeriesPointer () const
 Get a const pointer to the original coordinate series. The developer must supply the template type for the CoordinateSeries in order to re-interpret the arbitrarily stored <int> type for the CoordinateSeries pointer.
 
const PhaseSpaceSynthesisgetSynthesisPointer () const
 Get a const pointer to the original coordinate synthesis.
 
CoordinateFrame exportCoordinateFrame (int system_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Export a single frame as double-precision coordinates.
 
std::vector< double > getInterlacedCoordinates (int system_index, HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Produce the interlaced coordinates of a specific system. As is the case with other coordinate objects, this will not include the box transformation matrices.
 
const CondensategetSelfPointer () const
 Get a pointer to the original object, useful if a pointer is needed but the object was passed into a function by const reference.
 
const CondensateBorders borders (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the read-only summary of the system sizes. The data is never needed in as a collection of device viewable pointers to host-side data, as this information is constant as of the creation of the object and therefore consistent on both the CPU host and GPU device.
 
 Condensate (HybridFormat format_in=default_hpc_format)
 
 Condensate (const PhaseSpaceSynthesis *poly_ps_in, PrecisionModel mode_in, const GpuDetails &gpu=null_gpu)
 
 Condensate (const PhaseSpaceSynthesis &poly_ps_in, PrecisionModel mode_in, const GpuDetails &gpu=null_gpu)
 
template<typename T>
 Condensate (const CoordinateSeries< T > *cs_in, PrecisionModel mode_in, const GpuDetails &gpu=null_gpu)
 
template<typename T>
 Condensate (const CoordinateSeries< T > &cs_in, PrecisionModel mode_in, const GpuDetails &gpu=null_gpu)
 
 Condensate (const Condensate &original)
 Copy and move constructors as well as copy and move assignment operator overloads are defined in the code, but there is no copy constructor to create objects with a different memory format as the mechanics of the Condensate are more complex than those of other coordinate objects.
 
 Condensate (Condensate &&original)
 
Condensateoperator= (const Condensate &original)
 
Condensateoperator= (Condensate &&original)
 
const CondensateReader data (HybridTargetLevel tier=HybridTargetLevel::HOST) const
 Get the appropriate abstract based on the const-ness of the object.
 
CondensateWriter data (HybridTargetLevel tier=HybridTargetLevel::HOST)
 
void rebuild (const PhaseSpaceSynthesis *poly_ps_in, PrecisionModel mode_in=PrecisionModel::SINGLE, const GpuDetails &gpu=null_gpu)
 Rebuild the object using a different PhaseSpaceSynthesis or CoordinateSeries, and possibly a new compression mode.
 
void rebuild (const PhaseSpaceSynthesis &poly_ps_in, PrecisionModel mode_in=PrecisionModel::SINGLE, const GpuDetails &gpu=null_gpu)
 
template<typename T>
void rebuild (const CoordinateSeries< T > *cs_in, const PrecisionModel mode_in=PrecisionModel::SINGLE, const GpuDetails &gpu=null_gpu)
 
void update (HybridTargetLevel tier=HybridTargetLevel::HOST, const GpuDetails &gpu=null_gpu)
 Reload the coordinates based on an updated coordinate synthesis or series, without re-computing the block instructions or changing the compression level.
 
template<typename T>
void update (const CoordinateSeries< T > *cs_basis, HybridTargetLevel tier=HybridTargetLevel::HOST, const GpuDetails &gpu=null_gpu)
 
template<typename T>
void update (const CoordinateSeries< T > &cs_basis, HybridTargetLevel tier=HybridTargetLevel::HOST, const GpuDetails &gpu=null_gpu)
 

Detailed Description

Condense the data format, and possibly offer a reduced representation of coordinates, along with work units detailing which systems should be imported by each block on a given GPU.

Constructor & Destructor Documentation

◆ Condensate() [1/2]

stormm::synthesis::Condensate::Condensate ( HybridFormat format_in = default_hpc_format)

The constructor requires only a complete coordinate synthesis to build the entire object. The object can be rebuilt post-creation by providing a new PhaseSpaceSynthesis, or essentially erased by providing a nullptr to conserve memory. The memory format of a Condensate is determined by the PhaseSpaceSynthesis or CoordinateSeries object it serves.

Parameters
poly_ps_inThe coordinate synthesis
mode_inCompression mode to use
gpuDetails of the available GPU

◆ Condensate() [2/2]

stormm::synthesis::Condensate::Condensate ( const Condensate & original)

Copy and move constructors as well as copy and move assignment operator overloads are defined in the code, but there is no copy constructor to create objects with a different memory format as the mechanics of the Condensate are more complex than those of other coordinate objects.

Parameters
originalThe original object to copy or move
otherAnother object to fill the assignment statement's right-hand side

Member Function Documentation

◆ borders()

const CondensateBorders stormm::synthesis::Condensate::borders ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the read-only summary of the system sizes. The data is never needed in as a collection of device viewable pointers to host-side data, as this information is constant as of the creation of the object and therefore consistent on both the CPU host and GPU device.

Parameters
tierThe level (host or device) at which to get the set of pointers

◆ data()

const CondensateReader stormm::synthesis::Condensate::data ( HybridTargetLevel tier = HybridTargetLevel::HOST) const

Get the appropriate abstract based on the const-ness of the object.

Overloaded:

  • Get a reader for a const Condensate
  • Get a writer for a non-const Condensate (the writer can be quickly converted to a reader)
Parameters
tierObtain pointers at the level of the CPU host or the GPU device

◆ exportCoordinateFrame()

CoordinateFrame stormm::synthesis::Condensate::exportCoordinateFrame ( int system_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Export a single frame as double-precision coordinates.

Parameters
system_indexIndex of the system of interest
tierObtain information for the frame on the CPU host or the GPU device

◆ getAtomCount()

int stormm::synthesis::Condensate::getAtomCount ( int system_index) const

Get the number of atoms in one of the systems, using its index.

Parameters
system_indexIndex of the system of interest

◆ getAtomOffset()

size_t stormm::synthesis::Condensate::getAtomOffset ( int system_index) const

Get the starting index of atoms for one of the systems, using its index.

Parameters
system_indexIndex of the system of interest

◆ getInterlacedCoordinates()

std::vector< double > stormm::synthesis::Condensate::getInterlacedCoordinates ( int system_index,
HybridTargetLevel tier = HybridTargetLevel::HOST ) const

Produce the interlaced coordinates of a specific system. As is the case with other coordinate objects, this will not include the box transformation matrices.

Parameters
system_indexIndex of the system of interest
tierObtain information for the frame on the CPU host or the GPU device

◆ rebuild()

void stormm::synthesis::Condensate::rebuild ( const PhaseSpaceSynthesis * poly_ps_in,
PrecisionModel mode_in = PrecisionModel::SINGLE,
const GpuDetails & gpu = null_gpu )

Rebuild the object using a different PhaseSpaceSynthesis or CoordinateSeries, and possibly a new compression mode.

Parameters
poly_ps_inThe new coordinate synthesis
cs_inThe new coordinate series
mode_inCompression mode to use (data for any other mode in use will be cleared)
gpuDetails of the available GPU

◆ update()

void stormm::synthesis::Condensate::update ( HybridTargetLevel tier = HybridTargetLevel::HOST,
const GpuDetails & gpu = null_gpu )

Reload the coordinates based on an updated coordinate synthesis or series, without re-computing the block instructions or changing the compression level.

Overloaded::

  • Rely on internally stored pointers to the original coordinate objects
  • Supply a pointer or reference to the CoordinateSeries object, if applicable
Parameters
cs_basisThe original coordinate series (will be checked for validity)
tierObtain pointers at the level of the CPU host or the GPU device
gpuDetails of the available GPU

The documentation for this class was generated from the following files: