silence compiler warnings
This commit is contained in:
@ -406,7 +406,7 @@ void UCL_Device::clear() {
|
||||
|
||||
#ifdef GERYON_NUMA_FISSION
|
||||
#ifdef CL_VERSION_1_2
|
||||
for (int i=0; i<_cl_devices.size(); i++)
|
||||
for (size_t i=0; i< _cl_devices.size(); i++)
|
||||
CL_DESTRUCT_CALL(clReleaseDevice(_cl_devices[i]));
|
||||
#endif
|
||||
#endif
|
||||
@ -841,7 +841,7 @@ int UCL_Device::auto_set_platform(const enum UCL_DEVICE_TYPE type,
|
||||
int best_platform=0;
|
||||
|
||||
std::string vendor_upper=vendor;
|
||||
for (int i=0; i<vendor.length(); i++)
|
||||
for (size_t i=0; i<vendor.length(); i++)
|
||||
if (vendor_upper[i]<='z' && vendor_upper[i]>='a')
|
||||
vendor_upper[i]=toupper(vendor_upper[i]);
|
||||
|
||||
@ -859,7 +859,7 @@ int UCL_Device::auto_set_platform(const enum UCL_DEVICE_TYPE type,
|
||||
|
||||
if (vendor_upper!="") {
|
||||
std::string pname = platform_name();
|
||||
for (int i=0; i<pname.length(); i++)
|
||||
for (size_t i=0; i<pname.length(); i++)
|
||||
if (pname[i]<='z' && pname[i]>='a')
|
||||
pname[i]=toupper(pname[i]);
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ template <class mat_type>
|
||||
inline int _device_alloc(mat_type &mat, UCL_Device &dev, const size_t n,
|
||||
const enum UCL_MEMOPT kind) {
|
||||
cl_int error_flag;
|
||||
cl_mem_flags flag;
|
||||
cl_mem_flags flag = CL_MEM_READ_WRITE;
|
||||
if (kind==UCL_READ_WRITE)
|
||||
flag=CL_MEM_READ_WRITE;
|
||||
else if (kind==UCL_READ_ONLY)
|
||||
@ -321,7 +321,7 @@ inline int _device_resize(mat_type &mat, const size_t n) {
|
||||
&context,nullptr));
|
||||
CL_DESTRUCT_CALL(clReleaseMemObject(mat.cbegin()));
|
||||
|
||||
cl_mem_flags flag;
|
||||
cl_mem_flags flag = CL_MEM_READ_WRITE;
|
||||
if (mat.kind()==UCL_READ_WRITE)
|
||||
flag=CL_MEM_READ_WRITE;
|
||||
else if (mat.kind()==UCL_READ_ONLY)
|
||||
|
||||
@ -319,7 +319,6 @@ void AnswerT::get_answers(double **f, double **tor) {
|
||||
const int ifrom = tid * idelta;
|
||||
const int ito = std::min(ifrom + idelta, _inum);
|
||||
#else
|
||||
const int tid = 0;
|
||||
const int ifrom = 0;
|
||||
const int ito = _inum;
|
||||
#endif
|
||||
@ -352,7 +351,6 @@ void AnswerT::get_answers(double **f, double **tor) {
|
||||
const int ito = std::min(ifrom + idelta, _inum);
|
||||
int fl=ifrom*4;
|
||||
#else
|
||||
const int tid = 0;
|
||||
const int ifrom = 0;
|
||||
const int ito = _inum;
|
||||
int fl=0;
|
||||
|
||||
@ -21,7 +21,7 @@ namespace LAMMPS_AL {
|
||||
extern Device<PRECISION,ACC_PRECISION> global_device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BaseAtomicT::BaseAtomic() : _compiled(false), _max_bytes(0), _onetype(0) {
|
||||
BaseAtomicT::BaseAtomic() : _compiled(false), _onetype(0), _max_bytes(0) {
|
||||
device=&global_device;
|
||||
ans=new Answer<numtyp,acctyp>();
|
||||
nbor=new Neighbor();
|
||||
|
||||
@ -29,8 +29,7 @@ const char *ellipsoid_nbor=0;
|
||||
extern Device<PRECISION,ACC_PRECISION> global_device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BaseEllipsoidT::BaseEllipsoid() : _compiled(false), _max_bytes(0),
|
||||
host_olist_size(0) {
|
||||
BaseEllipsoidT::BaseEllipsoid() : host_olist_size(0), _compiled(false), _max_bytes(0) {
|
||||
device=&global_device;
|
||||
ans=new Answer<numtyp,acctyp>();
|
||||
nbor=new Neighbor();
|
||||
|
||||
@ -20,7 +20,7 @@ namespace LAMMPS_AL {
|
||||
extern Device<PRECISION,ACC_PRECISION> global_device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
BaseThreeT::BaseThree() : _compiled(false), _max_bytes(0), _onetype(-1) {
|
||||
BaseThreeT::BaseThree() : _compiled(false), _onetype(-1), _max_bytes(0) {
|
||||
device=&global_device;
|
||||
ans=new Answer<numtyp,acctyp>();
|
||||
nbor=new Neighbor();
|
||||
|
||||
@ -707,11 +707,11 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum,
|
||||
const int bin_stencil_size = bin_stencil_stride * bin_stencil_stride;
|
||||
if (bin_stencil_size > _host_bin_stencil.numel())
|
||||
_host_bin_stencil.alloc(bin_stencil_size,*dev);
|
||||
for (int s = 0; s<bin_stencil_size; s++) {
|
||||
const int nbory = s % bin_stencil_stride - cells_in_cutoff;
|
||||
const int nborz = s / bin_stencil_stride - cells_in_cutoff;
|
||||
_host_bin_stencil[s] = nbory*ncellx + nborz*ncellx*ncelly;
|
||||
}
|
||||
for (int s = 0; s<bin_stencil_size; s++) {
|
||||
const int nbory = s % bin_stencil_stride - cells_in_cutoff;
|
||||
const int nborz = s / bin_stencil_stride - cells_in_cutoff;
|
||||
_host_bin_stencil[s] = nbory*ncellx + nborz*ncellx*ncelly;
|
||||
}
|
||||
_bin_stencil.update_device(_host_bin_stencil,bin_stencil_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -55,7 +55,6 @@ int TersoffMT::init(const int ntypes, const int nlocal, const int nall, const in
|
||||
int oldparam=-1;
|
||||
int onetype=-1;
|
||||
int onetype3=0;
|
||||
int spq=1;
|
||||
int mtypes=0;
|
||||
#ifdef USE_OPENCL
|
||||
for (int ii=1; ii<ntypes; ii++) {
|
||||
|
||||
@ -62,7 +62,6 @@ int TersoffZT::init(const int ntypes, const int nlocal, const int nall,
|
||||
int oldparam=-1;
|
||||
int onetype=-1;
|
||||
int onetype3=0;
|
||||
int spq=1;
|
||||
int mtypes=0;
|
||||
#ifdef USE_OPENCL
|
||||
for (int ii=1; ii<ntypes; ii++) {
|
||||
|
||||
@ -90,8 +90,8 @@ void PairILPTMD::calc_FRep(int eflag, int /* vflag */)
|
||||
int i, j, ii, jj, inum, jnum, itype, jtype, k, kk;
|
||||
double prodnorm1, fkcx, fkcy, fkcz;
|
||||
double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair, fpair1;
|
||||
double rsq, r, Rcut, rhosq1, exp0, exp1, r2inv, r6inv, r8inv, Tap, dTap, Vilp;
|
||||
double frho1, TSvdw, TSvdw2inv, Erep, fsum, rdsq1;
|
||||
double rsq, r, Rcut, rhosq1, exp0, exp1, Tap, dTap, Vilp;
|
||||
double frho1, Erep, fsum, rdsq1;
|
||||
int *ilist, *jlist, *numneigh, **firstneigh;
|
||||
int *ILP_neighs_i;
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr double QSUMSMALL = 0.00001;
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user