~ubuntu-branches/ubuntu/trusty/nwchem/trusty-proposed

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/tascel/src/DenseArray.h

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __DenseArray_h__
 
2
#define __DenseArray_h__
 
3
 
 
4
#include <vector>
 
5
#include "DataColl.h"
 
6
 
 
7
namespace tascel {
 
8
 
 
9
  /**
 
10
   * DataColl abstraction for a GlobalArray.
 
11
   *
 
12
   * A limited abstraction for GA data movement to be managed by the
 
13
   * tascel runtime. Note that the same GA could be wrapped by many
 
14
   * DenseArray objects, each providing a potentially different block
 
15
   * view of the same array.
 
16
   */
 
17
  class DenseArray : public DataColl {
 
18
  private:
 
19
    const int ga;            /**< GA being wrapped */
 
20
    const int ndim;          /**< Number of dimensions of GA */
 
21
    std::vector<int> block;  /**< The blocking for this wrapper*/
 
22
    std::vector<int> dims;   /**< The dimensions of the GA */
 
23
    
 
24
    /**
 
25
     * Compute low index for use in GA call.
 
26
     *
 
27
     * Low index for the block pointed to by idx.
 
28
     * @param[in]  idx    Pointer to index
 
29
     * @param[in]  idxlen Length of index (in bytes)
 
30
     * @param[out] lo     Lower bound for the block
 
31
     * @return            none
 
32
     */
 
33
    void computeLo(const void *idx, int idxlen, int *lo);
 
34
 
 
35
    /**
 
36
     * Compute high index for use in GA call.
 
37
     *
 
38
     * High index for the block pointed to by idx.
 
39
     * @param[in]  idx    Pointer to index
 
40
     * @param[in]  idxlen Length of index (in bytes)
 
41
     * @param[out] hi     Upper bound for the block
 
42
     * @return            none
 
43
     */
 
44
    void computeHi(const void *idx, int idxlen, int *hi);
 
45
 
 
46
    /**
 
47
     * Compute stride (ld) for use in GA call.
 
48
     *
 
49
     * High index for the block pointed to by idx.
 
50
     * @param[in]  idx    Pointer to index
 
51
     * @param[in]  idxlen Length of index (in bytes)
 
52
     * @param[out] ld     ld values for the block
 
53
     * @return            none
 
54
     */
 
55
    void computeLd(const void *idx, int idxlen, int *ld);
 
56
 
 
57
    /**
 
58
     * Combimes computation of lo, hi, and ld arguments of a GA call. 
 
59
     *
 
60
     * @param[in]  idx    Pointer to index
 
61
     * @param[in]  idxlen Length of index (in bytes)
 
62
     * @param[out] lo     lo values for the block
 
63
     * @param[out] hi     hi values for the block
 
64
     * @param[out] ld     ld values for the block
 
65
     * @return            none
 
66
     */
 
67
    void computeBounds(const void *idx, int idxlen, int *lo, int *hi, int *ld);
 
68
    
 
69
  public:
 
70
 
 
71
    /**
 
72
     * Construct a dense array object to wrap a GA
 
73
     *
 
74
     * A GA itself it not created. The user is still responsible to
 
75
     * pass a valid GA, and destroy the GA after this object if
 
76
     * destroyed. 
 
77
     * @param[in] ga    Handle to ga to be wrapped
 
78
     * @param[in] block The size of each block being put of get. 
 
79
     * @param[in] len   Number of integers pointed to by block. This
 
80
     * should match the number of dimensions of ga.
 
81
     */
 
82
    DenseArray(int ga, const int *block, int len);
 
83
 
 
84
    /**
 
85
     * @copybrief   DataColl::getSize(const void*,int)
 
86
     * @copydetails DataColl::getSize(const void*,int)
 
87
     */
 
88
    int getSize(const void *idx, int idxlen);
 
89
 
 
90
    /**
 
91
     * @copybrief   DataColl::getProc(const void*,int)
 
92
     * @copydetails DataColl::getProc(const void*,int)
 
93
     */
 
94
    int getProc(const void *idx, int idxlen);
 
95
 
 
96
    /**
 
97
     * @copybrief   DataColl::get(const void*,int,void*,int)
 
98
     * @copydetails DataColl::get(const void*,int,void*,int)
 
99
     */
 
100
    void get(const void *idx, int idxlen, void *buf, int buflen);
 
101
 
 
102
    /**
 
103
     * @copybrief   DataColl::put(const void*,int,const void*,int)
 
104
     * @copydetails DataColl::put(const void*,int,const void*,int)
 
105
     */
 
106
    void put(const void *idx, int idxlen, const void *buf, int buflen);
 
107
 
 
108
    /**
 
109
     * @copybrief   DataColl::add(const void*,int,const void*,int)
 
110
     * @copydetails DataColl::add(const void*,int,const void*,int)
 
111
     */
 
112
    void add(const void *idx, int idxlen, const void *buf, int buflen);
 
113
 
 
114
    /**
 
115
     * @copybrief   DataColl::nbGet(const void*,int,void*,int,nbh_t)
 
116
     * @copydetails DataColl::nbGet(const void*,int,void*,int,nbh_t)
 
117
     */
 
118
    virtual nbh_t nbGet(const void *idx, int idxlen, void *buf, int buflen, nbh_t nbh=0);
 
119
 
 
120
    /**
 
121
     * @copybrief   DataColl::nbPut(const void*,int,const void*,int,nbh_t)
 
122
     * @copydetails DataColl::nbPut(const void*,int,const void*,int,nbh_t)
 
123
     */
 
124
    virtual nbh_t nbPut(const void *idx, int idxlen, const void *buf, int buflen, nbh_t nbh=0);
 
125
 
 
126
    /**
 
127
     * @copybrief   DataColl::nbAdd(const void*,int,const void*,int,nbh_t)
 
128
     * @copydetails DataColl::nbAdd(const void*,int,const void*,int,nbh_t)
 
129
     */
 
130
    virtual void *nbAdd(const void *idx, int idxlen, const void *buf, int buflen, nbh_t nbh=0);
 
131
 
 
132
    /**
 
133
     * @copybrief   DataColl::waitHandle(nbh_t)
 
134
     * @copydetails DataColl::waitHandle(nbh_t)
 
135
     */
 
136
    virtual void waitHandle(nbh_t nbh);
 
137
 
 
138
    
 
139
 
 
140
  };
 
141
};
 
142
 
 
143
#endif /*__DenseArray_h__*/
 
144