Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::rdme::CudaIntLattice Class Reference

#include <CudaIntLattice.h>

Inheritance diagram for lm::rdme::CudaIntLattice:
[legend]
Collaboration diagram for lm::rdme::CudaIntLattice:
[legend]

Public Member Functions

 CudaIntLattice (lattice_coord_t size, si_dist_t spacing, uint particlesPerSite)
 CudaIntLattice (lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, si_dist_t spacing, uint particlesPerSite)
virtual ~CudaIntLattice ()
virtual void copyToGPU ()
virtual void copyFromGPU ()
virtual void * getGPUMemorySrc ()
virtual void * getGPUMemoryDest ()
virtual void swapSrcDest ()
virtual void * getGPUMemorySiteTypes ()
virtual void setSiteType (lattice_size_t x, lattice_size_t y, lattice_size_t z, site_t site)
 Set the site type at the specified location.
virtual void setSiteType (lattice_size_t index, site_t site)
 Set the site type at the specified location.
virtual void addParticle (lattice_size_t x, lattice_size_t y, lattice_size_t z, particle_t particle)
 Add a particle to the specified site.
virtual void addParticle (lattice_size_t index, particle_t particle)
 Add a particle to the specified site.
virtual void removeParticles (lattice_size_t x, lattice_size_t y, lattice_size_t z)
 Remove a particle to the specified site.
virtual void removeParticles (lattice_size_t index)
 Remove a particle to the specified site.
virtual void removeAllParticles ()
 Empty all particles from the specified site.
virtual void setFromRowMajorByteData (void *buffer, size_t bufferSize)
Public Member Functions inherited from lm::rdme::IntLattice
virtual site_t getMaxSiteType () const
 Get the maximum number of site types possible in the lattice.
virtual particle_t getMaxParticle () const
 Get the maximum number of particle types possible in the lattice.
virtual site_size_t getMaxOccupancy () const
 Get the maximum number of particles that can live in a site.
 IntLattice (lattice_coord_t size, si_dist_t spacing, uint particlesPerSite)
 IntLattice (lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, si_dist_t spacing, uint particlesPerSite)
virtual ~IntLattice ()
virtual void getNeighboringSites (lattice_size_t index, lattice_size_t *neighboringIndices)
 Get the sites that are neighbor to the indicated site.
virtual site_t getSiteType (lattice_size_t x, lattice_size_t y, lattice_size_t z) const
 Get the site type at the specified location.
virtual site_t getSiteType (lattice_size_t index) const
 Get the site type at the specified location.
virtual void * getSiteTypes ()
virtual site_size_t getOccupancy (lattice_size_t x, lattice_size_t y, lattice_size_t z) const
 Get the number of particles in the specified lattice site.
virtual site_size_t getOccupancy (lattice_size_t subvolume) const
 Get the number of particles in the specified lattice site.
virtual particle_t getParticle (lattice_size_t x, lattice_size_t y, lattice_size_t z, site_size_t particleIndex) const
 Get the particle at the specified site with at the specified number in the particle list.
virtual particle_t getParticle (lattice_size_t subvolume, site_size_t particleIndex) const
 Get the particle at the specified site with at the specified number in the particle list.
virtual std::map< particle_t, uintgetParticleCounts ()
 Get the number of each particle type in the lattice.
virtual std::vector< particle_loc_tfindParticles (particle_t minParticleType, particle_t maxParticleType)
 Get the number of the specified particles types in the lattice.
virtual void setFromRowMajorData (void *buffer, size_t bufferSize)
virtual void setSitesFromRowMajorByteData (void *buffer, size_t bufferSize)
virtual void getParticleLatticeView (uint32_t **particleLattice, int *Nw, int *Nz, int *Ny, int *Nx, int *Np)
virtual void getSiteLatticeView (uint8_t **siteLattice, int *Nz, int *Ny, int *Nx)
virtual size_t getLatticeMemorySize () const
Public Member Functions inherited from lm::rdme::Lattice
 Lattice (lattice_coord_t size, si_dist_t spacing)
 Create a Lattice object.
 Lattice (lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, si_dist_t spacing)
 Create a Lattice object.
virtual ~Lattice ()
 Destroy the Lattice object.
virtual lattice_coord_t getSize () const
 Get size of the Lattice.
virtual lattice_size_t getXSize () const
 Get x dimension of the Lattice.
virtual lattice_size_t getYSize () const
 Get y dimension of the Lattice.
virtual lattice_size_t getZSize () const
 Get z dimension of the Lattice.
virtual lattice_size_t getNumberSites () const
 Get total number of sites in the Lattice.
virtual si_dist_t getSpacing () const
 Get spacing between lattice sites.
std::vector< lattice_coord_tgetNearbySites (lattice_size_t xc, lattice_size_t yc, lattice_size_t zc, uint minDistance, uint maxDistance)
 Get a list of sites near the specified site within a certain distance.
virtual void print () const
 Print the lattice to the console.

Protected Member Functions

virtual void allocateCudaMemory ()
virtual void deallocateCudaMemory ()
Protected Member Functions inherited from lm::rdme::IntLattice
virtual void allocateMemory ()
virtual void deallocateMemory ()
virtual uint32_t * getParticlesMemory ()
virtual uint8_t * getSitesMemory ()

Protected Attributes

