silence compiler warnings
This commit is contained in:
@ -76,7 +76,7 @@ class UCL_Const {
|
|||||||
/// Copy from array on host to const memory
|
/// Copy from array on host to const memory
|
||||||
template <class numtyp>
|
template <class numtyp>
|
||||||
inline void update_device(UCL_H_Vec<numtyp> &src, const int numel) {
|
inline void update_device(UCL_H_Vec<numtyp> &src, const int numel) {
|
||||||
const int bytes=numel*sizeof(numtyp);
|
const size_t bytes=numel*sizeof(numtyp);
|
||||||
if (_global_bytes < bytes) {
|
if (_global_bytes < bytes) {
|
||||||
if (_global_bytes) CL_SAFE_CALL(clReleaseMemObject(_global));
|
if (_global_bytes) CL_SAFE_CALL(clReleaseMemObject(_global));
|
||||||
cl_int e;
|
cl_int e;
|
||||||
|
|||||||
@ -375,7 +375,7 @@ class UCL_D_Vec : public UCL_BaseMat {
|
|||||||
/// Resize (only if bigger) the allocation to contain cols elements
|
/// Resize (only if bigger) the allocation to contain cols elements
|
||||||
/** \note Cannot be used on views **/
|
/** \note Cannot be used on views **/
|
||||||
inline int resize_ib(const int cols)
|
inline int resize_ib(const int cols)
|
||||||
{ if (cols>_cols) return resize(cols); else return UCL_SUCCESS; }
|
{ if (cols > (int)_cols) return resize(cols); else return UCL_SUCCESS; }
|
||||||
|
|
||||||
/// Set each element to zero asynchronously in the default command_queue
|
/// Set each element to zero asynchronously in the default command_queue
|
||||||
inline void zero() { zero(_cq); }
|
inline void zero() { zero(_cq); }
|
||||||
|
|||||||
@ -340,8 +340,7 @@ void BaseAtomicT::compile_kernels(UCL_Device &dev, const void *pair_str,
|
|||||||
#if defined(LAL_OCL_EV_JIT)
|
#if defined(LAL_OCL_EV_JIT)
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -359,8 +359,7 @@ void BaseChargeT::compile_kernels(UCL_Device &dev, const void *pair_str,
|
|||||||
#if defined(LAL_OCL_EV_JIT)
|
#if defined(LAL_OCL_EV_JIT)
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -361,8 +361,7 @@ void BaseDipoleT::compile_kernels(UCL_Device &dev, const void *pair_str,
|
|||||||
#if defined(LAL_OCL_EV_JIT)
|
#if defined(LAL_OCL_EV_JIT)
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -361,8 +361,7 @@ void BaseDPDT::compile_kernels(UCL_Device &dev, const void *pair_str,
|
|||||||
#if defined(LAL_OCL_EV_JIT)
|
#if defined(LAL_OCL_EV_JIT)
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_pair_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -569,8 +569,7 @@ void BaseEllipsoidT::compile_kernels(UCL_Device &dev,
|
|||||||
if (e_s)
|
if (e_s)
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_ellipsoid_sphere_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_ellipsoid_sphere_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -471,8 +471,7 @@ void BaseThreeT::compile_kernels(UCL_Device &dev, const void *pair_str,
|
|||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_three_center_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_three_center_noev.max_subgroup_size(_block_size));
|
||||||
mx_subgroup_sz = std::min(mx_subgroup_sz, k_three_end_noev.max_subgroup_size(_block_size));
|
mx_subgroup_sz = std::min(mx_subgroup_sz, k_three_end_noev.max_subgroup_size(_block_size));
|
||||||
#endif
|
#endif
|
||||||
if (_threads_per_atom > mx_subgroup_sz)
|
if (_threads_per_atom > (int)mx_subgroup_sz) _threads_per_atom = mx_subgroup_sz;
|
||||||
_threads_per_atom = mx_subgroup_sz;
|
|
||||||
device->set_simd_size(mx_subgroup_sz);
|
device->set_simd_size(mx_subgroup_sz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -86,7 +86,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu,
|
|||||||
#ifdef LAL_OCL_EXTRA_ARGS
|
#ifdef LAL_OCL_EXTRA_ARGS
|
||||||
extra_args+=":" LAL_PRE_STRINGIFY(LAL_OCL_EXTRA_ARGS);
|
extra_args+=":" LAL_PRE_STRINGIFY(LAL_OCL_EXTRA_ARGS);
|
||||||
#endif
|
#endif
|
||||||
for (int i=0; i<extra_args.length(); i++)
|
for (int i=0; i < (int)extra_args.length(); i++)
|
||||||
if (extra_args[i]==':') extra_args[i]=' ';
|
if (extra_args[i]==':') extra_args[i]=' ';
|
||||||
|
|
||||||
// --------------------------- MPI setup -------------------------------
|
// --------------------------- MPI setup -------------------------------
|
||||||
@ -301,7 +301,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu,
|
|||||||
#ifdef USE_OPENCL
|
#ifdef USE_OPENCL
|
||||||
if (device_type_flags==nullptr) {
|
if (device_type_flags==nullptr) {
|
||||||
std::string pname = gpu->platform_name();
|
std::string pname = gpu->platform_name();
|
||||||
for (int i=0; i<pname.length(); i++)
|
for (int i=0; i < (int)pname.length(); i++)
|
||||||
if (pname[i]<='z' && pname[i]>='a')
|
if (pname[i]<='z' && pname[i]>='a')
|
||||||
pname[i]=toupper(pname[i]);
|
pname[i]=toupper(pname[i]);
|
||||||
if (pname.find("NVIDIA")!=std::string::npos)
|
if (pname.find("NVIDIA")!=std::string::npos)
|
||||||
|
|||||||
@ -632,7 +632,7 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum,
|
|||||||
subgroup_count += cell_subgroup_counts[i];
|
subgroup_count += cell_subgroup_counts[i];
|
||||||
cell_subgroup_counts[i] += cell_subgroup_counts[i-1];
|
cell_subgroup_counts[i] += cell_subgroup_counts[i-1];
|
||||||
}
|
}
|
||||||
if (subgroup_count > subgroup2cell.numel()) {
|
if (subgroup_count > (int)subgroup2cell.numel()) {
|
||||||
subgroup2cell.clear();
|
subgroup2cell.clear();
|
||||||
success = success && (subgroup2cell.alloc(1.1*subgroup_count,*dev,
|
success = success && (subgroup2cell.alloc(1.1*subgroup_count,*dev,
|
||||||
UCL_READ_WRITE,UCL_READ_ONLY) == UCL_SUCCESS);
|
UCL_READ_WRITE,UCL_READ_ONLY) == UCL_SUCCESS);
|
||||||
@ -702,7 +702,7 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum,
|
|||||||
_old_ncellz = ncellz;
|
_old_ncellz = ncellz;
|
||||||
const int bin_stencil_stride = cells_in_cutoff * 2 + 1;
|
const int bin_stencil_stride = cells_in_cutoff * 2 + 1;
|
||||||
const int bin_stencil_size = bin_stencil_stride * bin_stencil_stride;
|
const int bin_stencil_size = bin_stencil_stride * bin_stencil_stride;
|
||||||
if (bin_stencil_size > _host_bin_stencil.numel())
|
if (bin_stencil_size > (int)_host_bin_stencil.numel())
|
||||||
_host_bin_stencil.alloc(bin_stencil_size,*dev);
|
_host_bin_stencil.alloc(bin_stencil_size,*dev);
|
||||||
for (int s = 0; s<bin_stencil_size; s++) {
|
for (int s = 0; s<bin_stencil_size; s++) {
|
||||||
const int nbory = s % bin_stencil_stride - cells_in_cutoff;
|
const int nbory = s % bin_stencil_stride - cells_in_cutoff;
|
||||||
|
|||||||
@ -260,7 +260,7 @@ int TersoffT::loop(const int eflag, const int vflag, const int evatom,
|
|||||||
|
|
||||||
// re-allocate zetaij if necessary
|
// re-allocate zetaij if necessary
|
||||||
int nall = this->_nall;
|
int nall = this->_nall;
|
||||||
if (nall*this->nbor->max_nbors() > _zetaij.cols()) {
|
if (nall*this->nbor->max_nbors() > (int)_zetaij.cols()) {
|
||||||
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
||||||
_zetaij.clear();
|
_zetaij.clear();
|
||||||
_zetaij_eng.clear();
|
_zetaij_eng.clear();
|
||||||
|
|||||||
@ -252,7 +252,7 @@ int TersoffMT::loop(const int eflag, const int vflag, const int evatom,
|
|||||||
|
|
||||||
// re-allocate zetaij if necessary
|
// re-allocate zetaij if necessary
|
||||||
int nall = this->_nall;
|
int nall = this->_nall;
|
||||||
if (nall*this->nbor->max_nbors() > _zetaij.cols()) {
|
if (nall*this->nbor->max_nbors() > (int)_zetaij.cols()) {
|
||||||
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
||||||
_zetaij.clear();
|
_zetaij.clear();
|
||||||
success = success && (_zetaij.alloc(this->nbor->max_nbors()*_nmax,
|
success = success && (_zetaij.alloc(this->nbor->max_nbors()*_nmax,
|
||||||
|
|||||||
@ -276,7 +276,7 @@ int TersoffZT::loop(const int eflag, const int vflag, const int evatom,
|
|||||||
|
|
||||||
// re-allocate zetaij if necessary
|
// re-allocate zetaij if necessary
|
||||||
int nall = this->_nall;
|
int nall = this->_nall;
|
||||||
if (nall*this->nbor->max_nbors() > _zetaij.cols()) {
|
if (nall*this->nbor->max_nbors() > (int)_zetaij.cols()) {
|
||||||
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
int _nmax=static_cast<int>(static_cast<double>(nall)*1.10);
|
||||||
_zetaij.clear();
|
_zetaij.clear();
|
||||||
success = success && (_zetaij.alloc(this->nbor->max_nbors()*_nmax,
|
success = success && (_zetaij.alloc(this->nbor->max_nbors()*_nmax,
|
||||||
|
|||||||
Reference in New Issue
Block a user