forked from lijiext/lammps
Merge pull request #840 from akohlmey/collected-small-fixes
Collected small fixes for stable release
This commit is contained in:
commit
ab914a9220
|
@ -32,7 +32,7 @@ class FixWallGranRegion : public FixWallGran {
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void restart(char* );
|
void restart(char* );
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
void grow_arrays(int);
|
void grow_arrays(int);
|
||||||
void copy_arrays(int, int, int);
|
void copy_arrays(int, int, int);
|
||||||
|
@ -48,17 +48,17 @@ class FixWallGranRegion : public FixWallGran {
|
||||||
class Region *region;
|
class Region *region;
|
||||||
char *region_style;
|
char *region_style;
|
||||||
int nregion;
|
int nregion;
|
||||||
|
|
||||||
// shear history for multiple contacts per particle
|
// shear history for multiple contacts per particle
|
||||||
|
|
||||||
int tmax; // max # of region walls one particle can touch
|
int tmax; // max # of region walls one particle can touch
|
||||||
int *ncontact; // # of shear contacts per particle
|
int *ncontact; // # of shear contacts per particle
|
||||||
int **walls; // which wall each contact is with
|
int **walls; // which wall each contact is with
|
||||||
double ***shearmany; // shear history per particle per contact
|
double ***shearmany; // shear history per particle per contact
|
||||||
int *c2r; // contact to region mapping
|
int *c2r; // contact to region mapping
|
||||||
// c2r[i] = index of Ith contact in
|
// c2r[i] = index of Ith contact in
|
||||||
// region-contact[] list of contacts
|
// region-contact[] list of contacts
|
||||||
int motion_resetflag; // used by restart to indicate that region
|
int motion_resetflag; // used by restart to indicate that region
|
||||||
// vel info is to be reset
|
// vel info is to be reset
|
||||||
|
|
||||||
void update_contacts(int, int);
|
void update_contacts(int, int);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class GridCommKokkos : protected Pointers {
|
||||||
public:
|
public:
|
||||||
typedef DeviceType device_type;
|
typedef DeviceType device_type;
|
||||||
typedef ArrayTypes<DeviceType> AT;
|
typedef ArrayTypes<DeviceType> AT;
|
||||||
|
|
||||||
GridCommKokkos(class LAMMPS *, MPI_Comm, int, int,
|
GridCommKokkos(class LAMMPS *, MPI_Comm, int, int,
|
||||||
int, int, int, int, int, int,
|
int, int, int, int, int, int,
|
||||||
int, int, int, int, int, int,
|
int, int, int, int, int, int,
|
||||||
|
|
|
@ -29,8 +29,8 @@ class KokkosBase {
|
||||||
virtual void unpack_reverse_kspace_kokkos(int, DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {};
|
virtual void unpack_reverse_kspace_kokkos(int, DAT::tdual_FFT_SCALAR_1d &, int, DAT::tdual_int_2d &, int) {};
|
||||||
|
|
||||||
// Pair
|
// Pair
|
||||||
virtual int pack_forward_comm_kokkos(int, DAT::tdual_int_2d,
|
virtual int pack_forward_comm_kokkos(int, DAT::tdual_int_2d,
|
||||||
int, DAT::tdual_xfloat_1d &,
|
int, DAT::tdual_xfloat_1d &,
|
||||||
int, int *) {return 0;};
|
int, int *) {return 0;};
|
||||||
virtual void unpack_forward_comm_kokkos(int, int, DAT::tdual_xfloat_1d &) {}
|
virtual void unpack_forward_comm_kokkos(int, int, DAT::tdual_xfloat_1d &) {}
|
||||||
|
|
||||||
|
|
|
@ -984,7 +984,7 @@ void memset_kokkos (ViewType &view) {
|
||||||
|
|
||||||
struct params_lj_coul {
|
struct params_lj_coul {
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION
|
||||||
params_lj_coul(){cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
|
params_lj_coul(){cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION
|
||||||
params_lj_coul(int i){cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
|
params_lj_coul(int i){cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
|
||||||
F_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset;
|
F_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset;
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace MathSpecialKokkos {
|
||||||
}
|
}
|
||||||
|
|
||||||
// exp(-x*x) for coul/long styles
|
// exp(-x*x) for coul/long styles
|
||||||
|
|
||||||
static inline double expmsq(double x)
|
static inline double expmsq(double x)
|
||||||
{
|
{
|
||||||
x *= x;
|
x *= x;
|
||||||
|
|
|
@ -82,7 +82,7 @@ class PairLJCutCoulLongKokkos : public PairLJCutCoulLong {
|
||||||
typename AT::t_f_array f;
|
typename AT::t_f_array f;
|
||||||
typename AT::t_int_1d_randomread type;
|
typename AT::t_int_1d_randomread type;
|
||||||
typename AT::t_float_1d_randomread q;
|
typename AT::t_float_1d_randomread q;
|
||||||
|
|
||||||
DAT::tdual_efloat_1d k_eatom;
|
DAT::tdual_efloat_1d k_eatom;
|
||||||
DAT::tdual_virial_array k_vatom;
|
DAT::tdual_virial_array k_vatom;
|
||||||
typename AT::t_efloat_1d d_eatom;
|
typename AT::t_efloat_1d d_eatom;
|
||||||
|
|
|
@ -71,7 +71,7 @@ class PairMorseKokkos : public PairMorse {
|
||||||
|
|
||||||
Kokkos::DualView<params_morse**,Kokkos::LayoutRight,DeviceType> k_params;
|
Kokkos::DualView<params_morse**,Kokkos::LayoutRight,DeviceType> k_params;
|
||||||
typename Kokkos::DualView<params_morse**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
typename Kokkos::DualView<params_morse**,Kokkos::LayoutRight,DeviceType>::t_dev_const_um params;
|
||||||
params_morse m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
params_morse m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||||
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||||
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
typename ArrayTypes<DeviceType>::t_x_array_randomread x;
|
||||||
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
typename ArrayTypes<DeviceType>::t_x_array c_x;
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
|
|
||||||
PairSNAPKokkos(class LAMMPS *);
|
PairSNAPKokkos(class LAMMPS *);
|
||||||
~PairSNAPKokkos();
|
~PairSNAPKokkos();
|
||||||
|
|
||||||
void coeff(int, char**);
|
void coeff(int, char**);
|
||||||
void init_style();
|
void init_style();
|
||||||
double init_one(int, int);
|
double init_one(int, int);
|
||||||
|
|
|
@ -114,8 +114,8 @@ struct FindMaxNumNeighs {
|
||||||
typedef DeviceType device_type;
|
typedef DeviceType device_type;
|
||||||
NeighListKokkos<DeviceType> k_list;
|
NeighListKokkos<DeviceType> k_list;
|
||||||
|
|
||||||
FindMaxNumNeighs(NeighListKokkos<DeviceType>* nl): k_list(*nl) {}
|
FindMaxNumNeighs(NeighListKokkos<DeviceType>* nl): k_list(*nl) {}
|
||||||
~FindMaxNumNeighs() {k_list.copymode = 1;}
|
~FindMaxNumNeighs() {k_list.copymode = 1;}
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION
|
||||||
void operator() (const int& ii, int& max_neighs) const {
|
void operator() (const int& ii, int& max_neighs) const {
|
||||||
|
@ -134,14 +134,14 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||||
{
|
{
|
||||||
eflag = eflag_in;
|
eflag = eflag_in;
|
||||||
vflag = vflag_in;
|
vflag = vflag_in;
|
||||||
|
|
||||||
if (neighflag == FULL) no_virial_fdotr_compute = 1;
|
if (neighflag == FULL) no_virial_fdotr_compute = 1;
|
||||||
|
|
||||||
if (eflag || vflag) ev_setup(eflag,vflag,0);
|
if (eflag || vflag) ev_setup(eflag,vflag,0);
|
||||||
else evflag = vflag_fdotr = 0;
|
else evflag = vflag_fdotr = 0;
|
||||||
|
|
||||||
// reallocate per-atom arrays if necessary
|
// reallocate per-atom arrays if necessary
|
||||||
|
|
||||||
if (eflag_atom) {
|
if (eflag_atom) {
|
||||||
memoryKK->destroy_kokkos(k_eatom,eatom);
|
memoryKK->destroy_kokkos(k_eatom,eatom);
|
||||||
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom");
|
memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom");
|
||||||
|
@ -241,7 +241,7 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||||
virial[4] += ev.v[4];
|
virial[4] += ev.v[4];
|
||||||
virial[5] += ev.v[5];
|
virial[5] += ev.v[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vflag_fdotr) pair_virial_fdotr_compute(this);
|
if (vflag_fdotr) pair_virial_fdotr_compute(this);
|
||||||
|
|
||||||
if (eflag_atom) {
|
if (eflag_atom) {
|
||||||
|
@ -282,7 +282,7 @@ double PairSNAPKokkos<DeviceType>::init_one(int i, int j)
|
||||||
double cutone = PairSNAP::init_one(i,j);
|
double cutone = PairSNAP::init_one(i,j);
|
||||||
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
k_cutsq.h_view(i,j) = k_cutsq.h_view(j,i) = cutone*cutone;
|
||||||
k_cutsq.template modify<LMPHostType>();
|
k_cutsq.template modify<LMPHostType>();
|
||||||
|
|
||||||
return cutone;
|
return cutone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAP<NEIGHFLAG,EVFLAG>,const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quadraticflag) {
|
if (quadraticflag) {
|
||||||
|
|
||||||
int k = ncoeff+1;
|
int k = ncoeff+1;
|
||||||
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
|
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
|
||||||
double bveci = my_sna.bvec[icoeff];
|
double bveci = my_sna.bvec[icoeff];
|
||||||
|
@ -535,7 +535,7 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAP<NEIGHFLAG,EVFLAG>,const
|
||||||
my_sna.compute_bi(team);
|
my_sna.compute_bi(team);
|
||||||
my_sna.copy_bi2bvec(team);
|
my_sna.copy_bi2bvec(team);
|
||||||
}
|
}
|
||||||
|
|
||||||
// E = beta.B + 0.5*B^t.alpha.B
|
// E = beta.B + 0.5*B^t.alpha.B
|
||||||
// coeff[k] = beta[k-1] or
|
// coeff[k] = beta[k-1] or
|
||||||
// coeff[k] = alpha_ii or
|
// coeff[k] = alpha_ii or
|
||||||
|
@ -545,7 +545,7 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAP<NEIGHFLAG,EVFLAG>,const
|
||||||
Kokkos::single(Kokkos::PerThread(team), [&] () {
|
Kokkos::single(Kokkos::PerThread(team), [&] () {
|
||||||
|
|
||||||
// evdwl = energy of atom I, sum over coeffs_k * Bi_k
|
// evdwl = energy of atom I, sum over coeffs_k * Bi_k
|
||||||
|
|
||||||
double evdwl = d_coeffi[0];
|
double evdwl = d_coeffi[0];
|
||||||
|
|
||||||
// linear contributions
|
// linear contributions
|
||||||
|
@ -553,7 +553,7 @@ void PairSNAPKokkos<DeviceType>::operator() (TagPairSNAP<NEIGHFLAG,EVFLAG>,const
|
||||||
evdwl += d_coeffi[k]*my_sna.bvec[k-1];
|
evdwl += d_coeffi[k]*my_sna.bvec[k-1];
|
||||||
|
|
||||||
// quadratic contributions
|
// quadratic contributions
|
||||||
|
|
||||||
if (quadraticflag) {
|
if (quadraticflag) {
|
||||||
int k = ncoeff+1;
|
int k = ncoeff+1;
|
||||||
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
|
for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
|
||||||
|
|
|
@ -189,7 +189,7 @@ class PairTersoffKokkos : public PairTersoff {
|
||||||
// hardwired to space for 12 atom types
|
// hardwired to space for 12 atom types
|
||||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||||
|
|
||||||
int inum;
|
int inum;
|
||||||
typename AT::t_x_array_randomread x;
|
typename AT::t_x_array_randomread x;
|
||||||
typename AT::t_f_array f;
|
typename AT::t_f_array f;
|
||||||
typename AT::t_int_1d_randomread type;
|
typename AT::t_int_1d_randomread type;
|
||||||
|
|
|
@ -189,7 +189,7 @@ class PairTersoffMODKokkos : public PairTersoffMOD {
|
||||||
// hardwired to space for 12 atom types
|
// hardwired to space for 12 atom types
|
||||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||||
|
|
||||||
int inum;
|
int inum;
|
||||||
typename AT::t_x_array_randomread x;
|
typename AT::t_x_array_randomread x;
|
||||||
typename AT::t_f_array f;
|
typename AT::t_f_array f;
|
||||||
typename AT::t_int_1d_randomread type;
|
typename AT::t_int_1d_randomread type;
|
||||||
|
|
|
@ -194,7 +194,7 @@ class PairTersoffZBLKokkos : public PairTersoffZBL {
|
||||||
// hardwired to space for 12 atom types
|
// hardwired to space for 12 atom types
|
||||||
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
//params_ters m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1];
|
||||||
|
|
||||||
int inum;
|
int inum;
|
||||||
typename AT::t_x_array_randomread x;
|
typename AT::t_x_array_randomread x;
|
||||||
typename AT::t_f_array f;
|
typename AT::t_f_array f;
|
||||||
typename AT::t_int_1d_randomread type;
|
typename AT::t_int_1d_randomread type;
|
||||||
|
|
|
@ -28,10 +28,10 @@ template<class DeviceType>
|
||||||
inline
|
inline
|
||||||
SNAKokkos<DeviceType>::SNAKokkos(double rfac0_in,
|
SNAKokkos<DeviceType>::SNAKokkos(double rfac0_in,
|
||||||
int twojmax_in, int diagonalstyle_in, int use_shared_arrays_in,
|
int twojmax_in, int diagonalstyle_in, int use_shared_arrays_in,
|
||||||
double rmin0_in, int switch_flag_in, int bzero_flag_in)
|
double rmin0_in, int switch_flag_in, int bzero_flag_in)
|
||||||
{
|
{
|
||||||
wself = 1.0;
|
wself = 1.0;
|
||||||
|
|
||||||
use_shared_arrays = use_shared_arrays_in;
|
use_shared_arrays = use_shared_arrays_in;
|
||||||
rfac0 = rfac0_in;
|
rfac0 = rfac0_in;
|
||||||
rmin0 = rmin0_in;
|
rmin0 = rmin0_in;
|
||||||
|
@ -46,7 +46,7 @@ SNAKokkos<DeviceType>::SNAKokkos(double rfac0_in,
|
||||||
//create_twojmax_arrays();
|
//create_twojmax_arrays();
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
|
|
||||||
build_indexlist();
|
build_indexlist();
|
||||||
|
|
||||||
int jdim = twojmax + 1;
|
int jdim = twojmax + 1;
|
||||||
|
@ -1000,7 +1000,7 @@ void SNAKokkos<DeviceType>::compute_duarray(const typename Kokkos::TeamPolicy<De
|
||||||
dsfac *= wj;
|
dsfac *= wj;
|
||||||
|
|
||||||
for (int j = 0; j <= twojmax; j++)
|
for (int j = 0; j <= twojmax; j++)
|
||||||
for (int mb = 0; mb <= j; mb++)
|
for (int mb = 0; mb <= j; mb++)
|
||||||
for (int ma = 0; ma <= j; ma++) {
|
for (int ma = 0; ma <= j; ma++) {
|
||||||
duarray_r(j,mb,ma,0) = dsfac * uarray_r(j,ma,mb) * ux +
|
duarray_r(j,mb,ma,0) = dsfac * uarray_r(j,ma,mb) * ux +
|
||||||
sfac * duarray_r(j,mb,ma,0);
|
sfac * duarray_r(j,mb,ma,0);
|
||||||
|
|
|
@ -49,7 +49,7 @@ class PairLJCharmmfswCoulLong : public Pair {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int implicit;
|
int implicit;
|
||||||
int dihedflag;
|
int dihedflag;
|
||||||
|
|
||||||
double cut_lj_inner,cut_lj,cut_ljinv,cut_lj_innerinv;
|
double cut_lj_inner,cut_lj,cut_ljinv,cut_lj_innerinv;
|
||||||
double cut_lj_innersq,cut_ljsq;
|
double cut_lj_innersq,cut_ljsq;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||||
certain rights in this software. This software is distributed under
|
certain rights in this software. This software is distributed under
|
||||||
the GNU General Public License.
|
the GNU General Public License.
|
||||||
|
|
||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
|
@ -75,7 +75,7 @@ class PairPolymorphic : public Pair {
|
||||||
tabularFunction(int n, double x1, double x2) {
|
tabularFunction(int n, double x1, double x2) {
|
||||||
size = n;
|
size = n;
|
||||||
xmin = x1;
|
xmin = x1;
|
||||||
xmax = x2;
|
xmax = x2;
|
||||||
xmaxsq = xmax*xmax;
|
xmaxsq = xmax*xmax;
|
||||||
xs = new double[n];
|
xs = new double[n];
|
||||||
ys = new double[n];
|
ys = new double[n];
|
||||||
|
@ -87,9 +87,9 @@ class PairPolymorphic : public Pair {
|
||||||
ys6 = new double[n];
|
ys6 = new double[n];
|
||||||
}
|
}
|
||||||
virtual ~tabularFunction() {
|
virtual ~tabularFunction() {
|
||||||
if (xs) delete [] xs;
|
if (xs) delete [] xs;
|
||||||
if (ys) delete [] ys;
|
if (ys) delete [] ys;
|
||||||
if (ys1) delete [] ys1;
|
if (ys1) delete [] ys1;
|
||||||
if (ys2) delete [] ys2;
|
if (ys2) delete [] ys2;
|
||||||
if (ys3) delete [] ys3;
|
if (ys3) delete [] ys3;
|
||||||
if (ys4) delete [] ys4;
|
if (ys4) delete [] ys4;
|
||||||
|
@ -255,7 +255,7 @@ class PairPolymorphic : public Pair {
|
||||||
bool eta; // global indicator
|
bool eta; // global indicator
|
||||||
int nx,nr,ng; // table sizes
|
int nx,nr,ng; // table sizes
|
||||||
double maxX;
|
double maxX;
|
||||||
|
|
||||||
// parameter sets
|
// parameter sets
|
||||||
PairParameters * pairParameters; // for I-J interaction
|
PairParameters * pairParameters; // for I-J interaction
|
||||||
TripletParameters * tripletParameters; // for I-J-K interaction
|
TripletParameters * tripletParameters; // for I-J-K interaction
|
||||||
|
@ -264,7 +264,7 @@ class PairPolymorphic : public Pair {
|
||||||
int *firstneighV,*firstneighW,*firstneighW1;
|
int *firstneighV,*firstneighW,*firstneighW1;
|
||||||
double *delxV,*delyV,*delzV,*drV;
|
double *delxV,*delyV,*delzV,*drV;
|
||||||
double *delxW,*delyW,*delzW,*drW;
|
double *delxW,*delyW,*delzW,*drW;
|
||||||
|
|
||||||
char **elements; // names of unique elements
|
char **elements; // names of unique elements
|
||||||
int **elem2param; // map: element pairs to parameters
|
int **elem2param; // map: element pairs to parameters
|
||||||
int ***elem3param; // map: element triplets to parameters
|
int ***elem3param; // map: element triplets to parameters
|
||||||
|
@ -296,7 +296,7 @@ class PairPolymorphic : public Pair {
|
||||||
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2];
|
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void vec3_add(const double x[3], const double y[3],
|
inline void vec3_add(const double x[3], const double y[3],
|
||||||
double * const z) const {
|
double * const z) const {
|
||||||
z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2];
|
z[0] = x[0]+y[0]; z[1] = x[1]+y[1]; z[2] = x[2]+y[2];
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ class PairPolymorphic : public Pair {
|
||||||
y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2];
|
y[0] = k*x[0]; y[1] = k*x[1]; y[2] = k*x[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void vec3_scaleadd(const double k, const double x[3],
|
inline void vec3_scaleadd(const double k, const double x[3],
|
||||||
const double y[3], double * const z) const {
|
const double y[3], double * const z) const {
|
||||||
z[0] = k*x[0]+y[0];
|
z[0] = k*x[0]+y[0];
|
||||||
z[1] = k*x[1]+y[1];
|
z[1] = k*x[1]+y[1];
|
||||||
|
|
|
@ -197,7 +197,7 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
|
||||||
// setup of array of coordinates for molecule insertion
|
// setup of array of coordinates for molecule insertion
|
||||||
// also used by rotation moves for any molecule
|
// also used by rotation moves for any molecule
|
||||||
|
|
||||||
if (exchmode == EXCHATOM) natoms_per_molecule = 1;
|
if (exchmode == EXCHATOM) natoms_per_molecule = 1;
|
||||||
else natoms_per_molecule = onemols[imol]->natoms;
|
else natoms_per_molecule = onemols[imol]->natoms;
|
||||||
nmaxmolatoms = natoms_per_molecule;
|
nmaxmolatoms = natoms_per_molecule;
|
||||||
|
@ -469,7 +469,7 @@ void FixGCMC::init()
|
||||||
pmoltrans /= pmctot;
|
pmoltrans /= pmctot;
|
||||||
pmolrotate /= pmctot;
|
pmolrotate /= pmctot;
|
||||||
}
|
}
|
||||||
|
|
||||||
// decide whether to switch to the full_energy option
|
// decide whether to switch to the full_energy option
|
||||||
|
|
||||||
if (!full_flag) {
|
if (!full_flag) {
|
||||||
|
@ -689,7 +689,7 @@ void FixGCMC::init()
|
||||||
if (groupbit & 1)
|
if (groupbit & 1)
|
||||||
error->warning(FLERR, "Fix gcmc is being applied "
|
error->warning(FLERR, "Fix gcmc is being applied "
|
||||||
"to the default group all");
|
"to the default group all");
|
||||||
|
|
||||||
// construct group bitmask for all new atoms
|
// construct group bitmask for all new atoms
|
||||||
// aggregated over all group keywords
|
// aggregated over all group keywords
|
||||||
|
|
||||||
|
@ -1168,7 +1168,7 @@ void FixGCMC::attempt_molecule_rotation()
|
||||||
|
|
||||||
if (nmolcoords > nmaxmolatoms)
|
if (nmolcoords > nmaxmolatoms)
|
||||||
grow_molecule_arrays(nmolcoords);
|
grow_molecule_arrays(nmolcoords);
|
||||||
|
|
||||||
double com[3];
|
double com[3];
|
||||||
com[0] = com[1] = com[2] = 0.0;
|
com[0] = com[1] = com[2] = 0.0;
|
||||||
group->xcm(molecule_group,gas_mass,com);
|
group->xcm(molecule_group,gas_mass,com);
|
||||||
|
@ -1829,7 +1829,7 @@ void FixGCMC::attempt_molecule_rotation_full()
|
||||||
|
|
||||||
if (nmolcoords > nmaxmolatoms)
|
if (nmolcoords > nmaxmolatoms)
|
||||||
grow_molecule_arrays(nmolcoords);
|
grow_molecule_arrays(nmolcoords);
|
||||||
|
|
||||||
double com[3];
|
double com[3];
|
||||||
com[0] = com[1] = com[2] = 0.0;
|
com[0] = com[1] = com[2] = 0.0;
|
||||||
group->xcm(molecule_group,gas_mass,com);
|
group->xcm(molecule_group,gas_mass,com);
|
||||||
|
@ -1853,7 +1853,7 @@ void FixGCMC::attempt_molecule_rotation_full()
|
||||||
|
|
||||||
double **x = atom->x;
|
double **x = atom->x;
|
||||||
imageint *image = atom->image;
|
imageint *image = atom->image;
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (int i = 0; i < atom->nlocal; i++) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
if (mask[i] & molecule_group_bit) {
|
if (mask[i] & molecule_group_bit) {
|
||||||
|
@ -1921,10 +1921,10 @@ void FixGCMC::attempt_molecule_deletion_full()
|
||||||
for (int i = 0; i < atom->nlocal; i++)
|
for (int i = 0; i < atom->nlocal; i++)
|
||||||
if (atom->molecule[i] == deletion_molecule)
|
if (atom->molecule[i] == deletion_molecule)
|
||||||
if (atom->q_flag) nmolq++;
|
if (atom->q_flag) nmolq++;
|
||||||
|
|
||||||
if (nmolq > nmaxmolatoms)
|
if (nmolq > nmaxmolatoms)
|
||||||
grow_molecule_arrays(nmolq);
|
grow_molecule_arrays(nmolq);
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
int tmpmask[atom->nlocal];
|
int tmpmask[atom->nlocal];
|
||||||
for (int i = 0; i < atom->nlocal; i++) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
|
|
|
@ -58,7 +58,7 @@ class FixGCMC : public Fix {
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void restart(char *);
|
void restart(char *);
|
||||||
void grow_molecule_arrays(int);
|
void grow_molecule_arrays(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int molecule_group,molecule_group_bit;
|
int molecule_group,molecule_group_bit;
|
||||||
int molecule_group_inversebit;
|
int molecule_group_inversebit;
|
||||||
|
@ -118,9 +118,9 @@ class FixGCMC : public Fix {
|
||||||
double *molq;
|
double *molq;
|
||||||
imageint *molimage;
|
imageint *molimage;
|
||||||
imageint imagezero;
|
imageint imagezero;
|
||||||
double overlap_cutoffsq; // square distance cutoff for overlap
|
double overlap_cutoffsq; // square distance cutoff for overlap
|
||||||
int overlap_flag;
|
int overlap_flag;
|
||||||
|
|
||||||
double energy_intra;
|
double energy_intra;
|
||||||
|
|
||||||
class Pair *pair;
|
class Pair *pair;
|
||||||
|
@ -219,12 +219,12 @@ W: Fix gcmc using full_energy option
|
||||||
Fix gcmc has automatically turned on the full_energy option since it
|
Fix gcmc has automatically turned on the full_energy option since it
|
||||||
is required for systems like the one specified by the user. User input
|
is required for systems like the one specified by the user. User input
|
||||||
included one or more of the following: kspace, a hybrid
|
included one or more of the following: kspace, a hybrid
|
||||||
pair style, an eam pair style, tail correction,
|
pair style, an eam pair style, tail correction,
|
||||||
or no "single" function for the pair style.
|
or no "single" function for the pair style.
|
||||||
|
|
||||||
W: Energy of old configuration in fix gcmc is > MAXENERGYTEST.
|
W: Energy of old configuration in fix gcmc is > MAXENERGYTEST.
|
||||||
|
|
||||||
This probably means that a pair of atoms are closer than the
|
This probably means that a pair of atoms are closer than the
|
||||||
overlap cutoff distance for keyword overlap_cutoff.
|
overlap cutoff distance for keyword overlap_cutoff.
|
||||||
|
|
||||||
W: Fix gcmc is being applied to the default group all
|
W: Fix gcmc is being applied to the default group all
|
||||||
|
|
|
@ -63,7 +63,7 @@ class FixCMAP : public Fix {
|
||||||
int unpack_exchange(int, double *);
|
int unpack_exchange(int, double *);
|
||||||
|
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int nprocs,me;
|
int nprocs,me;
|
||||||
int newton_bond,eflag_caller;
|
int newton_bond,eflag_caller;
|
||||||
|
@ -111,7 +111,7 @@ class FixCMAP : public Fix {
|
||||||
void spl_interpolate(double, double *, double *, double &, double &);
|
void spl_interpolate(double, double *, double *, double &, double &);
|
||||||
|
|
||||||
// calculate dihedral angles
|
// calculate dihedral angles
|
||||||
|
|
||||||
double dihedral_angle_atan2(double, double, double, double, double, double,
|
double dihedral_angle_atan2(double, double, double, double, double, double,
|
||||||
double, double, double, double);
|
double, double, double, double);
|
||||||
|
|
||||||
|
|
|
@ -700,7 +700,7 @@ void FixQEq::read_file(char *file)
|
||||||
|
|
||||||
int ntypes = atom->ntypes;
|
int ntypes = atom->ntypes;
|
||||||
int *setflag = new int[ntypes+1];
|
int *setflag = new int[ntypes+1];
|
||||||
for (i=0; i < params_per_line; ++i) setflag[i] = 0;
|
for (i=0; i <= ntypes; ++i) setflag[i] = 0;
|
||||||
|
|
||||||
memory->create(chi,ntypes+1,"qeq:chi");
|
memory->create(chi,ntypes+1,"qeq:chi");
|
||||||
memory->create(eta,ntypes+1,"qeq:eta");
|
memory->create(eta,ntypes+1,"qeq:eta");
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ComputeEventDisplace : public Compute {
|
||||||
int all_events();
|
int all_events();
|
||||||
void reset_extra_compute_fix(const char *);
|
void reset_extra_compute_fix(const char *);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int triclinic;
|
int triclinic;
|
||||||
double displace_distsq;
|
double displace_distsq;
|
||||||
|
|
|
@ -52,7 +52,7 @@ class FixEHEX : public Fix {
|
||||||
double scale;
|
double scale;
|
||||||
char *idregion;
|
char *idregion;
|
||||||
int me;
|
int me;
|
||||||
|
|
||||||
double **x; // coordinates
|
double **x; // coordinates
|
||||||
double **f; // forces
|
double **f; // forces
|
||||||
double **v; // velocities
|
double **v; // velocities
|
||||||
|
@ -64,7 +64,7 @@ class FixEHEX : public Fix {
|
||||||
int constraints; // constraints (0/1)
|
int constraints; // constraints (0/1)
|
||||||
int cluster; // rescaling entire clusters (0/1)
|
int cluster; // rescaling entire clusters (0/1)
|
||||||
int hex; // HEX mode (0/1)
|
int hex; // HEX mode (0/1)
|
||||||
bool *scalingmask; // scalingmask[i] determines whether
|
bool *scalingmask; // scalingmask[i] determines whether
|
||||||
// the velocity of atom i is to be rescaled
|
// the velocity of atom i is to be rescaled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class FixEHEX : public Fix {
|
||||||
|
|
||||||
/* ERROR/WARNING messages:
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
E: Illegal fix ehex command: wrong number of parameters
|
E: Illegal fix ehex command: wrong number of parameters
|
||||||
|
|
||||||
Self-explanatory. Check the input script syntax and compare to the
|
Self-explanatory. Check the input script syntax and compare to the
|
||||||
documentation for the command. You can use -echo screen as a
|
documentation for the command. You can use -echo screen as a
|
||||||
|
|
|
@ -79,7 +79,7 @@ class FixRigidNHSmall : public FixRigidSmall {
|
||||||
void compute_press_target();
|
void compute_press_target();
|
||||||
void nh_epsilon_dot();
|
void nh_epsilon_dot();
|
||||||
void compute_dof();
|
void compute_dof();
|
||||||
|
|
||||||
void allocate_chain();
|
void allocate_chain();
|
||||||
void allocate_order();
|
void allocate_order();
|
||||||
void deallocate_chain();
|
void deallocate_chain();
|
||||||
|
|
|
@ -67,7 +67,7 @@ class FixShake : public Fix {
|
||||||
int max_iter; // max # of SHAKE iterations
|
int max_iter; // max # of SHAKE iterations
|
||||||
int output_every; // SHAKE stat output every so often
|
int output_every; // SHAKE stat output every so often
|
||||||
bigint next_output; // timestep for next output
|
bigint next_output; // timestep for next output
|
||||||
|
|
||||||
// settings from input command
|
// settings from input command
|
||||||
int *bond_flag,*angle_flag; // bond/angle types to constrain
|
int *bond_flag,*angle_flag; // bond/angle types to constrain
|
||||||
int *type_flag; // constrain bonds to these types
|
int *type_flag; // constrain bonds to these types
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PairOxdna2Excv : public PairOxdnaExcv {
|
||||||
public:
|
public:
|
||||||
PairOxdna2Excv(class LAMMPS *);
|
PairOxdna2Excv(class LAMMPS *);
|
||||||
virtual ~PairOxdna2Excv();
|
virtual ~PairOxdna2Excv();
|
||||||
virtual void compute_interaction_sites(double *,
|
virtual void compute_interaction_sites(double *,
|
||||||
double *, double *, double *);
|
double *, double *, double *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PairOxdnaExcv : public Pair {
|
||||||
public:
|
public:
|
||||||
PairOxdnaExcv(class LAMMPS *);
|
PairOxdnaExcv(class LAMMPS *);
|
||||||
virtual ~PairOxdnaExcv();
|
virtual ~PairOxdnaExcv();
|
||||||
virtual void compute_interaction_sites(double *, double *,
|
virtual void compute_interaction_sites(double *, double *,
|
||||||
double *, double *);
|
double *, double *);
|
||||||
virtual void compute(int, int);
|
virtual void compute(int, int);
|
||||||
void settings(int, char **);
|
void settings(int, char **);
|
||||||
|
|
|
@ -57,7 +57,7 @@ class DihedralFourierIntel : public DihedralFourier {
|
||||||
template <class flt_t>
|
template <class flt_t>
|
||||||
class ForceConst {
|
class ForceConst {
|
||||||
public:
|
public:
|
||||||
typedef struct { flt_t cos_shift, sin_shift, k;
|
typedef struct { flt_t cos_shift, sin_shift, k;
|
||||||
int multiplicity; } fc_packed1;
|
int multiplicity; } fc_packed1;
|
||||||
|
|
||||||
fc_packed1 **bp;
|
fc_packed1 **bp;
|
||||||
|
@ -65,7 +65,7 @@ class DihedralFourierIntel : public DihedralFourier {
|
||||||
ForceConst() : _nbondtypes(0) {}
|
ForceConst() : _nbondtypes(0) {}
|
||||||
~ForceConst() { set_ntypes(0, NULL, NULL, NULL); }
|
~ForceConst() { set_ntypes(0, NULL, NULL, NULL); }
|
||||||
|
|
||||||
void set_ntypes(const int nbondtypes, int *setflag, int *nterms,
|
void set_ntypes(const int nbondtypes, int *setflag, int *nterms,
|
||||||
Memory *memory);
|
Memory *memory);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -60,59 +60,59 @@ namespace mm512 {
|
||||||
#ifndef __AVX512F__
|
#ifndef __AVX512F__
|
||||||
|
|
||||||
#ifndef FVEC_FIRST_PASS
|
#ifndef FVEC_FIRST_PASS
|
||||||
VEC_INLINE static inline __m512i _mm512_mask_expand_epi32(__m512i src,
|
VEC_INLINE static inline __m512i _mm512_mask_expand_epi32(__m512i src,
|
||||||
__mmask16 k,
|
__mmask16 k,
|
||||||
__m512i a) {
|
__m512i a) {
|
||||||
int buf[16] __attribute__((aligned(64)));
|
int buf[16] __attribute__((aligned(64)));
|
||||||
_mm512_store_epi32(buf, a);
|
_mm512_store_epi32(buf, a);
|
||||||
return _mm512_mask_loadunpacklo_epi32(src, k, buf);
|
return _mm512_mask_loadunpacklo_epi32(src, k, buf);
|
||||||
}
|
}
|
||||||
VEC_INLINE static inline __m512i _mm512_maskz_expand_epi32(__mmask16 k,
|
VEC_INLINE static inline __m512i _mm512_maskz_expand_epi32(__mmask16 k,
|
||||||
__m512i a) {
|
__m512i a) {
|
||||||
int buf[16] __attribute__((aligned(64)));
|
int buf[16] __attribute__((aligned(64)));
|
||||||
_mm512_store_epi32(buf, a);
|
_mm512_store_epi32(buf, a);
|
||||||
return _mm512_mask_loadunpacklo_epi32(_mm512_setzero_epi32(), k, buf);
|
return _mm512_mask_loadunpacklo_epi32(_mm512_setzero_epi32(), k, buf);
|
||||||
}
|
}
|
||||||
VEC_INLINE static inline __m512i _mm512_mask_compress_epi32(__m512i src,
|
VEC_INLINE static inline __m512i _mm512_mask_compress_epi32(__m512i src,
|
||||||
__mmask16 k,
|
__mmask16 k,
|
||||||
__m512i a) {
|
__m512i a) {
|
||||||
int buf[16] __attribute__((aligned(64)));
|
int buf[16] __attribute__((aligned(64)));
|
||||||
_mm512_store_epi32(buf, src);
|
_mm512_store_epi32(buf, src);
|
||||||
_mm512_mask_packstorelo_epi32(buf, k, a);
|
_mm512_mask_packstorelo_epi32(buf, k, a);
|
||||||
return _mm512_load_epi32(buf);
|
return _mm512_load_epi32(buf);
|
||||||
}
|
}
|
||||||
VEC_INLINE static inline __m512i _mm512_maskz_compress_epi32(__mmask16 k,
|
VEC_INLINE static inline __m512i _mm512_maskz_compress_epi32(__mmask16 k,
|
||||||
__m512i a) {
|
__m512i a) {
|
||||||
int buf[16] __attribute__((aligned(64))) = {0};
|
int buf[16] __attribute__((aligned(64))) = {0};
|
||||||
_mm512_mask_packstorelo_epi32(buf, k, a);
|
_mm512_mask_packstorelo_epi32(buf, k, a);
|
||||||
return _mm512_load_epi32(buf);
|
return _mm512_load_epi32(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static inline void _mm512_mask_compressstoreu_epi32(int * dest,
|
VEC_INLINE static inline void _mm512_mask_compressstoreu_epi32(int * dest,
|
||||||
__mmask16 mask,
|
__mmask16 mask,
|
||||||
__m512i src) {
|
__m512i src) {
|
||||||
_mm512_mask_packstorelo_epi32(dest, mask, src);
|
_mm512_mask_packstorelo_epi32(dest, mask, src);
|
||||||
_mm512_mask_packstorehi_epi32(dest + 16, mask, src);
|
_mm512_mask_packstorehi_epi32(dest + 16, mask, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static inline __m512i _mm512_mask_loadu_epi32(__m512i src,
|
VEC_INLINE static inline __m512i _mm512_mask_loadu_epi32(__m512i src,
|
||||||
__mmask16 k,
|
__mmask16 k,
|
||||||
const int * mem_addr) {
|
const int * mem_addr) {
|
||||||
assert((k & (k + 1)) == 0);
|
assert((k & (k + 1)) == 0);
|
||||||
__m512i ret = _mm512_mask_loadunpacklo_epi32(src, k, mem_addr);
|
__m512i ret = _mm512_mask_loadunpacklo_epi32(src, k, mem_addr);
|
||||||
ret = _mm512_mask_loadunpackhi_epi32(ret, k, mem_addr + 16);
|
ret = _mm512_mask_loadunpackhi_epi32(ret, k, mem_addr + 16);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
VEC_INLINE static inline __m512i _mm512_maskz_loadu_epi32(__mmask16 k,
|
VEC_INLINE static inline __m512i _mm512_maskz_loadu_epi32(__mmask16 k,
|
||||||
const int * mem_addr) {
|
const int * mem_addr) {
|
||||||
assert((k & (k + 1)) == 0);
|
assert((k & (k + 1)) == 0);
|
||||||
__m512i ret = _mm512_mask_loadunpacklo_epi32(_mm512_setzero_epi32(), k,
|
__m512i ret = _mm512_mask_loadunpacklo_epi32(_mm512_setzero_epi32(), k,
|
||||||
mem_addr);
|
mem_addr);
|
||||||
ret = _mm512_mask_loadunpackhi_epi32(ret, k, mem_addr + 16);
|
ret = _mm512_mask_loadunpackhi_epi32(ret, k, mem_addr + 16);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
VEC_INLINE static inline void _mm512_mask_storeu_epi32(int * dest,
|
VEC_INLINE static inline void _mm512_mask_storeu_epi32(int * dest,
|
||||||
__mmask16 mask,
|
__mmask16 mask,
|
||||||
__m512i src) {
|
__m512i src) {
|
||||||
assert((mask & (mask + 1)) == 0);
|
assert((mask & (mask + 1)) == 0);
|
||||||
_mm512_mask_packstorelo_epi32(dest, mask, src);
|
_mm512_mask_packstorelo_epi32(dest, mask, src);
|
||||||
|
@ -181,7 +181,7 @@ public:
|
||||||
VEC_INLINE static int kortestz(const BVEC_NAME &a, const BVEC_NAME &b) {
|
VEC_INLINE static int kortestz(const BVEC_NAME &a, const BVEC_NAME &b) {
|
||||||
return _mm512_kortestz(a.val_, b.val_);
|
return _mm512_kortestz(a.val_, b.val_);
|
||||||
}
|
}
|
||||||
VEC_INLINE static BVEC_NAME masku_compress(const BVEC_NAME &mask,
|
VEC_INLINE static BVEC_NAME masku_compress(const BVEC_NAME &mask,
|
||||||
const BVEC_NAME &a) {
|
const BVEC_NAME &a) {
|
||||||
const __m512i c_i1 = _mm512_set1_epi32(1);
|
const __m512i c_i1 = _mm512_set1_epi32(1);
|
||||||
__m512i a_int_vec = _mm512_mask_blend_epi32(a.val_, _mm512_setzero_epi32(),
|
__m512i a_int_vec = _mm512_mask_blend_epi32(a.val_, _mm512_setzero_epi32(),
|
||||||
|
@ -190,13 +190,13 @@ public:
|
||||||
mask.val_, a_int_vec);
|
mask.val_, a_int_vec);
|
||||||
return _mm512_cmpeq_epi32_mask(compressed, c_i1);
|
return _mm512_cmpeq_epi32_mask(compressed, c_i1);
|
||||||
}
|
}
|
||||||
VEC_INLINE static BVEC_NAME mask_expand(const BVEC_NAME &src,
|
VEC_INLINE static BVEC_NAME mask_expand(const BVEC_NAME &src,
|
||||||
const BVEC_NAME &mask,
|
const BVEC_NAME &mask,
|
||||||
const BVEC_NAME &a) {
|
const BVEC_NAME &a) {
|
||||||
const __m512i c_i1 = _mm512_set1_epi32(1);
|
const __m512i c_i1 = _mm512_set1_epi32(1);
|
||||||
__m512i a_int_vec = _mm512_mask_blend_epi32(a.val_, _mm512_setzero_epi32(),
|
__m512i a_int_vec = _mm512_mask_blend_epi32(a.val_, _mm512_setzero_epi32(),
|
||||||
c_i1);
|
c_i1);
|
||||||
__m512i src_int_vec = _mm512_mask_blend_epi32(src.val_,
|
__m512i src_int_vec = _mm512_mask_blend_epi32(src.val_,
|
||||||
_mm512_setzero_epi32(), c_i1);
|
_mm512_setzero_epi32(), c_i1);
|
||||||
__m512i compressed = _mm512_mask_expand_epi32(src_int_vec, mask.val_,
|
__m512i compressed = _mm512_mask_expand_epi32(src_int_vec, mask.val_,
|
||||||
a_int_vec);
|
a_int_vec);
|
||||||
|
@ -318,19 +318,19 @@ public:
|
||||||
VEC_INLINE static IVEC_NAME load(const int * src) {
|
VEC_INLINE static IVEC_NAME load(const int * src) {
|
||||||
return _mm512_load_epi32(src);
|
return _mm512_load_epi32(src);
|
||||||
}
|
}
|
||||||
VEC_INLINE static IVEC_NAME mask_loadu(const BVEC_NAME &mask,
|
VEC_INLINE static IVEC_NAME mask_loadu(const BVEC_NAME &mask,
|
||||||
const int * src) {
|
const int * src) {
|
||||||
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
||||||
assert(mask.val_ <= BVEC_NAME::full().val_);
|
assert(mask.val_ <= BVEC_NAME::full().val_);
|
||||||
return _mm512_mask_loadu_epi32(_mm512_undefined_epi32(), mask.val_, src);
|
return _mm512_mask_loadu_epi32(_mm512_undefined_epi32(), mask.val_, src);
|
||||||
}
|
}
|
||||||
VEC_INLINE static IVEC_NAME maskz_loadu(const BVEC_NAME &mask,
|
VEC_INLINE static IVEC_NAME maskz_loadu(const BVEC_NAME &mask,
|
||||||
const int * src) {
|
const int * src) {
|
||||||
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
||||||
assert(mask.val_ <= BVEC_NAME::full().val_);
|
assert(mask.val_ <= BVEC_NAME::full().val_);
|
||||||
return _mm512_maskz_loadu_epi32(mask.val_, src);
|
return _mm512_maskz_loadu_epi32(mask.val_, src);
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_storeu(const BVEC_NAME &mask, int * dest,
|
VEC_INLINE static void mask_storeu(const BVEC_NAME &mask, int * dest,
|
||||||
const IVEC_NAME &src) {
|
const IVEC_NAME &src) {
|
||||||
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
assert((mask.val_ & (mask.val_ + 1)) == 0);
|
||||||
assert(mask.val_ <= BVEC_NAME::full().val_);
|
assert(mask.val_ <= BVEC_NAME::full().val_);
|
||||||
|
@ -341,16 +341,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static IVEC_NAME mask_gather(
|
VEC_INLINE static IVEC_NAME mask_gather(
|
||||||
const IVEC_NAME &src, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
const IVEC_NAME &src, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
||||||
const int * mem, const int scale
|
const int * mem, const int scale
|
||||||
) {
|
) {
|
||||||
assert(mask.val_ <= BVEC_NAME::full().val_);
|
assert(mask.val_ <= BVEC_NAME::full().val_);
|
||||||
assert(scale == sizeof(int));
|
assert(scale == sizeof(int));
|
||||||
return _mm512_mask_i32gather_epi32(src.val_, mask.val_, idx.val_, mem,
|
return _mm512_mask_i32gather_epi32(src.val_, mask.val_, idx.val_, mem,
|
||||||
sizeof(int));
|
sizeof(int));
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_i32scatter(
|
VEC_INLINE static void mask_i32scatter(
|
||||||
int * mem, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
int * mem, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
||||||
const IVEC_NAME &a, const int scale
|
const IVEC_NAME &a, const int scale
|
||||||
) {
|
) {
|
||||||
assert(mask.val_ <= BVEC_NAME::full().val_);
|
assert(mask.val_ <= BVEC_NAME::full().val_);
|
||||||
|
@ -505,8 +505,8 @@ public:
|
||||||
FVEC_SUFFIX(_mm512_store_)(dest, a.val_);
|
FVEC_SUFFIX(_mm512_store_)(dest, a.val_);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static FVEC_NAME gather(const IVEC_NAME &idx,
|
VEC_INLINE static FVEC_NAME gather(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem,
|
const FVEC_SCAL_T * mem,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
# if FVEC_LEN==8
|
# if FVEC_LEN==8
|
||||||
|
@ -529,22 +529,22 @@ public:
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static void gather_3_adjacent(const IVEC_NAME &idx,
|
VEC_INLINE static void gather_3_adjacent(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem,
|
const FVEC_SCAL_T * mem,
|
||||||
const int scale,
|
const int scale,
|
||||||
FVEC_NAME * out_0,
|
FVEC_NAME * out_0,
|
||||||
FVEC_NAME * out_1,
|
FVEC_NAME * out_1,
|
||||||
FVEC_NAME * out_2) {
|
FVEC_NAME * out_2) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
*out_0 = FVEC_NAME::gather(idx, mem + 0, scale);
|
*out_0 = FVEC_NAME::gather(idx, mem + 0, scale);
|
||||||
*out_1 = FVEC_NAME::gather(idx, mem + 1, scale);
|
*out_1 = FVEC_NAME::gather(idx, mem + 1, scale);
|
||||||
*out_2 = FVEC_NAME::gather(idx, mem + 2, scale);
|
*out_2 = FVEC_NAME::gather(idx, mem + 2, scale);
|
||||||
}
|
}
|
||||||
VEC_INLINE static void gather_4_adjacent(const IVEC_NAME &idx,
|
VEC_INLINE static void gather_4_adjacent(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem,
|
const FVEC_SCAL_T * mem,
|
||||||
const int scale, FVEC_NAME * out_0,
|
const int scale, FVEC_NAME * out_0,
|
||||||
FVEC_NAME * out_1,
|
FVEC_NAME * out_1,
|
||||||
FVEC_NAME * out_2,
|
FVEC_NAME * out_2,
|
||||||
FVEC_NAME * out_3) {
|
FVEC_NAME * out_3) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
*out_0 = FVEC_NAME::gather(idx, mem + 0, scale);
|
*out_0 = FVEC_NAME::gather(idx, mem + 0, scale);
|
||||||
|
@ -553,7 +553,7 @@ public:
|
||||||
*out_3 = FVEC_NAME::gather(idx, mem + 3, scale);
|
*out_3 = FVEC_NAME::gather(idx, mem + 3, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static FVEC_SCAL_T mask_reduce_add(const BVEC_NAME &mask,
|
VEC_INLINE static FVEC_SCAL_T mask_reduce_add(const BVEC_NAME &mask,
|
||||||
const FVEC_NAME &a) {
|
const FVEC_NAME &a) {
|
||||||
return FVEC_SUFFIX(_mm512_mask_reduce_add_)(mask.val_, a.val_);
|
return FVEC_SUFFIX(_mm512_mask_reduce_add_)(mask.val_, a.val_);
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ public:
|
||||||
|
|
||||||
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
||||||
#ifdef __AVX512PF__
|
#ifdef __AVX512PF__
|
||||||
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
||||||
sizeof(FVEC_SCAL_T), _MM_HINT_T0);
|
sizeof(FVEC_SCAL_T), _MM_HINT_T0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -621,10 +621,10 @@ public:
|
||||||
) {
|
) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
# if FVEC_LEN==8
|
# if FVEC_LEN==8
|
||||||
FVEC_SUFFIX(_mm512_mask_i32loscatter_)(mem, mask.val_, idx.val_, a.val_,
|
FVEC_SUFFIX(_mm512_mask_i32loscatter_)(mem, mask.val_, idx.val_, a.val_,
|
||||||
sizeof(FVEC_SCAL_T));
|
sizeof(FVEC_SCAL_T));
|
||||||
# else
|
# else
|
||||||
FVEC_SUFFIX(_mm512_mask_i32scatter_)(mem, mask.val_, idx.val_, a.val_,
|
FVEC_SUFFIX(_mm512_mask_i32scatter_)(mem, mask.val_, idx.val_, a.val_,
|
||||||
sizeof(FVEC_SCAL_T));
|
sizeof(FVEC_SCAL_T));
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ public:
|
||||||
AVEC_BINOP(-, sub)
|
AVEC_BINOP(-, sub)
|
||||||
|
|
||||||
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
||||||
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
||||||
sizeof(FVEC_SCAL_T), _MM_HINT_T0);
|
sizeof(FVEC_SCAL_T), _MM_HINT_T0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -644,7 +644,7 @@ public:
|
||||||
#if FVEC_LEN==16
|
#if FVEC_LEN==16
|
||||||
class avec16pd {
|
class avec16pd {
|
||||||
__m512d lo_, hi_;
|
__m512d lo_, hi_;
|
||||||
VEC_INLINE avec16pd(const __m512d &lo, const __m512d &hi) : lo_(lo), hi_(hi)
|
VEC_INLINE avec16pd(const __m512d &lo, const __m512d &hi) : lo_(lo), hi_(hi)
|
||||||
{}
|
{}
|
||||||
VEC_INLINE static __mmask8 get_bvec_hi(__mmask16 a) {
|
VEC_INLINE static __mmask8 get_bvec_hi(__mmask16 a) {
|
||||||
return a >> 8;
|
return a >> 8;
|
||||||
|
@ -665,10 +665,10 @@ public:
|
||||||
const double * mem, const int scale
|
const double * mem, const int scale
|
||||||
) {
|
) {
|
||||||
assert(scale == sizeof(double));
|
assert(scale == sizeof(double));
|
||||||
__m512d lo = _mm512_mask_i32logather_pd(src.lo_, mask.val_, idx.val_, mem,
|
__m512d lo = _mm512_mask_i32logather_pd(src.lo_, mask.val_, idx.val_, mem,
|
||||||
sizeof(double));
|
sizeof(double));
|
||||||
__m512d hi = _mm512_mask_i32logather_pd(src.hi_, get_bvec_hi(mask.val_),
|
__m512d hi = _mm512_mask_i32logather_pd(src.hi_, get_bvec_hi(mask.val_),
|
||||||
get_ivec_hi(idx.val_), mem,
|
get_ivec_hi(idx.val_), mem,
|
||||||
sizeof(double));
|
sizeof(double));
|
||||||
return avec16pd(lo, hi);
|
return avec16pd(lo, hi);
|
||||||
}
|
}
|
||||||
|
@ -677,9 +677,9 @@ public:
|
||||||
const avec16pd &a, const int scale
|
const avec16pd &a, const int scale
|
||||||
) {
|
) {
|
||||||
assert(scale == sizeof(double));
|
assert(scale == sizeof(double));
|
||||||
_mm512_mask_i32loscatter_pd(mem, mask.val_, idx.val_, a.lo_,
|
_mm512_mask_i32loscatter_pd(mem, mask.val_, idx.val_, a.lo_,
|
||||||
sizeof(double));
|
sizeof(double));
|
||||||
_mm512_mask_i32loscatter_pd(mem, get_bvec_hi(mask.val_),
|
_mm512_mask_i32loscatter_pd(mem, get_bvec_hi(mask.val_),
|
||||||
get_ivec_hi(idx.val_), a.hi_, sizeof(double));
|
get_ivec_hi(idx.val_), a.hi_, sizeof(double));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,7 +692,7 @@ public:
|
||||||
AVEC2_BINOP(-, sub)
|
AVEC2_BINOP(-, sub)
|
||||||
|
|
||||||
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
VEC_INLINE static void gather_prefetch0(const IVEC_NAME &a, void * mem) {
|
||||||
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
_mm512_mask_prefetch_i32gather_ps(a.val_, BVEC_NAME::full().val_, mem,
|
||||||
sizeof(double), _MM_HINT_T0);
|
sizeof(double), _MM_HINT_T0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -808,17 +808,17 @@ VEC_INLINE inline __m256i _cm256_and_si256(const __m256i &a, const __m256i &b) {
|
||||||
IVEC_EM_BIN(_mm_and_si128)
|
IVEC_EM_BIN(_mm_and_si128)
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_andnot_si256(const __m256i &a,
|
VEC_INLINE inline __m256i _cm256_andnot_si256(const __m256i &a,
|
||||||
const __m256i &b) {
|
const __m256i &b) {
|
||||||
IVEC_EM_BIN(_mm_andnot_si128)
|
IVEC_EM_BIN(_mm_andnot_si128)
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_cmpeq_epi32(const __m256i &a,
|
VEC_INLINE inline __m256i _cm256_cmpeq_epi32(const __m256i &a,
|
||||||
const __m256i &b) {
|
const __m256i &b) {
|
||||||
IVEC_EM_BIN(_mm_cmpeq_epi32)
|
IVEC_EM_BIN(_mm_cmpeq_epi32)
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_cmpgt_epi32(const __m256i &a,
|
VEC_INLINE inline __m256i _cm256_cmpgt_epi32(const __m256i &a,
|
||||||
const __m256i &b) {
|
const __m256i &b) {
|
||||||
IVEC_EM_BIN(_mm_cmpgt_epi32)
|
IVEC_EM_BIN(_mm_cmpgt_epi32)
|
||||||
}
|
}
|
||||||
|
@ -843,7 +843,7 @@ VEC_INLINE inline __m256i _cm256_cvtepu8_epi32(const __m128i &a) {
|
||||||
} \
|
} \
|
||||||
return _mm256_load_si256((__m256i*) dest);
|
return _mm256_load_si256((__m256i*) dest);
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_permutevar8x32_epi32(const __m256i &a,
|
VEC_INLINE inline __m256i _cm256_permutevar8x32_epi32(const __m256i &a,
|
||||||
const __m256i &b) {
|
const __m256i &b) {
|
||||||
IVEC_EM_SCAL(buf_a[buf_b[i]])
|
IVEC_EM_SCAL(buf_a[buf_b[i]])
|
||||||
}
|
}
|
||||||
|
@ -857,7 +857,7 @@ VEC_INLINE inline __m256i _cm256_srlv_epi32(__m256i a, __m256i b) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VEC_INLINE inline __m256 _cm256_permutevar8x32_ps(const __m256 &a,
|
VEC_INLINE inline __m256 _cm256_permutevar8x32_ps(const __m256 &a,
|
||||||
const __m256i &b) {
|
const __m256i &b) {
|
||||||
return _mm256_castsi256_ps(_cm256_permutevar8x32_epi32(_mm256_castps_si256(a),
|
return _mm256_castsi256_ps(_cm256_permutevar8x32_epi32(_mm256_castps_si256(a),
|
||||||
b));
|
b));
|
||||||
|
@ -877,10 +877,10 @@ VEC_INLINE inline __m256i _cm256_maskload_epi32(int const * mem, __m256i mask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_mask_i32gather_epi32(__m256i src,
|
VEC_INLINE inline __m256i _cm256_mask_i32gather_epi32(__m256i src,
|
||||||
int const * base_addr,
|
int const * base_addr,
|
||||||
__m256i index,
|
__m256i index,
|
||||||
__m256i mask,
|
__m256i mask,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
assert(scale == sizeof(int));
|
assert(scale == sizeof(int));
|
||||||
int buf_index[8] __attribute__((aligned(32)));
|
int buf_index[8] __attribute__((aligned(32)));
|
||||||
|
@ -895,16 +895,16 @@ VEC_INLINE inline __m256i _cm256_mask_i32gather_epi32(__m256i src,
|
||||||
return _mm256_load_si256((__m256i*) dest);
|
return _mm256_load_si256((__m256i*) dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256 _cm256_mask_i32gather_ps(__m256 src,
|
VEC_INLINE inline __m256 _cm256_mask_i32gather_ps(__m256 src,
|
||||||
float const * base_addr,
|
float const * base_addr,
|
||||||
__m256i index, __m256 mask,
|
__m256i index, __m256 mask,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
return _mm256_castsi256_ps(_cm256_mask_i32gather_epi32(
|
return _mm256_castsi256_ps(_cm256_mask_i32gather_epi32(
|
||||||
_mm256_castps_si256(src), (const int *) base_addr, index,
|
_mm256_castps_si256(src), (const int *) base_addr, index,
|
||||||
_mm256_castps_si256(mask), scale));
|
_mm256_castps_si256(mask), scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256d _cm256_mask_i32gather_pd(__m256d src,
|
VEC_INLINE inline __m256d _cm256_mask_i32gather_pd(__m256d src,
|
||||||
double const * base_addr,
|
double const * base_addr,
|
||||||
__m128i index, __m256d mask,
|
__m128i index, __m256d mask,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
|
@ -922,7 +922,7 @@ VEC_INLINE inline __m256d _cm256_mask_i32gather_pd(__m256d src,
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256i _cm256_i32gather_epi32(int const * base_addr,
|
VEC_INLINE inline __m256i _cm256_i32gather_epi32(int const * base_addr,
|
||||||
__m256i index,
|
__m256i index,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
assert(scale == sizeof(int));
|
assert(scale == sizeof(int));
|
||||||
int buf_index[8] __attribute__((aligned(32)));
|
int buf_index[8] __attribute__((aligned(32)));
|
||||||
|
@ -1007,12 +1007,12 @@ VEC_INLINE inline uint64_t _cext_u64(uint64_t tmp, uint64_t mask) {
|
||||||
|
|
||||||
VEC_INLINE inline __m256 _mm256_compress_ps(__m256 mask, __m256 a) {
|
VEC_INLINE inline __m256 _mm256_compress_ps(__m256 mask, __m256 a) {
|
||||||
# ifdef __AVX2__
|
# ifdef __AVX2__
|
||||||
uint64_t expanded_mask = _pdep_u64(_mm256_movemask_ps(mask),
|
uint64_t expanded_mask = _pdep_u64(_mm256_movemask_ps(mask),
|
||||||
0x0101010101010101);
|
0x0101010101010101);
|
||||||
// unpack each bit to a byte
|
// unpack each bit to a byte
|
||||||
expanded_mask *= 0xFF; // mask |= mask<<1 | mask<<2 | ... | mask<<7;
|
expanded_mask *= 0xFF; // mask |= mask<<1 | mask<<2 | ... | mask<<7;
|
||||||
// the identity shuffle for vpermps, packed to one index per byte
|
// the identity shuffle for vpermps, packed to one index per byte
|
||||||
const uint64_t identity_indices = 0x0706050403020100;
|
const uint64_t identity_indices = 0x0706050403020100;
|
||||||
uint64_t wanted_indices = _pext_u64(identity_indices, expanded_mask);
|
uint64_t wanted_indices = _pext_u64(identity_indices, expanded_mask);
|
||||||
|
|
||||||
__m128i bytevec = _mm_cvtsi64_si128(wanted_indices);
|
__m128i bytevec = _mm_cvtsi64_si128(wanted_indices);
|
||||||
|
@ -1036,7 +1036,7 @@ VEC_INLINE inline __m256 _mm256_compress_ps(__m256 mask, __m256 a) {
|
||||||
}
|
}
|
||||||
VEC_INLINE inline __m256 _mm256_expand_ps(__m256 mask, __m256 a) {
|
VEC_INLINE inline __m256 _mm256_expand_ps(__m256 mask, __m256 a) {
|
||||||
# ifdef __AVX2__
|
# ifdef __AVX2__
|
||||||
uint64_t expanded_mask = _pdep_u64(_mm256_movemask_ps(mask),
|
uint64_t expanded_mask = _pdep_u64(_mm256_movemask_ps(mask),
|
||||||
0x0101010101010101);
|
0x0101010101010101);
|
||||||
expanded_mask *= 0xFF;
|
expanded_mask *= 0xFF;
|
||||||
const uint64_t identity_indices = 0x0706050403020100;
|
const uint64_t identity_indices = 0x0706050403020100;
|
||||||
|
@ -1061,11 +1061,11 @@ VEC_INLINE inline __m256 _mm256_expand_ps(__m256 mask, __m256 a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE inline __m256d _mm256_compress_pd(__m256d mask, __m256d a) {
|
VEC_INLINE inline __m256d _mm256_compress_pd(__m256d mask, __m256d a) {
|
||||||
return _mm256_castps_pd(_mm256_compress_ps(_mm256_castpd_ps(mask),
|
return _mm256_castps_pd(_mm256_compress_ps(_mm256_castpd_ps(mask),
|
||||||
_mm256_castpd_ps(a)));
|
_mm256_castpd_ps(a)));
|
||||||
}
|
}
|
||||||
VEC_INLINE inline __m256d _mm256_expand_pd(__m256d mask, __m256d a) {
|
VEC_INLINE inline __m256d _mm256_expand_pd(__m256d mask, __m256d a) {
|
||||||
return _mm256_castps_pd(_mm256_expand_ps(_mm256_castpd_ps(mask),
|
return _mm256_castps_pd(_mm256_expand_ps(_mm256_castpd_ps(mask),
|
||||||
_mm256_castpd_ps(a)));
|
_mm256_castpd_ps(a)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1093,12 +1093,12 @@ public:
|
||||||
VEC_INLINE static BVEC_NAME kandn(const BVEC_NAME &a, const BVEC_NAME &b) {
|
VEC_INLINE static BVEC_NAME kandn(const BVEC_NAME &a, const BVEC_NAME &b) {
|
||||||
return FVEC_SUFFIX(_mm256_andnot_)(a.val_, b.val_);
|
return FVEC_SUFFIX(_mm256_andnot_)(a.val_, b.val_);
|
||||||
}
|
}
|
||||||
VEC_INLINE static BVEC_NAME masku_compress(const BVEC_NAME &mask,
|
VEC_INLINE static BVEC_NAME masku_compress(const BVEC_NAME &mask,
|
||||||
const BVEC_NAME &a) {
|
const BVEC_NAME &a) {
|
||||||
return FVEC_SUFFIX(_mm256_compress_)(mask.val_, a.val_);
|
return FVEC_SUFFIX(_mm256_compress_)(mask.val_, a.val_);
|
||||||
}
|
}
|
||||||
VEC_INLINE static BVEC_NAME mask_expand(const BVEC_NAME &src,
|
VEC_INLINE static BVEC_NAME mask_expand(const BVEC_NAME &src,
|
||||||
const BVEC_NAME &mask,
|
const BVEC_NAME &mask,
|
||||||
const BVEC_NAME &a) {
|
const BVEC_NAME &a) {
|
||||||
FVEC_MASK_T ret = FVEC_SUFFIX(_mm256_expand_)(mask.val_, a.val_);
|
FVEC_MASK_T ret = FVEC_SUFFIX(_mm256_expand_)(mask.val_, a.val_);
|
||||||
ret = FVEC_SUFFIX(_mm256_and_)(mask.val_, ret);
|
ret = FVEC_SUFFIX(_mm256_and_)(mask.val_, ret);
|
||||||
|
@ -1244,7 +1244,7 @@ public:
|
||||||
VEC_INLINE static IVEC_NAME mask_blend(
|
VEC_INLINE static IVEC_NAME mask_blend(
|
||||||
const BVEC_NAME &mask, const IVEC_NAME &a, const IVEC_NAME &b
|
const BVEC_NAME &mask, const IVEC_NAME &a, const IVEC_NAME &b
|
||||||
) {
|
) {
|
||||||
return to(FVEC_SUFFIX(_mm256_blendv_)(from(a.val_), from(b.val_),
|
return to(FVEC_SUFFIX(_mm256_blendv_)(from(a.val_), from(b.val_),
|
||||||
mask.val_));
|
mask.val_));
|
||||||
}
|
}
|
||||||
#define IVEC_MASK_BINFN_I(the_name) \
|
#define IVEC_MASK_BINFN_I(the_name) \
|
||||||
|
@ -1271,7 +1271,7 @@ public:
|
||||||
return _mm256_and_si256(a.val_, b.val_);
|
return _mm256_and_si256(a.val_, b.val_);
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static IVEC_NAME masku_compress(const BVEC_NAME &mask,
|
VEC_INLINE static IVEC_NAME masku_compress(const BVEC_NAME &mask,
|
||||||
const IVEC_NAME &b) {
|
const IVEC_NAME &b) {
|
||||||
return to(FVEC_SUFFIX(_mm256_compress_)(mask.val_, from(b.val_)));
|
return to(FVEC_SUFFIX(_mm256_compress_)(mask.val_, from(b.val_)));
|
||||||
}
|
}
|
||||||
|
@ -1310,7 +1310,7 @@ public:
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static IVEC_NAME maskz_loadu(const BVEC_NAME &mask,
|
VEC_INLINE static IVEC_NAME maskz_loadu(const BVEC_NAME &mask,
|
||||||
const int * src) {
|
const int * src) {
|
||||||
FVEC_VEC_T mask_val = mask.val_;
|
FVEC_VEC_T mask_val = mask.val_;
|
||||||
# if FVEC_LEN==4
|
# if FVEC_LEN==4
|
||||||
|
@ -1319,11 +1319,11 @@ public:
|
||||||
{0, 2, 4, 6, 0, 0, 0, 0};
|
{0, 2, 4, 6, 0, 0, 0, 0};
|
||||||
__m256 m = _mm256_castpd_ps(mask_val);
|
__m256 m = _mm256_castpd_ps(mask_val);
|
||||||
m = _mm256_permutevar8x32_ps(m, _mm256_load_si256((__m256i*)mask_shuffle));
|
m = _mm256_permutevar8x32_ps(m, _mm256_load_si256((__m256i*)mask_shuffle));
|
||||||
__m128i ret = _mm_maskload_epi32(src,
|
__m128i ret = _mm_maskload_epi32(src,
|
||||||
_mm256_castsi256_si128(_mm256_castps_si256(m)));
|
_mm256_castsi256_si128(_mm256_castps_si256(m)));
|
||||||
static const unsigned int load_shuffle[8] __attribute__((aligned(32))) =
|
static const unsigned int load_shuffle[8] __attribute__((aligned(32))) =
|
||||||
{0, 0, 1, 1, 2, 2, 3, 3};
|
{0, 0, 1, 1, 2, 2, 3, 3};
|
||||||
return _mm256_permutevar8x32_epi32(_mm256_castsi128_si256(ret),
|
return _mm256_permutevar8x32_epi32(_mm256_castsi128_si256(ret),
|
||||||
_mm256_load_si256((__m256i*)load_shuffle));
|
_mm256_load_si256((__m256i*)load_shuffle));
|
||||||
# else
|
# else
|
||||||
int dest[8] __attribute__((aligned(32))) = {0};
|
int dest[8] __attribute__((aligned(32))) = {0};
|
||||||
|
@ -1344,11 +1344,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static IVEC_NAME mask_gather(
|
VEC_INLINE static IVEC_NAME mask_gather(
|
||||||
const IVEC_NAME &src, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
const IVEC_NAME &src, const BVEC_NAME &mask, const IVEC_NAME &idx,
|
||||||
const int * mem, const int scale
|
const int * mem, const int scale
|
||||||
) {
|
) {
|
||||||
assert(scale == sizeof(int));
|
assert(scale == sizeof(int));
|
||||||
return _mm256_mask_i32gather_epi32(src.val_, mem, idx.val_, to(mask.val_),
|
return _mm256_mask_i32gather_epi32(src.val_, mem, idx.val_, to(mask.val_),
|
||||||
sizeof(int));
|
sizeof(int));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1433,15 +1433,15 @@ public:
|
||||||
VEC_INLINE static __m256d _mm256_abs_pd(__m256d a) {
|
VEC_INLINE static __m256d _mm256_abs_pd(__m256d a) {
|
||||||
const unsigned long long abs_mask = 0x7FFFFFFFFFFFFFFF;
|
const unsigned long long abs_mask = 0x7FFFFFFFFFFFFFFF;
|
||||||
const unsigned long long abs_full[8] =
|
const unsigned long long abs_full[8] =
|
||||||
{abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
{abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
||||||
abs_mask};
|
abs_mask};
|
||||||
return _mm256_and_pd(_mm256_load_pd((double*)abs_full), a);
|
return _mm256_and_pd(_mm256_load_pd((double*)abs_full), a);
|
||||||
}
|
}
|
||||||
VEC_INLINE static __m256 _mm256_abs_ps(__m256 a) {
|
VEC_INLINE static __m256 _mm256_abs_ps(__m256 a) {
|
||||||
const unsigned long long abs_mask = 0x7FFFFFFF;
|
const unsigned long long abs_mask = 0x7FFFFFFF;
|
||||||
const unsigned long long abs_full[16] =
|
const unsigned long long abs_full[16] =
|
||||||
{abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
{abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
||||||
abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
abs_mask, abs_mask, abs_mask, abs_mask, abs_mask, abs_mask,
|
||||||
abs_mask, abs_mask, abs_mask};
|
abs_mask, abs_mask, abs_mask};
|
||||||
return _mm256_and_ps(_mm256_load_ps((float*)abs_full), a);
|
return _mm256_and_ps(_mm256_load_ps((float*)abs_full), a);
|
||||||
}
|
}
|
||||||
|
@ -1533,14 +1533,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VEC_INLINE static FVEC_NAME gather(const IVEC_NAME &idx,
|
VEC_INLINE static FVEC_NAME gather(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem, const int scale) {
|
const FVEC_SCAL_T * mem, const int scale) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
# if FVEC_LEN==4
|
# if FVEC_LEN==4
|
||||||
# ifdef __AVX2__
|
# ifdef __AVX2__
|
||||||
static const unsigned int mask_shuffle[8] __attribute__((aligned(32))) =
|
static const unsigned int mask_shuffle[8] __attribute__((aligned(32))) =
|
||||||
{0, 2, 4, 6, 0, 0, 0, 0};
|
{0, 2, 4, 6, 0, 0, 0, 0};
|
||||||
__m256i m = _mm256_permutevar8x32_epi32(idx.val_,
|
__m256i m = _mm256_permutevar8x32_epi32(idx.val_,
|
||||||
_mm256_load_si256((__m256i*)mask_shuffle));
|
_mm256_load_si256((__m256i*)mask_shuffle));
|
||||||
__m128i idx_short = _mm256_castsi256_si128(m);
|
__m128i idx_short = _mm256_castsi256_si128(m);
|
||||||
return FVEC_SUFFIX(_mm256_i32gather_)(mem, idx_short, sizeof(FVEC_SCAL_T));
|
return FVEC_SUFFIX(_mm256_i32gather_)(mem, idx_short, sizeof(FVEC_SCAL_T));
|
||||||
|
@ -1566,10 +1566,10 @@ public:
|
||||||
# ifdef __AVX2__
|
# ifdef __AVX2__
|
||||||
static const unsigned int mask_shuffle[8] __attribute__((aligned(32))) =
|
static const unsigned int mask_shuffle[8] __attribute__((aligned(32))) =
|
||||||
{0, 2, 4, 6, 0, 0, 0, 0};
|
{0, 2, 4, 6, 0, 0, 0, 0};
|
||||||
__m256i m = _mm256_permutevar8x32_epi32(idx.val_,
|
__m256i m = _mm256_permutevar8x32_epi32(idx.val_,
|
||||||
_mm256_load_si256((__m256i*)mask_shuffle));
|
_mm256_load_si256((__m256i*)mask_shuffle));
|
||||||
__m128i idx_short = _mm256_castsi256_si128(m);
|
__m128i idx_short = _mm256_castsi256_si128(m);
|
||||||
return FVEC_SUFFIX(_mm256_mask_i32gather_)(src.val_, mem, idx_short,
|
return FVEC_SUFFIX(_mm256_mask_i32gather_)(src.val_, mem, idx_short,
|
||||||
mask.val_, sizeof(FVEC_SCAL_T));
|
mask.val_, sizeof(FVEC_SCAL_T));
|
||||||
# else
|
# else
|
||||||
int idx_buf[8] __attribute__((aligned(32)));
|
int idx_buf[8] __attribute__((aligned(32)));
|
||||||
|
@ -1585,13 +1585,13 @@ public:
|
||||||
return _mm256_load_pd(dest);
|
return _mm256_load_pd(dest);
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
return FVEC_SUFFIX(_mm256_mask_i32gather_)(src.val_, mem, idx.val_,
|
return FVEC_SUFFIX(_mm256_mask_i32gather_)(src.val_, mem, idx.val_,
|
||||||
mask.val_, sizeof(FVEC_SCAL_T));
|
mask.val_, sizeof(FVEC_SCAL_T));
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static void gather_4_adjacent(const IVEC_NAME &idx,
|
VEC_INLINE static void gather_4_adjacent(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem, const int scale, FVEC_NAME * out_0,
|
const FVEC_SCAL_T * mem, const int scale, FVEC_NAME * out_0,
|
||||||
FVEC_NAME * out_1, FVEC_NAME * out_2, FVEC_NAME * out_3) {
|
FVEC_NAME * out_1, FVEC_NAME * out_2, FVEC_NAME * out_3) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
int idx_buf[8] __attribute__((aligned(32)));
|
int idx_buf[8] __attribute__((aligned(32)));
|
||||||
|
@ -1632,11 +1632,11 @@ public:
|
||||||
*out_3 = _mm256_shuffle_ps(b1, b3, 0xEE);
|
*out_3 = _mm256_shuffle_ps(b1, b3, 0xEE);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
VEC_INLINE static void gather_3_adjacent(const IVEC_NAME &idx,
|
VEC_INLINE static void gather_3_adjacent(const IVEC_NAME &idx,
|
||||||
const FVEC_SCAL_T * mem,
|
const FVEC_SCAL_T * mem,
|
||||||
const int scale,
|
const int scale,
|
||||||
FVEC_NAME * out_0,
|
FVEC_NAME * out_0,
|
||||||
FVEC_NAME * out_1,
|
FVEC_NAME * out_1,
|
||||||
FVEC_NAME * out_2) {
|
FVEC_NAME * out_2) {
|
||||||
assert(scale == sizeof(FVEC_SCAL_T));
|
assert(scale == sizeof(FVEC_SCAL_T));
|
||||||
FVEC_NAME tmp_3;
|
FVEC_NAME tmp_3;
|
||||||
|
@ -1662,7 +1662,7 @@ public:
|
||||||
VEC_INLINE static FVEC_SCAL_T reduce_add(const FVEC_NAME &a) {
|
VEC_INLINE static FVEC_SCAL_T reduce_add(const FVEC_NAME &a) {
|
||||||
return FVEC_SUFFIX(_mm256_reduce_add_)(a.val_);
|
return FVEC_SUFFIX(_mm256_reduce_add_)(a.val_);
|
||||||
}
|
}
|
||||||
VEC_INLINE static FVEC_SCAL_T mask_reduce_add(const BVEC_NAME &mask,
|
VEC_INLINE static FVEC_SCAL_T mask_reduce_add(const BVEC_NAME &mask,
|
||||||
const FVEC_NAME &a) {
|
const FVEC_NAME &a) {
|
||||||
return reduce_add(FVEC_SUFFIX(_mm256_and_)(mask.val_, a.val_));
|
return reduce_add(FVEC_SUFFIX(_mm256_and_)(mask.val_, a.val_));
|
||||||
}
|
}
|
||||||
|
@ -1797,11 +1797,11 @@ public:
|
||||||
{4, 4, 5, 5, 6, 6, 7, 7};
|
{4, 4, 5, 5, 6, 6, 7, 7};
|
||||||
__m256d lo_mask = _mm256_castps_pd(_mm256_permutevar8x32_ps(mask.val_,
|
__m256d lo_mask = _mm256_castps_pd(_mm256_permutevar8x32_ps(mask.val_,
|
||||||
_mm256_load_si256((__m256i*) lo_shuffle)));
|
_mm256_load_si256((__m256i*) lo_shuffle)));
|
||||||
__m256d hi_mask = _mm256_castps_pd(_mm256_permutevar8x32_ps(mask.val_,
|
__m256d hi_mask = _mm256_castps_pd(_mm256_permutevar8x32_ps(mask.val_,
|
||||||
_mm256_load_si256((__m256i*) hi_shuffle)));
|
_mm256_load_si256((__m256i*) hi_shuffle)));
|
||||||
__m256d lo = _mm256_mask_i32gather_pd(src.lo_, mem, get_si_lo(idx.val_),
|
__m256d lo = _mm256_mask_i32gather_pd(src.lo_, mem, get_si_lo(idx.val_),
|
||||||
lo_mask, sizeof(double));
|
lo_mask, sizeof(double));
|
||||||
__m256d hi = _mm256_mask_i32gather_pd(src.hi_, mem, get_si_hi(idx.val_),
|
__m256d hi = _mm256_mask_i32gather_pd(src.hi_, mem, get_si_hi(idx.val_),
|
||||||
hi_mask, sizeof(double));
|
hi_mask, sizeof(double));
|
||||||
# endif
|
# endif
|
||||||
return avec8pd(lo, hi);
|
return avec8pd(lo, hi);
|
||||||
|
@ -1911,7 +1911,7 @@ public:
|
||||||
VEC_INLINE static bvec masku_compress(const bvec &mask, const bvec &a) {
|
VEC_INLINE static bvec masku_compress(const bvec &mask, const bvec &a) {
|
||||||
return mask.val_ ? a.val_ : false;
|
return mask.val_ ? a.val_ : false;
|
||||||
}
|
}
|
||||||
VEC_INLINE static bvec mask_expand(const bvec &src, const bvec &mask,
|
VEC_INLINE static bvec mask_expand(const bvec &src, const bvec &mask,
|
||||||
const bvec &a) {
|
const bvec &a) {
|
||||||
return mask.val_ ? a.val_ : src.val_;
|
return mask.val_ ? a.val_ : src.val_;
|
||||||
}
|
}
|
||||||
|
@ -2028,7 +2028,7 @@ public:
|
||||||
VEC_INLINE static ivec maskz_loadu(const bvec &mask, const int * src) {
|
VEC_INLINE static ivec maskz_loadu(const bvec &mask, const int * src) {
|
||||||
return mask.val_ ? *src : 0;
|
return mask.val_ ? *src : 0;
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_storeu(const bvec &mask, int * dest,
|
VEC_INLINE static void mask_storeu(const bvec &mask, int * dest,
|
||||||
const ivec &src) {
|
const ivec &src) {
|
||||||
if (mask.val_) *dest = src.val_;
|
if (mask.val_) *dest = src.val_;
|
||||||
}
|
}
|
||||||
|
@ -2037,21 +2037,21 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static ivec mask_gather(
|
VEC_INLINE static ivec mask_gather(
|
||||||
const ivec &src, const bvec &mask, const ivec &idx, const int * mem,
|
const ivec &src, const bvec &mask, const ivec &idx, const int * mem,
|
||||||
const int scale
|
const int scale
|
||||||
) {
|
) {
|
||||||
return mask.val_ ? *reinterpret_cast<const int *>
|
return mask.val_ ? *reinterpret_cast<const int *>
|
||||||
(reinterpret_cast<const char*>(mem) + scale * idx.val_) : src.val_;
|
(reinterpret_cast<const char*>(mem) + scale * idx.val_) : src.val_;
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_i32scatter(
|
VEC_INLINE static void mask_i32scatter(
|
||||||
int * mem, const bvec &mask, const ivec &idx, const ivec &a,
|
int * mem, const bvec &mask, const ivec &idx, const ivec &a,
|
||||||
const int scale
|
const int scale
|
||||||
) {
|
) {
|
||||||
if (mask.val_) *reinterpret_cast<int *>(reinterpret_cast<char*>(mem) +
|
if (mask.val_) *reinterpret_cast<int *>(reinterpret_cast<char*>(mem) +
|
||||||
scale * idx.val_) = a.val_;
|
scale * idx.val_) = a.val_;
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static void mask_compressstore(const bvec &mask, int * dest,
|
VEC_INLINE static void mask_compressstore(const bvec &mask, int * dest,
|
||||||
const ivec &src) {
|
const ivec &src) {
|
||||||
if (mask.val_) *dest = src.val_;
|
if (mask.val_) *dest = src.val_;
|
||||||
}
|
}
|
||||||
|
@ -2175,7 +2175,7 @@ public:
|
||||||
VEC_INLINE static fvec load(const flt_t *mem) {
|
VEC_INLINE static fvec load(const flt_t *mem) {
|
||||||
return *mem;
|
return *mem;
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_storeu(const bvec &mask, flt_t * dest,
|
VEC_INLINE static void mask_storeu(const bvec &mask, flt_t * dest,
|
||||||
const fvec &a) {
|
const fvec &a) {
|
||||||
if (mask.val_) *dest = a.val_;
|
if (mask.val_) *dest = a.val_;
|
||||||
}
|
}
|
||||||
|
@ -2183,7 +2183,7 @@ public:
|
||||||
*dest = a.val_;
|
*dest = a.val_;
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static fvec gather(const ivec &idx, const flt_t * mem,
|
VEC_INLINE static fvec gather(const ivec &idx, const flt_t * mem,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
return *reinterpret_cast<const flt_t*>(reinterpret_cast<const char*>(mem) +
|
return *reinterpret_cast<const flt_t*>(reinterpret_cast<const char*>(mem) +
|
||||||
scale * idx.val_);
|
scale * idx.val_);
|
||||||
|
@ -2197,7 +2197,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
VEC_INLINE static void gather_3_adjacent(const ivec &idx, const flt_t * mem,
|
VEC_INLINE static void gather_3_adjacent(const ivec &idx, const flt_t * mem,
|
||||||
const int scale, fvec * out_0,
|
const int scale, fvec * out_0,
|
||||||
fvec * out_1, fvec * out_2) {
|
fvec * out_1, fvec * out_2) {
|
||||||
assert(scale == sizeof(flt_t));
|
assert(scale == sizeof(flt_t));
|
||||||
*out_0 = gather(idx, mem + 0, scale);
|
*out_0 = gather(idx, mem + 0, scale);
|
||||||
|
@ -2205,8 +2205,8 @@ public:
|
||||||
*out_2 = gather(idx, mem + 2, scale);
|
*out_2 = gather(idx, mem + 2, scale);
|
||||||
}
|
}
|
||||||
VEC_INLINE static void gather_4_adjacent(const ivec &idx, const flt_t * mem,
|
VEC_INLINE static void gather_4_adjacent(const ivec &idx, const flt_t * mem,
|
||||||
const int scale, fvec * out_0,
|
const int scale, fvec * out_0,
|
||||||
fvec * out_1, fvec * out_2,
|
fvec * out_1, fvec * out_2,
|
||||||
fvec * out_3) {
|
fvec * out_3) {
|
||||||
assert(scale == sizeof(flt_t));
|
assert(scale == sizeof(flt_t));
|
||||||
*out_0 = gather(idx, mem + 0, scale);
|
*out_0 = gather(idx, mem + 0, scale);
|
||||||
|
@ -2254,16 +2254,16 @@ public:
|
||||||
VEC_INLINE static avec undefined() {
|
VEC_INLINE static avec undefined() {
|
||||||
return 1337.1337;
|
return 1337.1337;
|
||||||
}
|
}
|
||||||
VEC_INLINE static avec mask_gather(const avec &src, const bvec &mask,
|
VEC_INLINE static avec mask_gather(const avec &src, const bvec &mask,
|
||||||
const ivec &idx, const acc_t * mem,
|
const ivec &idx, const acc_t * mem,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
return mask.val_ ? *reinterpret_cast<const acc_t*>
|
return mask.val_ ? *reinterpret_cast<const acc_t*>
|
||||||
(reinterpret_cast<const char*>(mem) + scale * idx.val_) : src.val_;
|
(reinterpret_cast<const char*>(mem) + scale * idx.val_) : src.val_;
|
||||||
}
|
}
|
||||||
VEC_INLINE static void mask_i32loscatter(acc_t * mem, const bvec &mask,
|
VEC_INLINE static void mask_i32loscatter(acc_t * mem, const bvec &mask,
|
||||||
const ivec &idx, const avec &a,
|
const ivec &idx, const avec &a,
|
||||||
const int scale) {
|
const int scale) {
|
||||||
if (mask.val_) *reinterpret_cast<acc_t*>(reinterpret_cast<char*>(mem) +
|
if (mask.val_) *reinterpret_cast<acc_t*>(reinterpret_cast<char*>(mem) +
|
||||||
idx.val_ * scale) = a.val_;
|
idx.val_ * scale) = a.val_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
NPairStyle(full/bin/ghost/intel,
|
NPairStyle(full/bin/ghost/intel,
|
||||||
NPairFullBinGhostIntel,
|
NPairFullBinGhostIntel,
|
||||||
NP_FULL | NP_BIN | NP_GHOST | NP_NEWTON | NP_NEWTOFF |
|
NP_FULL | NP_BIN | NP_GHOST | NP_NEWTON | NP_NEWTOFF |
|
||||||
NP_ORTHO | NP_TRI | NP_INTEL)
|
NP_ORTHO | NP_TRI | NP_INTEL)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -40,8 +40,8 @@ class NPairFullBinGhostIntel : public NPairIntel {
|
||||||
template<class flt_t, class acc_t>
|
template<class flt_t, class acc_t>
|
||||||
void fbi(NeighList * list, IntelBuffers<flt_t,acc_t> * buffers);
|
void fbi(NeighList * list, IntelBuffers<flt_t,acc_t> * buffers);
|
||||||
template<class flt_t, class acc_t, int need_ic>
|
template<class flt_t, class acc_t, int need_ic>
|
||||||
void fbi(const int offload, NeighList * list,
|
void fbi(const int offload, NeighList * list,
|
||||||
IntelBuffers<flt_t,acc_t> * buffers,
|
IntelBuffers<flt_t,acc_t> * buffers,
|
||||||
const int astart, const int aend);
|
const int astart, const int aend);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
#pragma offload_attribute(pop)
|
#pragma offload_attribute(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_OPENMP)
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "pair_airebo_intel.h"
|
#include "pair_airebo_intel.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
|
|
|
@ -85,7 +85,7 @@ class PairDPDIntel : public PairDPD {
|
||||||
ForceConst() : _ntypes(0) {}
|
ForceConst() : _ntypes(0) {}
|
||||||
~ForceConst() { set_ntypes(0, 0, 0, NULL, _cop); }
|
~ForceConst() { set_ntypes(0, 0, 0, NULL, _cop); }
|
||||||
|
|
||||||
void set_ntypes(const int ntypes, const int nthreads, const int max_nbors,
|
void set_ntypes(const int ntypes, const int nthreads, const int max_nbors,
|
||||||
Memory *memory, const int cop);
|
Memory *memory, const int cop);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -144,7 +144,7 @@ protected:
|
||||||
a3 = a * a * a;
|
a3 = a * a * a;
|
||||||
a4 = a * a3;
|
a4 = a * a3;
|
||||||
a1m4 = 1.0-a4;
|
a1m4 = 1.0-a4;
|
||||||
|
|
||||||
dfc = 8 * a1m4 * a3;
|
dfc = 8 * a1m4 * a3;
|
||||||
return a1m4*a1m4;
|
return a1m4*a1m4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class PairEDPD : public Pair {
|
||||||
protected:
|
protected:
|
||||||
double cut_global;
|
double cut_global;
|
||||||
int seed;
|
int seed;
|
||||||
double **cut,**cutT;
|
double **cut,**cutT;
|
||||||
double **a0,**gamma;
|
double **a0,**gamma;
|
||||||
double **power;
|
double **power;
|
||||||
double **slope;
|
double **slope;
|
||||||
|
|
|
@ -42,7 +42,7 @@ class PairTDPD : public Pair {
|
||||||
protected:
|
protected:
|
||||||
double cut_global,temperature;
|
double cut_global,temperature;
|
||||||
int seed,cc_species;
|
int seed,cc_species;
|
||||||
double **cut,**cutcc;
|
double **cut,**cutcc;
|
||||||
double **a0,**gamma,**sigma;
|
double **a0,**gamma,**sigma;
|
||||||
double **power;
|
double **power;
|
||||||
double ***kappa,***epsilon;
|
double ***kappa,***epsilon;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class DihedralSpherical : public Dihedral {
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *);
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_data(FILE *);
|
void write_data(FILE *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int *nterms;
|
int *nterms;
|
||||||
double **Ccoeff;
|
double **Ccoeff;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
Rodrigo Freitas (UC Berkeley) - rodrigof@berkeley.edu
|
Rodrigo Freitas (UC Berkeley) - rodrigof@berkeley.edu
|
||||||
Mark Asta (UC Berkeley) - mdasta@berkeley.edu
|
Mark Asta (UC Berkeley) - mdasta@berkeley.edu
|
||||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||||
|
@ -45,7 +45,7 @@ class FixTISpring : public Fix {
|
||||||
void initial_integrate(int);
|
void initial_integrate(int);
|
||||||
double compute_scalar();
|
double compute_scalar();
|
||||||
double compute_vector(int);
|
double compute_vector(int);
|
||||||
|
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
void grow_arrays(int);
|
void grow_arrays(int);
|
||||||
void copy_arrays(int, int, int);
|
void copy_arrays(int, int, int);
|
||||||
|
|
|
@ -140,8 +140,8 @@ class PairExTeP : public Pair {
|
||||||
}
|
}
|
||||||
|
|
||||||
// splines parameters
|
// splines parameters
|
||||||
// F[Ni=0-1, 1-2, 2-3,
|
// F[Ni=0-1, 1-2, 2-3,
|
||||||
// Nj=...,
|
// Nj=...,
|
||||||
struct TF_corr_param {
|
struct TF_corr_param {
|
||||||
double
|
double
|
||||||
f_00,
|
f_00,
|
||||||
|
@ -156,7 +156,7 @@ class PairExTeP : public Pair {
|
||||||
f_y_01,
|
f_y_01,
|
||||||
f_y_10,
|
f_y_10,
|
||||||
f_y_11;
|
f_y_11;
|
||||||
} F_corr_param[MAXTYPES][MAXTYPES][NSPLINE][NSPLINE];
|
} F_corr_param[MAXTYPES][MAXTYPES][NSPLINE][NSPLINE];
|
||||||
|
|
||||||
double F_corr_data[MAXTYPES][MAXTYPES][NSPLINE][NSPLINE][3];
|
double F_corr_data[MAXTYPES][MAXTYPES][NSPLINE][NSPLINE][3];
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||||
certain rights in this software. This software is distributed under
|
certain rights in this software. This software is distributed under
|
||||||
the GNU General Public License.
|
the GNU General Public License.
|
||||||
|
|
||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
the GNU General Public License.
|
the GNU General Public License.
|
||||||
|
|
||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
|
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifdef COMMAND_CLASS
|
#ifdef COMMAND_CLASS
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||||
certain rights in this software. This software is distributed under
|
certain rights in this software. This software is distributed under
|
||||||
the GNU General Public License.
|
the GNU General Public License.
|
||||||
|
|
||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
|
@ -39,11 +39,11 @@ class ImproperInversionHarmonic : public Improper {
|
||||||
double *kw, *w0;
|
double *kw, *w0;
|
||||||
void invang(const int &i1,const int &i2,const int &i3,const int &i4,
|
void invang(const int &i1,const int &i2,const int &i3,const int &i4,
|
||||||
const int &type,const int &evflag,const int &eflag,
|
const int &type,const int &evflag,const int &eflag,
|
||||||
const double &vb1x, const double &vb1y, const double &vb1z,
|
const double &vb1x, const double &vb1y, const double &vb1z,
|
||||||
const double &rrvb1, const double &rr2vb1,
|
const double &rrvb1, const double &rr2vb1,
|
||||||
const double &vb2x, const double &vb2y, const double &vb2z,
|
const double &vb2x, const double &vb2y, const double &vb2z,
|
||||||
const double &rrvb2, const double &rr2vb2,
|
const double &rrvb2, const double &rr2vb2,
|
||||||
const double &vb3x, const double &vb3y, const double &vb3z,
|
const double &vb3x, const double &vb3y, const double &vb3z,
|
||||||
const double &rrvb3, const double &rr2vb3);
|
const double &rrvb3, const double &rr2vb3);
|
||||||
void allocate();
|
void allocate();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
#include "reaxc_bond_orders.h"
|
#include "reaxc_bond_orders.h"
|
||||||
|
|
||||||
void Add_dBond_to_ForcesOMP( reax_system*, int, int, storage*, reax_list** );
|
void Add_dBond_to_ForcesOMP( reax_system*, int, int, storage*, reax_list** );
|
||||||
void Add_dBond_to_Forces_NPTOMP( reax_system *system, int, int, simulation_data*,
|
void Add_dBond_to_Forces_NPTOMP( reax_system *system, int, int,
|
||||||
storage*, reax_list** );
|
simulation_data*, storage*, reax_list** );
|
||||||
|
|
||||||
int BOp_OMP(storage*, reax_list*, double, int, int, far_neighbor_data*,
|
int BOp_OMP(storage*, reax_list*, double, int, int, far_neighbor_data*,
|
||||||
single_body_parameters*, single_body_parameters*, two_body_parameters*,
|
single_body_parameters*, single_body_parameters*, two_body_parameters*,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
PuReMD - Purdue ReaxFF Molecular Dynamics Program
|
||||||
Website: https://www.cs.purdue.edu/puremd
|
Website: https://www.cs.purdue.edu/puremd
|
||||||
|
|
||||||
Copyright (2010) Purdue University
|
Copyright (2010) Purdue University
|
||||||
|
|
||||||
Contributing authors:
|
Contributing authors:
|
||||||
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
H. M. Aktulga, J. Fogarty, S. Pandit, A. Grama
|
||||||
Corresponding author:
|
Corresponding author:
|
||||||
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
Hasan Metin Aktulga, Michigan State University, hma@cse.msu.edu
|
||||||
|
|
||||||
Please cite the related publication:
|
Please cite the related publication:
|
||||||
|
|
|
@ -70,7 +70,7 @@ class FixPhonon : public Fix {
|
||||||
int ngroup, nfind; // total number of atoms in group; total number of atoms on this proc
|
int ngroup, nfind; // total number of atoms in group; total number of atoms on this proc
|
||||||
char *prefix, *logfile; // prefix of output file names
|
char *prefix, *logfile; // prefix of output file names
|
||||||
FILE *flog;
|
FILE *flog;
|
||||||
|
|
||||||
double *M_inv_sqrt;
|
double *M_inv_sqrt;
|
||||||
|
|
||||||
class FFT3d *fft; // to do fft via the fft3d wraper
|
class FFT3d *fft; // to do fft via the fft3d wraper
|
||||||
|
@ -79,7 +79,7 @@ class FixPhonon : public Fix {
|
||||||
int *fft_cnts, *fft_disp;
|
int *fft_cnts, *fft_disp;
|
||||||
int fft_dim, fft_dim2;
|
int fft_dim, fft_dim2;
|
||||||
FFT_SCALAR *fft_data;
|
FFT_SCALAR *fft_data;
|
||||||
|
|
||||||
tagint itag; // index variables
|
tagint itag; // index variables
|
||||||
int idx, idq; // more index variables
|
int idx, idq; // more index variables
|
||||||
std::map<tagint,int> tag2surf; // Mapping info
|
std::map<tagint,int> tag2surf; // Mapping info
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Atom : protected Pointers {
|
||||||
|
|
||||||
double **cc, **cc_flux; // cc = chemical concentration
|
double **cc, **cc_flux; // cc = chemical concentration
|
||||||
double *edpd_temp,*edpd_flux; // temperature and heat flux
|
double *edpd_temp,*edpd_flux; // temperature and heat flux
|
||||||
double *edpd_cv; // heat capacity
|
double *edpd_cv; // heat capacity
|
||||||
int cc_species;
|
int cc_species;
|
||||||
|
|
||||||
// molecular info
|
// molecular info
|
||||||
|
@ -238,7 +238,7 @@ class Atom : protected Pointers {
|
||||||
void data_bonus(int, char *, class AtomVec *, tagint);
|
void data_bonus(int, char *, class AtomVec *, tagint);
|
||||||
void data_bodies(int, char *, class AtomVecBody *, tagint);
|
void data_bodies(int, char *, class AtomVecBody *, tagint);
|
||||||
void data_fix_compute_variable(int, int);
|
void data_fix_compute_variable(int, int);
|
||||||
|
|
||||||
virtual void allocate_type_arrays();
|
virtual void allocate_type_arrays();
|
||||||
void set_mass(const char *, int, const char *, int);
|
void set_mass(const char *, int, const char *, int);
|
||||||
void set_mass(const char *, int, int, double);
|
void set_mass(const char *, int, int, double);
|
||||||
|
|
|
@ -88,10 +88,10 @@ class AtomVecBody : public AtomVec {
|
||||||
void data_body(int, int, int, int *, double *);
|
void data_body(int, int, int, int *, double *);
|
||||||
|
|
||||||
// methods used by other classes to query/set body info
|
// methods used by other classes to query/set body info
|
||||||
|
|
||||||
double radius_body(int, int, int *, double *);
|
double radius_body(int, int, int *, double *);
|
||||||
void set_quat(int, double *);
|
void set_quat(int, double *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
tagint *tag;
|
tagint *tag;
|
||||||
int *type,*mask;
|
int *type,*mask;
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ComputeCentroAtom : public Compute {
|
||||||
class NeighList *list;
|
class NeighList *list;
|
||||||
double *centro;
|
double *centro;
|
||||||
int axes_flag;
|
int axes_flag;
|
||||||
|
|
||||||
void select(int, int, double *);
|
void select(int, int, double *);
|
||||||
void select2(int, int, double *, int *);
|
void select2(int, int, double *, int *);
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,11 +109,14 @@ void DeleteAtoms::command(int narg, char **arg)
|
||||||
// reset atom tags to be contiguous
|
// reset atom tags to be contiguous
|
||||||
// set all atom IDs to 0, call tag_extend()
|
// set all atom IDs to 0, call tag_extend()
|
||||||
|
|
||||||
if (atom->molecular == 0 && compress_flag) {
|
if (compress_flag) {
|
||||||
tagint *tag = atom->tag;
|
if (atom->molecular == 0) {
|
||||||
int nlocal = atom->nlocal;
|
tagint *tag = atom->tag;
|
||||||
for (int i = 0; i < nlocal; i++) tag[i] = 0;
|
int nlocal = atom->nlocal;
|
||||||
atom->tag_extend();
|
for (int i = 0; i < nlocal; i++) tag[i] = 0;
|
||||||
|
atom->tag_extend();
|
||||||
|
} else if (comm->me == 0)
|
||||||
|
error->warning(FLERR,"Ignoring 'compress yes' for molecular system");
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset atom->natoms and also topology counts
|
// reset atom->natoms and also topology counts
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Domain : protected Pointers {
|
||||||
void unmap(const double *, imageint, double *);
|
void unmap(const double *, imageint, double *);
|
||||||
void image_flip(int, int, int);
|
void image_flip(int, int, int);
|
||||||
int ownatom(int, double *, imageint *, int);
|
int ownatom(int, double *, imageint *, int);
|
||||||
|
|
||||||
void set_lattice(int, char **);
|
void set_lattice(int, char **);
|
||||||
void add_region(int, char **);
|
void add_region(int, char **);
|
||||||
void delete_region(int, char **);
|
void delete_region(int, char **);
|
||||||
|
|
|
@ -221,9 +221,9 @@ Self-explanatory.
|
||||||
E: Using update dipole flag requires atom attribute mu
|
E: Using update dipole flag requires atom attribute mu
|
||||||
|
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
E: The dlm flag must be used with update dipole
|
E: The dlm flag must be used with update dipole
|
||||||
|
|
||||||
Self-explanatory.
|
Self-explanatory.
|
||||||
|
|
||||||
E: Fix nvt/npt/nph damping parameters must be > 0.0
|
E: Fix nvt/npt/nph damping parameters must be > 0.0
|
||||||
|
|
|
@ -62,9 +62,9 @@ An atom style with this attribute is needed.
|
||||||
E: Fix nve/sphere requires extended particles
|
E: Fix nve/sphere requires extended particles
|
||||||
|
|
||||||
This fix can only be used for particles of a finite size.
|
This fix can only be used for particles of a finite size.
|
||||||
|
|
||||||
E: Fix nve/sphere dlm must be used with update dipole
|
E: Fix nve/sphere dlm must be used with update dipole
|
||||||
|
|
||||||
The DLM algorithm can only be used in conjunction with update dipole.
|
The DLM algorithm can only be used in conjunction with update dipole.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ void lammps_free(void *);
|
||||||
|
|
||||||
int lammps_extract_setting(void *, char *);
|
int lammps_extract_setting(void *, char *);
|
||||||
void *lammps_extract_global(void *, char *);
|
void *lammps_extract_global(void *, char *);
|
||||||
void lammps_extract_box(void *, double *, double *,
|
void lammps_extract_box(void *, double *, double *,
|
||||||
double *, double *, double *, int *, int *);
|
double *, double *, double *, int *, int *);
|
||||||
void *lammps_extract_atom(void *, char *);
|
void *lammps_extract_atom(void *, char *);
|
||||||
void *lammps_extract_compute(void *, char *, int, int);
|
void *lammps_extract_compute(void *, char *, int, int);
|
||||||
|
@ -56,10 +56,10 @@ void lammps_scatter_atoms(void *, char *, int, int, void *);
|
||||||
// caller must match to how LAMMPS library is built
|
// caller must match to how LAMMPS library is built
|
||||||
|
|
||||||
#ifdef LAMMPS_BIGBIG
|
#ifdef LAMMPS_BIGBIG
|
||||||
void lammps_create_atoms(void *, int, int64_t *, int *,
|
void lammps_create_atoms(void *, int, int64_t *, int *,
|
||||||
double *, double *, int64_t *, int);
|
double *, double *, int64_t *, int);
|
||||||
#else
|
#else
|
||||||
void lammps_create_atoms(void *, int, int *, int *,
|
void lammps_create_atoms(void *, int, int *, int *,
|
||||||
double *, double *, int *, int);
|
double *, double *, int *, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace MathExtra {
|
||||||
inline void negate3(double *v);
|
inline void negate3(double *v);
|
||||||
inline void scale3(double s, double *v);
|
inline void scale3(double s, double *v);
|
||||||
inline void add3(const double *v1, const double *v2, double *ans);
|
inline void add3(const double *v1, const double *v2, double *ans);
|
||||||
inline void scaleadd3(double s, const double *v1, const double *v2,
|
inline void scaleadd3(double s, const double *v1, const double *v2,
|
||||||
double *ans);
|
double *ans);
|
||||||
inline void sub3(const double *v1, const double *v2, double *ans);
|
inline void sub3(const double *v1, const double *v2, double *ans);
|
||||||
inline double len3(const double *v);
|
inline double len3(const double *v);
|
||||||
|
@ -81,7 +81,7 @@ namespace MathExtra {
|
||||||
void rotate(double matrix[3][3], int i, int j, int k, int l,
|
void rotate(double matrix[3][3], int i, int j, int k, int l,
|
||||||
double s, double tau);
|
double s, double tau);
|
||||||
void richardson(double *q, double *m, double *w, double *moments, double dtq);
|
void richardson(double *q, double *m, double *w, double *moments, double dtq);
|
||||||
void no_squish_rotate(int k, double *p, double *q, double *inertia,
|
void no_squish_rotate(int k, double *p, double *q, double *inertia,
|
||||||
double dt);
|
double dt);
|
||||||
|
|
||||||
// shape matrix operations
|
// shape matrix operations
|
||||||
|
@ -116,7 +116,7 @@ namespace MathExtra {
|
||||||
inline void rotation_generator_x(const double m[3][3], double ans[3][3]);
|
inline void rotation_generator_x(const double m[3][3], double ans[3][3]);
|
||||||
inline void rotation_generator_y(const double m[3][3], double ans[3][3]);
|
inline void rotation_generator_y(const double m[3][3], double ans[3][3]);
|
||||||
inline void rotation_generator_z(const double m[3][3], double ans[3][3]);
|
inline void rotation_generator_z(const double m[3][3], double ans[3][3]);
|
||||||
|
|
||||||
void BuildRxMatrix(double R[3][3], const double angle);
|
void BuildRxMatrix(double R[3][3], const double angle);
|
||||||
void BuildRyMatrix(double R[3][3], const double angle);
|
void BuildRyMatrix(double R[3][3], const double angle);
|
||||||
void BuildRzMatrix(double R[3][3], const double angle);
|
void BuildRzMatrix(double R[3][3], const double angle);
|
||||||
|
@ -183,7 +183,7 @@ inline void MathExtra::normalize3(const double *v, double *ans)
|
||||||
scale a vector to length
|
scale a vector to length
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::snormalize3(const double length, const double *v,
|
inline void MathExtra::snormalize3(const double length, const double *v,
|
||||||
double *ans)
|
double *ans)
|
||||||
{
|
{
|
||||||
double scale = length/sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
|
double scale = length/sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
|
||||||
|
@ -229,7 +229,7 @@ inline void MathExtra::add3(const double *v1, const double *v2, double *ans)
|
||||||
ans = s*v1 + v2
|
ans = s*v1 + v2
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::scaleadd3(double s, const double *v1,
|
inline void MathExtra::scaleadd3(double s, const double *v1,
|
||||||
const double *v2, double *ans)
|
const double *v2, double *ans)
|
||||||
{
|
{
|
||||||
ans[0] = s*v1[0] + v2[0];
|
ans[0] = s*v1[0] + v2[0];
|
||||||
|
@ -404,7 +404,7 @@ inline void MathExtra::times3(const double m[3][3], const double m2[3][3],
|
||||||
multiply the transpose of mat1 times mat2
|
multiply the transpose of mat1 times mat2
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::transpose_times3(const double m[3][3],
|
inline void MathExtra::transpose_times3(const double m[3][3],
|
||||||
const double m2[3][3],double ans[3][3])
|
const double m2[3][3],double ans[3][3])
|
||||||
{
|
{
|
||||||
ans[0][0] = m[0][0]*m2[0][0] + m[1][0]*m2[1][0] + m[2][0]*m2[2][0];
|
ans[0][0] = m[0][0]*m2[0][0] + m[1][0]*m2[1][0] + m[2][0]*m2[2][0];
|
||||||
|
@ -422,7 +422,7 @@ inline void MathExtra::transpose_times3(const double m[3][3],
|
||||||
multiply mat1 times transpose of mat2
|
multiply mat1 times transpose of mat2
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::times3_transpose(const double m[3][3],
|
inline void MathExtra::times3_transpose(const double m[3][3],
|
||||||
const double m2[3][3],double ans[3][3])
|
const double m2[3][3],double ans[3][3])
|
||||||
{
|
{
|
||||||
ans[0][0] = m[0][0]*m2[0][0] + m[0][1]*m2[0][1] + m[0][2]*m2[0][2];
|
ans[0][0] = m[0][0]*m2[0][0] + m[0][1]*m2[0][1] + m[0][2]*m2[0][2];
|
||||||
|
@ -462,7 +462,7 @@ inline void MathExtra::invert3(const double m[3][3], double ans[3][3])
|
||||||
matrix times vector
|
matrix times vector
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::matvec(const double m[3][3], const double *v,
|
inline void MathExtra::matvec(const double m[3][3], const double *v,
|
||||||
double *ans)
|
double *ans)
|
||||||
{
|
{
|
||||||
ans[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];
|
ans[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];
|
||||||
|
@ -474,7 +474,7 @@ inline void MathExtra::matvec(const double m[3][3], const double *v,
|
||||||
matrix times vector
|
matrix times vector
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::matvec(const double *ex, const double *ey,
|
inline void MathExtra::matvec(const double *ex, const double *ey,
|
||||||
const double *ez, const double *v, double *ans)
|
const double *ez, const double *v, double *ans)
|
||||||
{
|
{
|
||||||
ans[0] = ex[0]*v[0] + ey[0]*v[1] + ez[0]*v[2];
|
ans[0] = ex[0]*v[0] + ey[0]*v[1] + ez[0]*v[2];
|
||||||
|
@ -529,7 +529,7 @@ inline void MathExtra::transpose_diag3(const double m[3][3], const double *d,
|
||||||
row vector times matrix
|
row vector times matrix
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::vecmat(const double *v, const double m[3][3],
|
inline void MathExtra::vecmat(const double *v, const double m[3][3],
|
||||||
double *ans)
|
double *ans)
|
||||||
{
|
{
|
||||||
ans[0] = v[0]*m[0][0] + v[1]*m[1][0] + v[2]*m[2][0];
|
ans[0] = v[0]*m[0][0] + v[1]*m[1][0] + v[2]*m[2][0];
|
||||||
|
@ -553,7 +553,7 @@ inline void MathExtra::scalar_times3(const double f, double m[3][3])
|
||||||
upper-triangular 3x3, stored as 6-vector in Voigt notation
|
upper-triangular 3x3, stored as 6-vector in Voigt notation
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::multiply_shape_shape(const double *one,
|
inline void MathExtra::multiply_shape_shape(const double *one,
|
||||||
const double *two, double *ans)
|
const double *two, double *ans)
|
||||||
{
|
{
|
||||||
ans[0] = one[0]*two[0];
|
ans[0] = one[0]*two[0];
|
||||||
|
@ -660,7 +660,7 @@ inline void MathExtra::axisangle_to_quat(const double *v, const double angle,
|
||||||
Apply principal rotation generator about x to rotation matrix m
|
Apply principal rotation generator about x to rotation matrix m
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::rotation_generator_x(const double m[3][3],
|
inline void MathExtra::rotation_generator_x(const double m[3][3],
|
||||||
double ans[3][3])
|
double ans[3][3])
|
||||||
{
|
{
|
||||||
ans[0][0] = 0;
|
ans[0][0] = 0;
|
||||||
|
@ -678,7 +678,7 @@ inline void MathExtra::rotation_generator_x(const double m[3][3],
|
||||||
Apply principal rotation generator about y to rotation matrix m
|
Apply principal rotation generator about y to rotation matrix m
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::rotation_generator_y(const double m[3][3],
|
inline void MathExtra::rotation_generator_y(const double m[3][3],
|
||||||
double ans[3][3])
|
double ans[3][3])
|
||||||
{
|
{
|
||||||
ans[0][0] = m[0][2];
|
ans[0][0] = m[0][2];
|
||||||
|
@ -696,7 +696,7 @@ inline void MathExtra::rotation_generator_y(const double m[3][3],
|
||||||
Apply principal rotation generator about z to rotation matrix m
|
Apply principal rotation generator about z to rotation matrix m
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
inline void MathExtra::rotation_generator_z(const double m[3][3],
|
inline void MathExtra::rotation_generator_z(const double m[3][3],
|
||||||
double ans[3][3])
|
double ans[3][3])
|
||||||
{
|
{
|
||||||
ans[0][0] = -m[0][1];
|
ans[0][0] = -m[0][1];
|
||||||
|
|
|
@ -111,7 +111,7 @@ class Molecule : protected Pointers {
|
||||||
|
|
||||||
double *quat_external; // orientation imposed by external class
|
double *quat_external; // orientation imposed by external class
|
||||||
// e.g. FixPour or CreateAtoms
|
// e.g. FixPour or CreateAtoms
|
||||||
|
|
||||||
Molecule(class LAMMPS *, int, char **, int &);
|
Molecule(class LAMMPS *, int, char **, int &);
|
||||||
~Molecule();
|
~Molecule();
|
||||||
void compute_center();
|
void compute_center();
|
||||||
|
@ -127,7 +127,7 @@ class Molecule : protected Pointers {
|
||||||
int toffset,boffset,aoffset,doffset,ioffset;
|
int toffset,boffset,aoffset,doffset,ioffset;
|
||||||
int autospecial;
|
int autospecial;
|
||||||
double sizescale;
|
double sizescale;
|
||||||
|
|
||||||
void read(int);
|
void read(int);
|
||||||
void coords(char *);
|
void coords(char *);
|
||||||
void types(char *);
|
void types(char *);
|
||||||
|
|
|
@ -26,10 +26,10 @@ class NeighRequest : protected Pointers {
|
||||||
int id; // ID of request as stored by requestor
|
int id; // ID of request as stored by requestor
|
||||||
// used to track multiple requests from one class
|
// used to track multiple requests from one class
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// flags set by requesting class for attributes of neighor list they need
|
// flags set by requesting class for attributes of neighor list they need
|
||||||
// all must be set appropriately, all have defaults
|
// all must be set appropriately, all have defaults
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
// which class style requests the list
|
// which class style requests the list
|
||||||
// one flag is 1, others are 0
|
// one flag is 1, others are 0
|
||||||
|
@ -56,11 +56,11 @@ class NeighRequest : protected Pointers {
|
||||||
// 0 if use force::newton_pair setting
|
// 0 if use force::newton_pair setting
|
||||||
// 1 if override with pair newton on
|
// 1 if override with pair newton on
|
||||||
// 2 if override with pair newton off
|
// 2 if override with pair newton off
|
||||||
|
|
||||||
int ghost; // 1 if includes ghost atom neighbors
|
int ghost; // 1 if includes ghost atom neighbors
|
||||||
int size; // 1 if pair cutoff set by particle radius
|
int size; // 1 if pair cutoff set by particle radius
|
||||||
int history; // 1 if there is also neigh history info (FixNeighHist)
|
int history; // 1 if there is also neigh history info (FixNeighHist)
|
||||||
int granonesided; // 1 if one-sided granular list for
|
int granonesided; // 1 if one-sided granular list for
|
||||||
// sphere/surf interactions
|
// sphere/surf interactions
|
||||||
int respainner; // 1 if need a rRESPA inner list
|
int respainner; // 1 if need a rRESPA inner list
|
||||||
int respamiddle; // 1 if need a rRESPA middle list
|
int respamiddle; // 1 if need a rRESPA middle list
|
||||||
|
@ -85,9 +85,9 @@ class NeighRequest : protected Pointers {
|
||||||
|
|
||||||
const char *command_style;
|
const char *command_style;
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// flags set by Neighbor class to morph original requests
|
// flags set by Neighbor class to morph original requests
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
int skiplist; // index of list to skip from
|
int skiplist; // index of list to skip from
|
||||||
int off2on; // 1 if this is newton on list, but skips from off list
|
int off2on; // 1 if this is newton on list, but skips from off list
|
||||||
|
@ -101,9 +101,9 @@ class NeighRequest : protected Pointers {
|
||||||
int unique; // 1 if this list requires its own
|
int unique; // 1 if this list requires its own
|
||||||
// NStencil, Nbin class - because of requestor cutoff
|
// NStencil, Nbin class - because of requestor cutoff
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// internal settings made by Neighbor class
|
// internal settings made by Neighbor class
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
|
|
||||||
int index_bin; // index of NBin class assigned to this request
|
int index_bin; // index of NBin class assigned to this request
|
||||||
int index_stencil; // index of NStencil class assigned to this request
|
int index_stencil; // index of NStencil class assigned to this request
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
http://lammps.sandia.gov, Sandia National Laboratories
|
http://lammps.sandia.gov, Sandia National Laboratories
|
||||||
Steve Plimpton, sjplimp@sandia.gov
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
|
|
||||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||||
certain rights in this software. This software is distributed under
|
certain rights in this software. This software is distributed under
|
||||||
the GNU General Public License.
|
the GNU General Public License.
|
||||||
|
|
||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
20
src/rcb.h
20
src/rcb.h
|
@ -57,7 +57,7 @@ class RCB : protected Pointers {
|
||||||
double valuelo,valuehi; // position of dot(s) nearest to cut
|
double valuelo,valuehi; // position of dot(s) nearest to cut
|
||||||
double wtlo,wthi; // total weight of dot(s) at that position
|
double wtlo,wthi; // total weight of dot(s) at that position
|
||||||
int countlo,counthi; // # of dots at that position
|
int countlo,counthi; // # of dots at that position
|
||||||
int proclo,prochi; // unique proc who owns a nearest dot
|
int proclo,prochi; // unique proc who owns a nearest dot
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BBox {
|
struct BBox {
|
||||||
|
@ -79,8 +79,8 @@ class RCB : protected Pointers {
|
||||||
// tree of RCB cuts
|
// tree of RCB cuts
|
||||||
|
|
||||||
struct Tree {
|
struct Tree {
|
||||||
double cut; // position of cut
|
double cut; // position of cut
|
||||||
int dim; // dimension = 0/1/2 of cut
|
int dim; // dimension = 0/1/2 of cut
|
||||||
};
|
};
|
||||||
|
|
||||||
// inversion message
|
// inversion message
|
||||||
|
@ -119,13 +119,13 @@ class RCB : protected Pointers {
|
||||||
double bboxhi[3];
|
double bboxhi[3];
|
||||||
Tree *tree; // tree of RCB cuts, used by reuse()
|
Tree *tree; // tree of RCB cuts, used by reuse()
|
||||||
int counters[7]; // diagnostic counts
|
int counters[7]; // diagnostic counts
|
||||||
// 0 = # of median iterations
|
// 0 = # of median iterations
|
||||||
// 1 = # of points sent
|
// 1 = # of points sent
|
||||||
// 2 = # of points received
|
// 2 = # of points received
|
||||||
// 3 = most points this proc ever owns
|
// 3 = most points this proc ever owns
|
||||||
// 4 = most point memory this proc ever allocs
|
// 4 = most point memory this proc ever allocs
|
||||||
// 5 = # of times a previous cut is re-used
|
// 5 = # of times a previous cut is re-used
|
||||||
// 6 = # of reallocs of point vector
|
// 6 = # of reallocs of point vector
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Set : protected Pointers {
|
||||||
int ximage,yimage,zimage,ximageflag,yimageflag,zimageflag;
|
int ximage,yimage,zimage,ximageflag,yimageflag,zimageflag;
|
||||||
double dvalue,xvalue,yvalue,zvalue,wvalue,fraction;
|
double dvalue,xvalue,yvalue,zvalue,wvalue,fraction;
|
||||||
int cc_index;
|
int cc_index;
|
||||||
|
|
||||||
int varflag,varflag1,varflag2,varflag3,varflag4;
|
int varflag,varflag1,varflag2,varflag3,varflag4;
|
||||||
int ivar1,ivar2,ivar3,ivar4;
|
int ivar1,ivar2,ivar3,ivar4;
|
||||||
double *vec1,*vec2,*vec3,*vec4;
|
double *vec1,*vec2,*vec3,*vec4;
|
||||||
|
|
Loading…
Reference in New Issue