MPQC
3.0.0-alpha
|
DistArray4_MemoryGrp handles transformed integrals held in memory by MemoryGrp. More...
#include <math/distarray4/distarray4_memgrp.h>
Public Member Functions | |
DistArray4_MemoryGrp (const Ref< MemoryGrp > &, int num_te_types, int ni, int nj, int nx, int ny, size_t memorygrp_blksize, DistArray4Storage storage=DistArray4Storage_XY) | |
DistArray4_MemoryGrp (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. More... | |
Ref< DistArray4 > | clone (const DistArray4Dimensions &dim=DistArray4Dimensions::default_dim()) |
how to clone. More... | |
void | deactivate () |
call this after operations on this object are finished. May destroy data (see data_persistent()). | |
bool | data_persistent () const |
if this returns false, call to deactivate may destroy data | |
void | store_pair_block (int i, int j, tbint_type oper_type, const double *ints) |
Stores an ij pair block of integrals. More... | |
void | store_pair_subblock (int i, int j, tbint_type oper_type, int xstart, int xfence, int ystart, int yfence, const double *ints) |
Stores an rectangular subblock of ij block of integrals. More... | |
const double * | retrieve_pair_block (int i, int j, tbint_type oper_type, double *buf=0) const |
Retrieves an ij block of integrals. More... | |
void | retrieve_pair_subblock (int i, int j, tbint_type oper_type, int xstart, int xfence, int ystart, int yfence, double *buf) const |
Retrieves a rectangular subblock of ij block of integrals. More... | |
void | release_pair_block (int i, int j, tbint_type oper_type) const |
Releases an ij pair block of integrals (if needed) | |
bool | is_local (int i, int j) const |
Is this block stored locally? | |
bool | is_avail (int i, int j) const |
In this implementation all blocks are globally available. | |
bool | has_access (int proc) const |
Does this task have access to all the integrals? | |
Public Member Functions inherited from sc::DistArray4 | |
DistArray4 (int num_te_types, int ni, int nj, int nx, int ny, DistArray4Storage storage=DistArray4Storage_XY) | |
DistArray4 (StateIn &) | |
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. | |
const DistArray4Storage & | storage () const |
physical storage of the integrals. The default storage is XY. Storage is not mutable. | |
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 | |
int | ij_index (int i, int j) const |
int | tasks_with_access (std::vector< int > &twa_map) const |
Returns the total number of tasks with access to integrals. More... | |
const Ref< MessageGrp > & | msg () const |
bool | active () const |
Public Member Functions inherited from sc::SavableState | |
SavableState & | operator= (const SavableState &) |
void | save_state (StateOut &) |
Save the state of the object as specified by the StateOut object. More... | |
void | save_object_state (StateOut &) |
This can be used for saving state when the exact type of the object is known for both the save and the restore. More... | |
virtual void | save_vbase_state (StateOut &) |
Save the virtual bases for the object. More... | |
Public Member Functions inherited from sc::DescribedClass | |
DescribedClass (const DescribedClass &) | |
DescribedClass & | operator= (const DescribedClass &) |
ClassDesc * | class_desc () const MPQC__NOEXCEPT |
This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More... | |
const char * | class_name () const |
Return the name of the object's exact type. | |
int | class_version () const |
Return the version of the class. | |
virtual void | print (std::ostream &=ExEnv::out0()) const |
Print the object. | |
Ref< DescribedClass > | ref () |
Return this object wrapped up in a Ref smart pointer. More... | |
Public Member Functions inherited from sc::RefCount | |
size_t | identifier () const |
Return the unique identifier for this object that can be compared for different objects of different types. More... | |
int | lock_ptr () const |
Lock this object. | |
int | unlock_ptr () const |
Unlock this object. | |
void | use_locks (bool inVal) |
start and stop using locks on this object | |
refcount_t | nreference () const |
Return the reference count. | |
refcount_t | reference () |
Increment the reference count and return the new count. | |
refcount_t | dereference () |
Decrement the reference count and return the new count. | |
int | managed () const |
void | unmanage () |
Turn off the reference counting mechanism for this object. More... | |
Additional Inherited Members | |
Public Types inherited from sc::DistArray4 | |
typedef unsigned int | tbint_type |
Types of two-body operators that DistArray4 understands. | |
Static Public Member Functions inherited from sc::SavableState | |
static void | save_state (SavableState *s, StateOut &) |
static SavableState * | restore_state (StateIn &si) |
Restores objects saved with save_state. More... | |
static SavableState * | key_restore_state (StateIn &si, const char *keyword) |
Like restore_state, but keyword is used to override values while restoring. | |
static SavableState * | dir_restore_state (StateIn &si, const char *objectname, const char *keyword=0) |
Static Public Attributes inherited from sc::DistArray4 | |
static const unsigned int | max_num_te_types = 14 |
Protected Member Functions inherited from sc::DistArray4 | |
size_t | nxy () 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 Member Functions inherited from sc::SavableState | |
SavableState (const SavableState &) | |
SavableState (StateIn &) | |
Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More... | |
Protected Member Functions inherited from sc::RefCount | |
RefCount (const RefCount &) | |
RefCount & | operator= (const RefCount &) |
DistArray4_MemoryGrp handles transformed integrals held in memory by MemoryGrp.
The ordering of integrals in MemoryGrp buffers is not specified to avoid having to reorder integrals Each pair block has size of num_te_types*nbasis1*nbasis2
|
virtual |
how to clone.
optional dim allows to obtain an object of the same type but different size. the default is to obtain an object of the same size.
Implements sc::DistArray4.
|
virtual |
Retrieves an ij block of integrals.
Note that it comes stored according to storage(). No locking is performed.
buf | specifies the buffer in which to write the data (if not provided, will allocate dynamically). this buffer will be used by subsequent retrieve_pair_block() requests until release_pair_block() is called. |
Implements sc::DistArray4.
|
virtual |
Retrieves a rectangular subblock of ij block of integrals.
Implements sc::DistArray4.
|
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::DistArray4.
|
virtual |
Stores an ij pair block of integrals.
It is assumed to be stored according to storage(). It does not have to be "local", i.e. is_local(i,j) can be false, but:
Implements sc::DistArray4.
|
virtual |
Stores an rectangular subblock of ij block of integrals.
Most efficient if the block is contiguous, i.e. yfence - ystart = ny().
Implements sc::DistArray4.