ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hamilt::HTransSerial< T > Class Template Reference

#include <transfer.h>

Collaboration diagram for hamilt::HTransSerial< T >:

Public Member Functions

 HTransSerial (int n_processes, HContainer< T > *hr_in)
 ~HTransSerial ()
void cal_ap_indexes (int irank, std::vector< int > *ap_indexes=nullptr)
 calculate AtomPair indexes and will be send to irank called in plan_indexes
void send_ap_indexes (int irank, MPI_Request *request=nullptr)
 calculate AtomPair_indexes of hr_in and send to the ith rank
void receive_orb_indexes (int irank, const int *orb_indexes_in=nullptr, const long &size_orb_indexes_in=0)
 receive Orbital_indexes from the ith rank save to this->orb_indexes[irank]
void send_data (int irank, MPI_Request *request=nullptr)
 pack data in this->hr, and send to ith rank
void receive_data (int irank, const T *values=nullptr)
 receive data from ith rank, save them to this->hr
void pack_data (int irank, T *values=nullptr)
 pack BaseMatrix-values for ith rank
long get_max_size () const
void get_value_size (int *out) const

Private Member Functions

void unpack_data (int irank, const T *values)
 unpack BaseMatrix-values from ith rank

Private Attributes

std::vector< std::vector< int > > orb_indexes
HContainer< T > * hr = nullptr
std::vector< std::unordered_map< int, int > > orb_col_indexes
std::vector< std::unordered_map< int, int > > orb_row_indexes
std::vector< long > size_values

Constructor & Destructor Documentation

◆ HTransSerial()

template<typename T>
hamilt::HTransSerial< T >::HTransSerial ( int n_processes,
HContainer< T > * hr_in )

◆ ~HTransSerial()

template<typename T>
hamilt::HTransSerial< T >::~HTransSerial ( )

Member Function Documentation

◆ cal_ap_indexes()

template<typename T>
void hamilt::HTransSerial< T >::cal_ap_indexes ( int irank,
std::vector< int > * ap_indexes = nullptr )

calculate AtomPair indexes and will be send to irank called in plan_indexes

Parameters
irank
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_max_size()

template<typename T>
long hamilt::HTransSerial< T >::get_max_size ( ) const
Here is the caller graph for this function:

◆ get_value_size()

template<typename T>
void hamilt::HTransSerial< T >::get_value_size ( int * out) const
Here is the caller graph for this function:

◆ pack_data()

template<typename T>
void hamilt::HTransSerial< T >::pack_data ( int irank,
T * values = nullptr )

pack BaseMatrix-values for ith rank

Parameters
irank
Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive_data()

template<typename T>
void hamilt::HTransSerial< T >::receive_data ( int irank,
const T * values = nullptr )

receive data from ith rank, save them to this->hr

Parameters
irank
Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive_orb_indexes()

template<typename T>
void hamilt::HTransSerial< T >::receive_orb_indexes ( int irank,
const int * orb_indexes_in = nullptr,
const long & size_orb_indexes_in = 0 )

receive Orbital_indexes from the ith rank save to this->orb_indexes[irank]

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_ap_indexes()

template<typename T>
void hamilt::HTransSerial< T >::send_ap_indexes ( int irank,
MPI_Request * request = nullptr )

calculate AtomPair_indexes of hr_in and send to the ith rank

Parameters
irank
Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_data()

template<typename T>
void hamilt::HTransSerial< T >::send_data ( int irank,
MPI_Request * request = nullptr )

pack data in this->hr, and send to ith rank

Parameters
irank
Here is the call graph for this function:

◆ unpack_data()

template<typename T>
void hamilt::HTransSerial< T >::unpack_data ( int irank,
const T * values )
private

unpack BaseMatrix-values from ith rank

Parameters
values
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ hr

template<typename T>
HContainer<T>* hamilt::HTransSerial< T >::hr = nullptr
private

◆ orb_col_indexes

template<typename T>
std::vector<std::unordered_map<int, int> > hamilt::HTransSerial< T >::orb_col_indexes
private

◆ orb_indexes

template<typename T>
std::vector<std::vector<int> > hamilt::HTransSerial< T >::orb_indexes
private

◆ orb_row_indexes

template<typename T>
std::vector<std::unordered_map<int, int> > hamilt::HTransSerial< T >::orb_row_indexes
private

◆ size_values

template<typename T>
std::vector<long> hamilt::HTransSerial< T >::size_values
private

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