#include <chemistry/qc/mbptr12/distributed_array.h>

Public Types | |
| typedef unsigned int | tbint_type |
| Types of two-body operators that R12IntsAcc understands. | |
| typedef unsigned int | tbint_type |
| Types of two-body operators that R12IntsAcc understands. | |
Public Member Functions | |
| R12IntsAcc (int num_te_types, int ni, int nj, int nx, int ny) | |
| R12IntsAcc (StateIn &) | |
| void | save_data_state (StateOut &) |
| Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. | |
| int | num_te_types () const |
| The number of types of integrals that are being handled together. | |
| int | ni () const |
| Rank of index space i. | |
| int | nj () const |
| Rank of index space j. | |
| int | nx () const |
| Rank of index space x. | |
| int | ny () const |
| Rank of index space y. | |
| size_t | blocksize () const |
| Size of each block of the integrals of one type, in double words. | |
| virtual double * | retrieve_pair_block (int i, int j, tbint_type oper_type)=0 |
| Retrieves an ij block of integrals. | |
| virtual void | release_pair_block (int i, int j, tbint_type oper_type)=0 |
| Releases the buffer that holds ij block of integrals. | |
| virtual void | store_pair_block (int i, int j, tbint_type oper_type, double *ints)=0 |
| Stores an ij pair block of integrals. | |
| virtual bool | is_avail (int i, int j) const =0 |
| Can this block be accessed via retrieve_pair_block from this task? | |
| virtual bool | is_local (int i, int j) const =0 |
| Is this block stored locally? If true, this implies that it can be retrieved efficiently (compare to is_avail). | |
| virtual bool | has_access (int proc) const =0 |
| Does this task have access to all blocks? | |
| int | tasks_with_access (vector< int > &twa_map) const |
| Returns the total number of tasks with access to integrals. | |
| R12IntsAcc (int num_te_types, int ni, int nj, int nx, int ny) | |
| R12IntsAcc (StateIn &) | |
| void | save_data_state (StateOut &) |
| Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. | |
| int | num_te_types () const |
| The number of types of integrals that are being handled together. | |
| int | ni () const |
| Rank of index space i. | |
| int | nj () const |
| Rank of index space j. | |
| int | nx () const |
| Rank of index space x. | |
| int | ny () const |
| Rank of index space y. | |
| size_t | blocksize () const |
| Size of each block of the integrals of one type, in double words. | |
| size_t | blksize () const |
| virtual void | activate () |
| call this before operations on this object can begin | |
| virtual void | deactivate () |
| call this after operations on this object are finished. May destroy data (see data_persistent()). | |
| virtual bool | data_persistent () const =0 |
| if this returns false, call to deactivate may destroy data | |
| virtual const double * | retrieve_pair_block (int i, int j, tbint_type oper_type) const =0 |
| Retrieves an ij block of integrals. | |
| virtual void | release_pair_block (int i, int j, tbint_type oper_type) const =0 |
| Releases the buffer that holds ij block of integrals. | |
| virtual void | store_pair_block (int i, int j, tbint_type oper_type, const double *ints)=0 |
| Stores an ij pair block of integrals. | |
| int | ij_index (int i, int j) const |
| virtual bool | is_avail (int i, int j) const =0 |
| Can this block be accessed via retrieve_pair_block from this task? | |
| virtual bool | is_local (int i, int j) const =0 |
| Is this block stored locally? If true, this implies that it can be retrieved efficiently (compare to is_avail). | |
| virtual bool | has_access (int proc) const =0 |
| Does this task have access to all blocks? | |
| int | tasks_with_access (vector< int > &twa_map) const |
| Returns the total number of tasks with access to integrals. | |
Static Public Attributes | |
| static const unsigned int | max_num_te_types_ = TwoBodyInt::max_num_tbint_types |
Protected Member Functions | |
| virtual int | ntasks () const =0 |
| total number of tasks | |
| virtual int | taskid () const =0 |
| rank of this task | |
| int | classdebug () const |
| return debug level for this class | |
| size_t | nxy () const |
| bool | active () const |
| int | ntasks () const |
| total number of tasks | |
| int | me () const |
| rank of this task | |
| int | classdebug () const |
| return debug level for this class | |
Protected Attributes | |
| int | ni_ |
| int | nj_ |
| int | nx_ |
| int | ny_ |
| size_t | nxy_ |
| size_t | blksize_ |
| size_t | blocksize_ |
| int | next_orbital_ |
| bool | committed_ |
| bool | active_ |
These 4-index quantities are typically AO or MO integrals. Since integrals are typically computed in sets -- for example, R12 methods require integrals of operators 1/r12, r12, [t1,r12], and [t2,r12] at the same time -- several sets of integrals are held together. The data can then be described as (ijxy)^O where i, j, x, and, y are indices with ranges [0,ni), [0,nj), etc. and O labels the operator type and ranges from 0 to num_te_types. The data is stored and accessed as follows: each ij block is a set of num_te_types base-0 contiguous 2-dimensional array with dimensions nx and ny. How blocks are stored and accessed is determined in the derived class.
Public interface of R12IntsAcc is designed to accomodate the needs of the TwoBodyMOIntsTransform objects. Parallel AO->MO integral transforms are performed in single or multiple passes. In the latter case all (jxy)^O integrals are produces for a particular subrange of i. These integrals are contained in a MemoryGrp object. The contents of the MemoryGrp object is "stored" in accumulator using store_memorygrp(Ref<MemoryGrp>& mem, int ni), where ni is the size of the subrange of i produced in this pass. After all batches have been stored, the content of R12IntsAcc needs to be "committed" using commit. After that blocks of MO integrals can be accessed using retrieve_pair_block.
| void sc::R12IntsAcc::save_data_state | ( | StateOut & | ) | [virtual] |
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.
This must be implemented by the derived class if the class has data.
Reimplemented from sc::SavableState.
Reimplemented in sc::R12IntsAcc_MemoryGrp, sc::R12IntsAcc_MPIIOFile, sc::R12IntsAcc_MPIIOFile_Ind, and sc::R12IntsAcc_Node0File.
| int sc::R12IntsAcc::tasks_with_access | ( | vector< int > & | twa_map | ) | const |
Returns the total number of tasks with access to integrals.
If task i has access to the integrals, then twa_map[i] is its index among the tasks with access, -1 otherwise.
| void sc::R12IntsAcc::save_data_state | ( | StateOut & | ) | [virtual] |
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them.
This must be implemented by the derived class if the class has data.
Reimplemented from sc::SavableState.
Reimplemented in sc::R12IntsAcc_MemoryGrp, sc::R12IntsAcc_MPIIOFile, sc::R12IntsAcc_MPIIOFile_Ind, and sc::R12IntsAcc_Node0File.
| int sc::R12IntsAcc::tasks_with_access | ( | vector< int > & | twa_map | ) | const |
Returns the total number of tasks with access to integrals.
If task i has access to the integrals, then twa_map[i] is its index among the tasks with access, -1 otherwise.