![]() |
QMCPACK
|
SoA adaptor class for Vector<TinyVector<T,D> > More...
Classes | |
struct | Accessor |
helper class for operator ()(size_type i) to assign a value More... | |
Public Types | |
using | AoSElement_t = TinyVector< T, D > |
using | size_type = size_t |
using | value_type = T |
Public Member Functions | |
VectorSoaContainer () | |
default constructor More... | |
VectorSoaContainer (T *ptr, size_type n, size_type n_padded) | |
constructor for a view, attach to pre-allocated data More... | |
~VectorSoaContainer () | |
destructor More... | |
VectorSoaContainer (const VectorSoaContainer &in) | |
default copy constructor More... | |
VectorSoaContainer & | operator= (const VectorSoaContainer &in) |
default copy operator More... | |
VectorSoaContainer (VectorSoaContainer &&in) noexcept | |
move constructor More... | |
VectorSoaContainer (size_type n) | |
constructor with size n without initialization More... | |
template<typename T1 > | |
VectorSoaContainer (const Vector< TinyVector< T1, D >> &in) | |
constructor with Vector<T1,D> More... | |
template<typename T1 > | |
VectorSoaContainer & | operator= (const Vector< TinyVector< T1, D >> &in) |
template<typename T1 > | |
VectorSoaContainer & | operator= (const T1 in) |
need A=0.0; More... | |
void | resize (size_type n) |
resize myData More... | |
void | clear () |
clear More... | |
void | free () |
free allocated memory and clear status variables More... | |
void | attachReference (size_type n, size_type n_padded, T *ptr) |
attach to pre-allocated data More... | |
template<typename CONTAINER > | |
void | attachReference (size_type n, size_type n_padded, const CONTAINER &other, T *ptr) |
attach to pre-allocated data More... | |
size_type | size () const |
return the physical size More... | |
size_type | capacity () const |
return the physical size More... | |
void | copyIn (const Vector< TinyVector< T, D >> &in) |
AoS to SoA : copy from Vector<TinyVector<>> More... | |
void | copyOut (Vector< TinyVector< T, D >> &out) const |
SoA to AoS : copy to Vector<TinyVector<>> More... | |
const AoSElement_t | operator[] (size_type i) const |
return TinyVector<T,D> More... | |
Accessor | operator() (size_type i) |
access operator for assignment of the i-th value More... | |
T * | data () |
return the base More... | |
const T * | data () const |
return the base More... | |
T * | getNonConstData () const |
return non_const data More... | |
T *restrict | data (size_type i) |
return the pointer of the i-th components More... | |
const T *restrict | data (size_type i) const |
return the const pointer of the i-th components More... | |
T * | end () |
return the end More... | |
const T * | end () const |
return the end More... | |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
T * | device_data () |
return the base, device More... | |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
const T * | device_data () const |
return the base, device More... | |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
T *restrict | device_data (size_type i) |
return the pointer of the i-th components, device More... | |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
const T *restrict | device_data (size_type i) const |
return the const pointer of the i-th components, device More... | |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
void | updateTo () |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
void | updateFrom () |
template<typename Allocator = Alloc, typename = IsDualSpace<Allocator>> | |
void | copyDeviceDataByIndex (unsigned to, unsigned from) |
Private Member Functions | |
bool | isRefAttached () const |
return true if memory is not owned by the container but from outside. More... | |
Private Attributes | |
size_type | nLocal |
number of elements More... | |
size_type | nGhosts |
number of elements + padded More... | |
size_type | nAllocated |
number of elements allocated by myAlloc More... | |
T * | myData |
pointer: what type???? More... | |
Alloc | mAllocator |
allocator More... | |
Friends | |
class | qmcplusplus::Vector< T, Alloc > |
template<typename OtherT , unsigned OtherD, typename OtherAlloc > | |
struct | VectorSoaContainer |
SoA adaptor class for Vector<TinyVector<T,D> >
T | data type, float, double, complex<float>, complex<double> |
Alloc | memory allocator |
Definition at line 34 of file VectorSoaContainer.h.
using AoSElement_t = TinyVector<T, D> |
Definition at line 36 of file VectorSoaContainer.h.
using size_type = size_t |
Definition at line 37 of file VectorSoaContainer.h.
using value_type = T |
Definition at line 38 of file VectorSoaContainer.h.
|
inline |
default constructor
Definition at line 41 of file VectorSoaContainer.h.
|
inline |
constructor for a view, attach to pre-allocated data
ptr | new myData |
n | new nLocal |
n_padded | new nGhosts |
Definition at line 48 of file VectorSoaContainer.h.
|
inline |
destructor
Definition at line 51 of file VectorSoaContainer.h.
|
inline |
default copy constructor
Definition at line 54 of file VectorSoaContainer.h.
|
inlinenoexcept |
move constructor
Definition at line 73 of file VectorSoaContainer.h.
|
inlineexplicit |
constructor with size n without initialization
Definition at line 83 of file VectorSoaContainer.h.
|
inline |
constructor with Vector<T1,D>
Definition at line 87 of file VectorSoaContainer.h.
attach to pre-allocated data
n | new nLocal |
n_padded | new nGhosts |
ptr | new myData |
To attach to existing memory, currently owned memory must be freed before calling attachReference
Definition at line 165 of file VectorSoaContainer.h.
Referenced by JeeIOrbitalSoA< FT >::copyFromBuffer(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), RealSpacePositionsOMPTarget::RealSpacePositionsOMPTarget(), and RealSpacePositionsOMPTarget::resize().
attach to pre-allocated data
n | new nLocal |
n_padded | new nGhosts |
other | the container that owns the memory that ptr points to |
ptr | new myData |
To attach to existing memory, currently owned memory must be freed before calling attachReference
Definition at line 188 of file VectorSoaContainer.h.
|
inline |
return the physical size
Definition at line 206 of file VectorSoaContainer.h.
Referenced by SoaDistanceTableAAOMPTarget< T, D, SC >::move().
|
inline |
clear
Definition at line 141 of file VectorSoaContainer.h.
|
inline |
Definition at line 316 of file VectorSoaContainer.h.
Referenced by qmcplusplus::testDualAllocator().
|
inline |
AoS to SoA : copy from Vector<TinyVector<>>
The same sizes are assumed.
Definition at line 212 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::operator=(), RealSpacePositions::setAllParticlePos(), RealSpacePositionsOMPTarget::setAllParticlePos(), qmcplusplus::TEST_CASE(), and VectorSoaContainer< ST, 5 >::VectorSoaContainer().
|
inline |
SoA to AoS : copy to Vector<TinyVector<>>
The same sizes are assumed.
Definition at line 221 of file VectorSoaContainer.h.
|
inline |
return the base
Definition at line 262 of file VectorSoaContainer.h.
Referenced by JeeIOrbitalSoA< FT >::acceptMove(), MomentumDistribution::accumulate(), TwoBodyJastrow< FT >::accumulateG(), J1OrbitalSoA< FT >::accumulateGL(), J1Spin< FT >::accumulateGL(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), VectorSoaContainer< ST, 5 >::copyDeviceDataByIndex(), MomentumEstimator::evaluate(), SoaDistanceTableABOMPTarget< T, D, SC >::evaluate(), LCAOrbitalSet::evaluate_ionderiv_v_impl(), LCAOrbitalSet::evaluate_ionderiv_v_row_impl(), LCAOrbitalSet::evaluate_ionderiv_vgl_impl(), LCAOrbitalSet::evaluate_vgh_impl(), LCAOrbitalSet::evaluate_vghgh_impl(), LCAOrbitalSet::evaluate_vgl_impl(), LCAOrbitalSet::evaluateDetRatios(), SoaCartesianTensor< T >::evaluateV(), SoaSphericalTensor< ST >::evaluateV(), SoaAtomicBasisSet< ROT, SH >::evaluateV(), LCAOrbitalSet::evaluateValue(), SoaAtomicBasisSet< ROT, SH >::evaluateVGH(), SoaAtomicBasisSet< ROT, SH >::evaluateVGHGH(), SoaCuspCorrection::evaluateVGL(), SoaAtomicBasisSet< ROT, SH >::evaluateVGL(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), RealSpacePositionsOMPTarget::mw_acceptParticlePos(), SoaSphericalTensor< ST >::operator[](), SoaCartesianTensor< T >::operator[](), JeeIOrbitalSoA< FT >::recompute(), JeeIOrbitalSoA< FT >::registerData(), qmcplusplus::testDualAllocator(), SoaDistanceTableAB< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::update(), SoaDistanceTableABOMPTarget< T, D, SC >::update(), SoaDistanceTableAAOMPTarget< T, D, SC >::update(), SoaDistanceTableAA< T, D, SC >::updatePartial(), and SoaDistanceTableAAOMPTarget< T, D, SC >::updatePartial().
|
inline |
return the base
Definition at line 264 of file VectorSoaContainer.h.
|
inline |
return the pointer of the i-th components
Definition at line 268 of file VectorSoaContainer.h.
|
inline |
return the const pointer of the i-th components
Definition at line 270 of file VectorSoaContainer.h.
|
inline |
return the base, device
Definition at line 279 of file VectorSoaContainer.h.
Referenced by qmcplusplus::testDualAllocator().
|
inline |
return the base, device
Definition at line 285 of file VectorSoaContainer.h.
|
inline |
return the pointer of the i-th components, device
Definition at line 291 of file VectorSoaContainer.h.
|
inline |
return the const pointer of the i-th components, device
Definition at line 297 of file VectorSoaContainer.h.
|
inline |
return the end
Definition at line 272 of file VectorSoaContainer.h.
Referenced by JeeIOrbitalSoA< FT >::registerData().
|
inline |
return the end
Definition at line 274 of file VectorSoaContainer.h.
|
inline |
free allocated memory and clear status variables
Definition at line 148 of file VectorSoaContainer.h.
Referenced by TwoBodyJastrow< FT >::acquireResource(), VectorSoaContainer< ST, 5 >::attachReference(), JeeIOrbitalSoA< FT >::registerData(), TwoBodyJastrow< FT >::releaseResource(), and VectorSoaContainer< ST, 5 >::~VectorSoaContainer().
|
inline |
return non_const data
Definition at line 266 of file VectorSoaContainer.h.
|
inlineprivate |
return true if memory is not owned by the container but from outside.
Definition at line 338 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::resize().
access operator for assignment of the i-th value
Use for (*this)[i]=TinyVector<T,D>;
Definition at line 260 of file VectorSoaContainer.h.
|
inline |
default copy operator
Definition at line 61 of file VectorSoaContainer.h.
|
inline |
Definition at line 94 of file VectorSoaContainer.h.
|
inline |
need A=0.0;
Definition at line 104 of file VectorSoaContainer.h.
|
inline |
return TinyVector<T,D>
Definition at line 228 of file VectorSoaContainer.h.
|
inline |
resize myData
n | nLocal |
nAllocated is used to ensure no memory leak
Definition at line 115 of file VectorSoaContainer.h.
Referenced by SoaAtomicBasisSet< ROT, SH >::finalize(), JeeIOrbitalSoA< FT >::init(), LCAOrbitalSet::LCAOrbitalSet(), MomentumDistribution::MomentumDistribution(), VectorSoaContainer< ST, 5 >::operator=(), MomentumEstimator::putSpecial(), RealSpacePositions::resize(), SoaDistanceTableAB< T, D, SC >::resize(), MomentumEstimator::resize(), SoaDistanceTableAA< T, D, SC >::resize(), SoaDistanceTableAAOMPTarget< T, D, SC >::resize(), SplineC2R< ST >::resize_kpoints(), SplineC2C< ST >::resize_kpoints(), SplineC2R< ST >::resizeStorage(), SplineR2R< ST >::resizeStorage(), SplineC2C< ST >::resizeStorage(), SplineC2COMPTarget< ST >::resizeStorage(), SplineC2ROMPTarget< ST >::resizeStorage(), SoaCartesianTensor< T >::SoaCartesianTensor(), SoaDistanceTableABOMPTarget< T, D, SC >::SoaDistanceTableABOMPTarget(), qmcplusplus::testDualAllocator(), and VectorSoaContainer< ST, 5 >::VectorSoaContainer().
|
inline |
return the physical size
Definition at line 204 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::copyDeviceDataByIndex(), SoaCartesianTensor< T >::evaluateV(), SoaSphericalTensor< ST >::evaluateV(), SoaCuspCorrection::evaluateVGL(), SoaDistanceTableAAOMPTarget< T, D, SC >::move(), RealSpacePositions::size(), RealSpacePositionsOMPTarget::size(), SoaSphericalTensor< ST >::size(), and SoaCartesianTensor< T >::size().
|
inline |
Definition at line 309 of file VectorSoaContainer.h.
Referenced by qmcplusplus::testDualAllocator().
|
inline |
Definition at line 304 of file VectorSoaContainer.h.
Referenced by qmcplusplus::testDualAllocator().
|
friend |
Definition at line 342 of file VectorSoaContainer.h.
|
friend |
Definition at line 345 of file VectorSoaContainer.h.
|
private |
allocator
Definition at line 335 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::attachReference(), VectorSoaContainer< ST, 5 >::copyDeviceDataByIndex(), VectorSoaContainer< ST, 5 >::device_data(), VectorSoaContainer< ST, 5 >::free(), VectorSoaContainer< ST, 5 >::resize(), VectorSoaContainer< ST, 5 >::updateFrom(), and VectorSoaContainer< ST, 5 >::updateTo().
|
private |
pointer: what type????
Definition at line 333 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::attachReference(), VectorSoaContainer< ST, 5 >::copyIn(), VectorSoaContainer< ST, 5 >::copyOut(), VectorSoaContainer< ST, 5 >::data(), VectorSoaContainer< ST, 5 >::end(), VectorSoaContainer< ST, 5 >::free(), VectorSoaContainer< ST, 5 >::getNonConstData(), VectorSoaContainer< ST, 5 >::operator()(), VectorSoaContainer< ST, 5 >::operator=(), VectorSoaContainer< ST, 5 >::operator[](), VectorSoaContainer< ST, 5 >::resize(), VectorSoaContainer< ST, 5 >::updateFrom(), VectorSoaContainer< ST, 5 >::updateTo(), and VectorSoaContainer< ST, 5 >::VectorSoaContainer().
|
private |
number of elements allocated by myAlloc
Definition at line 331 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::attachReference(), VectorSoaContainer< ST, 5 >::free(), VectorSoaContainer< ST, 5 >::isRefAttached(), and VectorSoaContainer< ST, 5 >::resize().
|
private |
number of elements + padded
Definition at line 329 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::attachReference(), VectorSoaContainer< ST, 5 >::capacity(), VectorSoaContainer< ST, 5 >::clear(), VectorSoaContainer< ST, 5 >::copyIn(), VectorSoaContainer< ST, 5 >::copyOut(), VectorSoaContainer< ST, 5 >::data(), VectorSoaContainer< ST, 5 >::device_data(), VectorSoaContainer< ST, 5 >::end(), VectorSoaContainer< ST, 5 >::free(), VectorSoaContainer< ST, 5 >::isRefAttached(), VectorSoaContainer< ST, 5 >::operator()(), VectorSoaContainer< ST, 5 >::operator=(), VectorSoaContainer< ST, 5 >::operator[](), VectorSoaContainer< ST, 5 >::resize(), VectorSoaContainer< ST, 5 >::updateFrom(), VectorSoaContainer< ST, 5 >::updateTo(), and VectorSoaContainer< ST, 5 >::VectorSoaContainer().
|
private |
number of elements
Definition at line 327 of file VectorSoaContainer.h.
Referenced by VectorSoaContainer< ST, 5 >::attachReference(), VectorSoaContainer< ST, 5 >::clear(), VectorSoaContainer< ST, 5 >::copyIn(), VectorSoaContainer< ST, 5 >::copyOut(), VectorSoaContainer< ST, 5 >::free(), VectorSoaContainer< ST, 5 >::operator=(), VectorSoaContainer< ST, 5 >::resize(), VectorSoaContainer< ST, 5 >::size(), and VectorSoaContainer< ST, 5 >::VectorSoaContainer().