r12ia_memgrp.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _chemistry_qc_mbptr12_r12ia_memgrp_h
00029 #define _chemistry_qc_mbptr12_r12ia_memgrp_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <util/ref/ref.h>
00036 #include <util/group/memory.h>
00037 #include <chemistry/qc/mbptr12/r12ia.h>
00038
00039 namespace sc {
00040
00042
00043
00044
00045
00046
00047
00048
00049 class R12IntsAcc_MemoryGrp: public R12IntsAcc {
00050
00051 Ref<MemoryGrp> mem_;
00052 int nproc_;
00053
00054 struct PairBlkInfo {
00055 double *ints_[max_num_te_types_];
00056 int refcount_[max_num_te_types_];
00057 distsize_t offset_;
00058 } *pairblk_;
00059
00060 public:
00061 R12IntsAcc_MemoryGrp(Ref<MemoryGrp>&, int num_te_types, int nbasis1, int nbasis2, int nocc, int nfzc);
00062 ~R12IntsAcc_MemoryGrp();
00063
00067 void store_memorygrp(Ref<MemoryGrp>& mem, int ni);
00069 void store_pair_block(int i, int j, double *ints);
00072 void deactivate();
00074 double* retrieve_pair_block(int i, int j, tbint_type oper_type);
00076 void release_pair_block(int i, int j, tbint_type oper_type);
00078 bool is_local(int i, int j) const { return (ij_proc(i,j) == mem_->me());};
00080 bool is_avail(int i, int j) const { return true;};
00082 bool has_access(int proc) const { return true;};
00084 bool can_restart() const { return false; };
00085
00086
00087 int ij_index(int i, int j) const { return i*nocc_act_ + j; };
00088 int ij_proc(int i, int j) const { return ij_index(i,j)%nproc_;};
00089 };
00090
00091 }
00092
00093 #endif
00094
00095
00096
00097
00098
Generated at Sat Aug 7 00:04:22 2004 for MPQC
2.2.2 using the documentation package Doxygen
1.3.8.