ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
p3m_interpolation_cache Class Reference

Cache for interpolation weights. More...

#include <interpolation.hpp>

Public Member Functions

 p3m_interpolation_cache ()
 
auto size () const
 Number of points in the cache.
 
auto cao () const
 Charge assignment order the weights are for.
 
void zfill (std::size_t size)
 Fill cache with zero-initialized data.
 
template<int cao>
void store (InterpolationWeights< cao > const &weights)
 Push back weights for one point.
 
template<int cao>
void store_at (std::size_t p_index, InterpolationWeights< cao > const &weights)
 Insert weights for one point.
 
template<int cao>
InterpolationWeightsView< caoload (std::size_t p_index) const
 Load entry from the cache.
 
void reset (int cao)
 Reset the cache.
 

Detailed Description

Cache for interpolation weights.

This is a storage container for interpolation weights of type InterpolationWeights.

Definition at line 69 of file interpolation.hpp.

Constructor & Destructor Documentation

◆ p3m_interpolation_cache()

p3m_interpolation_cache::p3m_interpolation_cache ( )
inline

Definition at line 88 of file interpolation.hpp.

Member Function Documentation

◆ cao()

auto p3m_interpolation_cache::cao ( ) const
inline

Charge assignment order the weights are for.

Returns
The charge assignment order.

Definition at line 109 of file interpolation.hpp.

Referenced by load(), reset(), store(), and store_at().

◆ load()

template<int cao>
InterpolationWeightsView< cao > p3m_interpolation_cache::load ( std::size_t  p_index) const
inline

Load entry from the cache.

This loads an entry at an index from the cache, the entries are indexed by the order they were stored.

Template Parameters
caoInterpolation order has to match the order set at last call to p3m_interpolation_cache::reset.
Parameters
p_indexIndex of the entry to load.
Returns
Interpolation weights.

Definition at line 203 of file interpolation.hpp.

References cao(), size(), and stream.

◆ reset()

void p3m_interpolation_cache::reset ( int  cao)
inline

Reset the cache.

Parameters
caoInterpolation order.

Definition at line 238 of file interpolation.hpp.

References cao(), and stream.

Referenced by CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::prepare_fft_mesh().

◆ size()

auto p3m_interpolation_cache::size ( ) const
inline

Number of points in the cache.

Returns
Number of points currently in the cache.

Definition at line 97 of file interpolation.hpp.

Referenced by load(), and zfill().

◆ store()

template<int cao>
void p3m_interpolation_cache::store ( InterpolationWeights< cao > const weights)
inline

Push back weights for one point.

Template Parameters
caoInterpolation order has to match the order set at last call to p3m_interpolation_cache::reset.
Parameters
weightsInterpolation weights to store.

Definition at line 143 of file interpolation.hpp.

References cao(), and stream.

Referenced by anonymous_namespace{p3m_heffte.impl.hpp}::AssignCharge< cao >::operator()().

◆ store_at()

template<int cao>
void p3m_interpolation_cache::store_at ( std::size_t  p_index,
InterpolationWeights< cao > const weights 
)
inline

Insert weights for one point.

Template Parameters
caoInterpolation order has to match the order set at last call to p3m_interpolation_cache::reset.
Parameters
p_indexParticle index.
weightsInterpolation weights to store.

Definition at line 170 of file interpolation.hpp.

References cao(), and stream.

◆ zfill()

void p3m_interpolation_cache::zfill ( std::size_t  size)
inline

Fill cache with zero-initialized data.

Meant for the parallel weight interpolation calculation.

Parameters
sizeNumber of elements.

Definition at line 116 of file interpolation.hpp.

References size(), and stream.

Referenced by anonymous_namespace{dp3m_heffte.impl.hpp}::AssignDipole< cao >::operator()(), and anonymous_namespace{p3m_heffte.impl.hpp}::AssignCharge< cao >::operator()().


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