uint cudaParticlesCurrent
size_t cudaParticlesSize
void * cudaParticles [2]
size_t cudaSiteTypesSize
void * cudaSiteTypes
bool isGPUMemorySynched
Protected Attributes inherited from lm::rdme::IntLattice
uint wordsPerSite
uint32_t * particles
uint8_t * siteTypes
Protected Attributes inherited from lm::rdme::Lattice
lattice_coord_t size
lattice_size_t numberSites
si_dist_t spacing

Additional Inherited Members

Static Public Member Functions inherited from lm::rdme::IntLattice
static void nativeSerialize (void *destBuffer, void *lattice, size_t latticeSize)
static void copyNativeToRowMajor (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, uint particlesPerSite, size_t bufferSize)
static void copyRowMajorToNative (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, uint particlesPerSite, size_t bufferSize)
static void copySitesRowMajorByteToNative (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, size_t bufferSize)
Static Public Member Functions inherited from lm::rdme::Lattice
static void rowMajorByteSerialize (void *destBuffer, void *lattice, size_t bufferSize)
static void rowMajorIntSerialize (void *destBuffer, void *lattice, size_t bufferSize)
static void rowMajorByteSerializeSites (void *destBuffer, void *lattice, size_t bufferSize)

Constructor & Destructor Documentation

◆ CudaIntLattice() [1/2]

lm::rdme::CudaIntLattice::CudaIntLattice ( lattice_coord_t size,
si_dist_t spacing,
uint particlesPerSite )

◆ CudaIntLattice() [2/2]

lm::rdme::CudaIntLattice::CudaIntLattice ( lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
si_dist_t spacing,
uint particlesPerSite )

◆ ~CudaIntLattice()

virtual lm::rdme::CudaIntLattice::~CudaIntLattice ( )
virtual

Member Function Documentation

◆ addParticle() [1/2]

virtual void lm::rdme::CudaIntLattice::addParticle ( lattice_size_t index,
particle_t particle )
virtual

Add a particle to the specified site.

Reimplemented from lm::rdme::IntLattice.

◆ addParticle() [2/2]

virtual void lm::rdme::CudaIntLattice::addParticle ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z,
particle_t particle )
virtual

Add a particle to the specified site.

Reimplemented from lm::rdme::IntLattice.

◆ allocateCudaMemory()

virtual void lm::rdme::CudaIntLattice::allocateCudaMemory ( )
protectedvirtual

◆ copyFromGPU()

virtual void lm::rdme::CudaIntLattice::copyFromGPU ( )
virtual

◆ copyToGPU()

virtual void lm::rdme::CudaIntLattice::copyToGPU ( )
virtual

◆ deallocateCudaMemory()

virtual void lm::rdme::CudaIntLattice::deallocateCudaMemory ( )
protectedvirtual

◆ getGPUMemoryDest()

virtual void * lm::rdme::CudaIntLattice::getGPUMemoryDest ( )
virtual

◆ getGPUMemorySiteTypes()

virtual void * lm::rdme::CudaIntLattice::getGPUMemorySiteTypes ( )
virtual

◆ getGPUMemorySrc()

virtual void * lm::rdme::CudaIntLattice::getGPUMemorySrc ( )
virtual

◆ removeAllParticles()

virtual void lm::rdme::CudaIntLattice::removeAllParticles ( )
virtual

Empty all particles from the specified site.

Reimplemented from lm::rdme::IntLattice.

◆ removeParticles() [1/2]

virtual void lm::rdme::CudaIntLattice::removeParticles ( lattice_size_t index)
virtual

Remove a particle to the specified site.

Reimplemented from lm::rdme::IntLattice.

◆ removeParticles() [2/2]

virtual void lm::rdme::CudaIntLattice::removeParticles ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z )
virtual

Remove a particle to the specified site.

Reimplemented from lm::rdme::IntLattice.

◆ setFromRowMajorByteData()

virtual void lm::rdme::CudaIntLattice::setFromRowMajorByteData ( void * buffer,
size_t bufferSize )
virtual

Reimplemented from lm::rdme::IntLattice.

◆ setSiteType() [1/2]

virtual void lm::rdme::CudaIntLattice::setSiteType ( lattice_size_t index,
site_t site )
virtual

Set the site type at the specified location.

Reimplemented from lm::rdme::IntLattice.

◆ setSiteType() [2/2]

virtual void lm::rdme::CudaIntLattice::setSiteType ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z,
site_t site )
virtual

Set the site type at the specified location.

Reimplemented from lm::rdme::IntLattice.

◆ swapSrcDest()

virtual void lm::rdme::CudaIntLattice::swapSrcDest ( )
virtual

Member Data Documentation

◆ cudaParticles

void* lm::rdme::CudaIntLattice::cudaParticles[2]
protected

◆ cudaParticlesCurrent

uint lm::rdme::CudaIntLattice::cudaParticlesCurrent
protected

◆ cudaParticlesSize

size_t lm::rdme::CudaIntLattice::cudaParticlesSize
protected

◆ cudaSiteTypes

void* lm::rdme::CudaIntLattice::cudaSiteTypes
protected

◆ cudaSiteTypesSize

size_t lm::rdme::CudaIntLattice::cudaSiteTypesSize
protected

◆ isGPUMemorySynched

bool lm::rdme::CudaIntLattice::isGPUMemorySynched
protected

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