1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing author: W. Michael Brown (Intel)
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
PairStyle(sw/intel,PairSWIntel)
#else
#ifndef LMP_PAIR_SW_INTEL_H
#define LMP_PAIR_SW_INTEL_H
#include "pair_sw.h"
#include "fix_intel.h"
namespace LAMMPS_NS {
class PairSWIntel : public PairSW {
public:
PairSWIntel(class LAMMPS *);
virtual ~PairSWIntel();
virtual void compute(int, int);
virtual void init_style();
protected:
FixIntel *fix;
int _cop;
template <class flt_t> class ForceConst;
virtual void allocate();
template <class flt_t, class acc_t>
void compute(int eflag, int vflag, IntelBuffers<flt_t,acc_t> *buffers,
const ForceConst<flt_t> &fc);
template <int SPQ, int ONETYPE, int EFLAG, class flt_t, class acc_t>
void eval(const int offload, const int vflag,
IntelBuffers<flt_t,acc_t> * buffers, const ForceConst<flt_t> &fc,
const int astart, const int aend);
template <class flt_t, class acc_t>
void pack_force_const(ForceConst<flt_t> &fc,
IntelBuffers<flt_t, acc_t> *buffers);
int _ccache_stride, _spq, _onetype, _onetype3;
#ifdef LMP_USE_AVXCD
int _ccache_stride3;
#endif
// ----------------------------------------------------------------------
template <class flt_t>
class ForceConst {
public:
typedef struct {
flt_t cutsq, cut, sigma_gamma, pad;
} fc_packed0;
typedef struct {
flt_t powerp, powerq, cut, sigma;
} fc_packed1;
typedef struct {
flt_t c1, c2, c3, c4;
} fc_packed1p2;
typedef struct {
flt_t c5, c6, d1, d2;
} fc_packed2;
typedef struct {
flt_t costheta, lambda_epsilon, lambda_epsilon2, pad;
} fc_packed3;
fc_packed0 **p2;
fc_packed1 **p2f;
fc_packed1p2 **p2f2;
fc_packed2 **p2e;
fc_packed3 ***p3;
ForceConst() : _ntypes(0) {}
~ForceConst() { set_ntypes(0, NULL, _cop); }
void set_ntypes(const int ntypes, Memory *memory, const int cop);
private:
int _ntypes, _cop;
Memory *_memory;
};
ForceConst<float> force_const_single;
ForceConst<double> force_const_double;
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: The 'package intel' command is required for /intel styles
Self-explanatory.
E: The 'ghost no' option cannot be used with sw/intel.
Self-explanatory.
E: Intel compiler versions before 15 Update 1 not supported for sw/intel.
Self-explanatory.
*/