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
00029
#ifndef _chemistry_qc_mbptr12_distsh_h
00030
#define _chemistry_qc_mbptr12_distsh_h
00031
00032
#ifdef __GNUC__
00033
#pragma interface
00034
#endif
00035
00036
#include <util/misc/regtime.h>
00037
#include <util/group/message.h>
00038
#include <util/group/thread.h>
00039
#include <chemistry/qc/basis/basis.h>
00040
00041
namespace sc {
00042
00044 class DistShellPairR12 {
00045
private:
00046
Ref<MessageGrp> msg_;
00047
int nthread_;
00048
Ref<ThreadLock> lock_;
00049
Ref<GaussianBasisSet> bs1_;
00050
Ref<GaussianBasisSet> bs2_;
00051
bool bs1_eq_bs2_;
00052
int dynamic_;
00053
int debug_;
00054
int print_percent_;
00055
00056
00057
int req_type_;
00058
int ans_type_;
00059
int ncpu_less_0_;
00060
void serve_tasks();
00061
00062
00063
int S_, R_;
00064
int ncpu_;
00065
int incS_, incR_;
00066
int mythread_;
00067
int ntask_;
00068
int print_interval_;
00069
int print_index_;
00070
public:
00076
DistShellPairR12(
const Ref<MessageGrp> &,
int nthread,
int mythread,
00077
const Ref<ThreadLock>& lock,
00078
const Ref<GaussianBasisSet>& bs1,
const Ref<GaussianBasisSet>& bs2);
00079 ~
DistShellPairR12();
00081
void init();
00083
void set_dynamic(
int d);
00085 void set_debug(
int d) { debug_ = d; }
00087 void set_print_percent(
int p) { print_percent_ = p; }
00095
int get_task(
int &P,
int &Q);
00096 };
00097
00098 }
00099
00100
#endif
00101
00102
00103
00104
00105
00106
00107