Psi4
Public Member Functions | Private Attributes | List of all members
psi::pk::IWLAsync_PK Class Reference

#include <PK_workers.h>

Public Member Functions

 IWLAsync_PK (size_t *address, std::shared_ptr< AIOHandler > AIO, int itap)
 Constructor, also allocates the arrays. More...
 
 ~IWLAsync_PK ()
 Destructor, also deallocates the arrays. More...
 
void fill_values (double val, size_t i, size_t j, size_t k, size_t l)
 Filling values in the bucket. More...
 
void pop_value (double &val, size_t &i, size_t &j, size_t &k, size_t &l)
 Popping a value from the current buffer, also decrements integral count. More...
 
void write ()
 Actually writing integrals from the buffer to the disk. More...
 
void flush ()
 
size_t nints ()
 Accessor functions. More...
 
size_t maxints ()
 

Private Attributes

int itap_
 File number. More...
 
size_t * address_
 Position in bytes for next write. More...
 
Labellabels_ [2]
 Integral labels. More...
 
Valuevalues_ [2]
 Integral values. More...
 
size_t JobID_ [2]
 Job Ids for AIO. More...
 
size_t ints_per_buf_
 Number of integrals per buffer. More...
 
size_t nints_
 Current number of integrals in buffer. More...
 
int lastbuf_
 Is this the last buffer for PK bucket? More...
 
int idx_
 Are we using buffer 1 or 2? More...
 
std::shared_ptr< AIOHandlerAIO_
 The AIO Handler. More...
 

Detailed Description

IWLAsync_PK: buffer class for pre-sorted PK integrals. Each buffer class has one IWL bucket for each PK bucket. We pass integrals with their labels to this class, and it stores it in the appropriate bucket. When a bucket is full, it is dumped to an IWL file using asynchronous I/O for storage. When we eventually switch out of IWL to something else, this class will have to be reworked, and also the integral reading from PK using IWL objects, but that is all.

Constructor & Destructor Documentation

psi::pk::IWLAsync_PK::IWLAsync_PK ( size_t *  address,
std::shared_ptr< AIOHandler AIO,
int  itap 
)

Constructor, also allocates the arrays.

psi::pk::IWLAsync_PK::~IWLAsync_PK ( )

Destructor, also deallocates the arrays.

Member Function Documentation

void psi::pk::IWLAsync_PK::fill_values ( double  val,
size_t  i,
size_t  j,
size_t  k,
size_t  l 
)

Filling values in the bucket.

void psi::pk::IWLAsync_PK::flush ( )

Filling buffer with dummy values and flushing it. Also indicates that this is the last buffer.

size_t psi::pk::IWLAsync_PK::maxints ( )
inline
size_t psi::pk::IWLAsync_PK::nints ( )
inline

Accessor functions.

void psi::pk::IWLAsync_PK::pop_value ( double &  val,
size_t &  i,
size_t &  j,
size_t &  k,
size_t &  l 
)

Popping a value from the current buffer, also decrements integral count.

void psi::pk::IWLAsync_PK::write ( )

Actually writing integrals from the buffer to the disk.

Buffer is full, write it using AIO to disk.

Member Data Documentation

size_t* psi::pk::IWLAsync_PK::address_
private

Position in bytes for next write.

std::shared_ptr<AIOHandler> psi::pk::IWLAsync_PK::AIO_
private

The AIO Handler.

int psi::pk::IWLAsync_PK::idx_
private

Are we using buffer 1 or 2?

size_t psi::pk::IWLAsync_PK::ints_per_buf_
private

Number of integrals per buffer.

int psi::pk::IWLAsync_PK::itap_
private

File number.

size_t psi::pk::IWLAsync_PK::JobID_[2]
private

Job Ids for AIO.

Label* psi::pk::IWLAsync_PK::labels_[2]
private

Integral labels.

int psi::pk::IWLAsync_PK::lastbuf_
private

Is this the last buffer for PK bucket?

size_t psi::pk::IWLAsync_PK::nints_
private

Current number of integrals in buffer.

Value* psi::pk::IWLAsync_PK::values_[2]
private

Integral values.


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