IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ippl::detail::Archive< Properties > Class Template Reference

Public Types

using buffer_type = typename ViewType< char, 1, Properties... >::view_type
 
using pointer_type = typename buffer_type::pointer_type
 

Public Member Functions

 Archive (size_type size=0)
 
template<typename T , class... ViewArgs>
void serialize (const Kokkos::View< T *, ViewArgs... > &view, size_type nsends)
 
template<typename T , unsigned Dim, class... ViewArgs>
void serialize (const Kokkos::View< Vector< T, Dim > *, ViewArgs... > &view, size_type nsends)
 
template<typename T , class... ViewArgs>
void deserialize (Kokkos::View< T *, ViewArgs... > &view, size_type nrecvs)
 
template<typename T , unsigned Dim, class... ViewArgs>
void deserialize (Kokkos::View< Vector< T, Dim > *, ViewArgs... > &view, size_type nrecvs)
 
pointer_type getBuffer ()
 
size_type getSize () const
 
size_type getBufferSize () const
 
void resizeBuffer (size_type size)
 
void reallocBuffer (size_type size)
 
void resetWritePos ()
 
void resetReadPos ()
 

Member Function Documentation

◆ deserialize() [1/2]

template<class... Properties>
template<typename T , class... ViewArgs>
void ippl::detail::Archive< Properties >::deserialize ( Kokkos::View< T *, ViewArgs... > &  view,
size_type  nrecvs 
)

Deserialize.

Parameters
viewto put data to

◆ deserialize() [2/2]

template<class... Properties>
template<typename T , unsigned Dim, class... ViewArgs>
void ippl::detail::Archive< Properties >::deserialize ( Kokkos::View< Vector< T, Dim > *, ViewArgs... > &  view,
size_type  nrecvs 
)

Deserialize vector attributes

Remarks
We need a specialized function for vectors since the vector is not a trivially copyable class. Hence, we cannot use std::memcpy directly.
Parameters
viewto put data to

◆ getBuffer()

template<class... Properties>
pointer_type ippl::detail::Archive< Properties >::getBuffer ( )
inline
Returns
a pointer to the data of the buffer

◆ getSize()

template<class... Properties>
size_type ippl::detail::Archive< Properties >::getSize ( ) const
inline
Returns
the size of the buffer

◆ serialize() [1/2]

template<class... Properties>
template<typename T , class... ViewArgs>
void ippl::detail::Archive< Properties >::serialize ( const Kokkos::View< T *, ViewArgs... > &  view,
size_type  nsends 
)

Serialize.

Parameters
viewto take data from.

◆ serialize() [2/2]

template<class... Properties>
template<typename T , unsigned Dim, class... ViewArgs>
void ippl::detail::Archive< Properties >::serialize ( const Kokkos::View< Vector< T, Dim > *, ViewArgs... > &  view,
size_type  nsends 
)

Serialize vector attributes

Remarks
We need a specialized function for vectors since the vector is not a trivially copyable class. Hence, we cannot use std::memcpy directly.
Parameters
viewto take data from.

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