Unverified Commit f0e36c74 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

silence more signedness comparison warnings

parent b95cb37f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -540,7 +540,7 @@ struct BuildExchangeListFunctor {
  void operator() (int i) const {
    if (_x(i,_dim) < _lo || _x(i,_dim) >= _hi) {
      const int mysend=Kokkos::atomic_fetch_add(&_nsend(),1);
      if(mysend<_sendlist.extent(0)) {
      if(mysend < (int)_sendlist.extent(0)) {
        _sendlist(mysend) = i;
        _sendflag(i) = 1;
      }
@@ -598,10 +598,10 @@ void CommKokkos::exchange_device()
      i = nsend = 0;

      if (true) {
        if (k_sendflag.h_view.extent(0)<nlocal) k_sendflag.resize(nlocal);
        if ((int)k_sendflag.h_view.extent(0) < nlocal) k_sendflag.resize(nlocal);
        k_sendflag.sync<DeviceType>();
        k_count.h_view() = k_exchange_sendlist.h_view.extent(0);
        while (k_count.h_view()>=k_exchange_sendlist.h_view.extent(0)) {
        while (k_count.h_view() >= (int)k_exchange_sendlist.h_view.extent(0)) {
          k_count.h_view() = 0;
          k_count.modify<LMPHostType>();
          k_count.sync<DeviceType>();
@@ -615,7 +615,7 @@ void CommKokkos::exchange_device()
          k_count.modify<DeviceType>();

          k_count.sync<LMPHostType>();
          if (k_count.h_view()>=k_exchange_sendlist.h_view.extent(0)) {
          if (k_count.h_view() >= (int)k_exchange_sendlist.h_view.extent(0)) {
            k_exchange_lists.resize(2,k_count.h_view()*1.1);
            k_exchange_sendlist = Kokkos::subview(k_exchange_lists,0,Kokkos::ALL);
            k_exchange_copylist = Kokkos::subview(k_exchange_lists,1,Kokkos::ALL);
@@ -1054,7 +1054,7 @@ void CommKokkos::borders_device() {

void CommKokkos::copy_swap_info()
{
  if (nswap > k_swap.extent(1)) {
  if (nswap > (int)k_swap.extent(1)) {
    k_swap = DAT::tdual_int_2d("comm:swap",2,nswap);
    k_firstrecv    = Kokkos::subview(k_swap,0,Kokkos::ALL);
    k_sendnum_scan = Kokkos::subview(k_swap,1,Kokkos::ALL);
@@ -1072,7 +1072,7 @@ void CommKokkos::copy_swap_info()

  k_sendlist.sync<LMPHostType>();

  if (totalsend > k_pbc.extent(0)) {
  if (totalsend > (int)k_pbc.extent(0)) {
    k_pbc = DAT::tdual_int_2d("comm:pbc",totalsend,6);
    k_swap2 = DAT::tdual_int_2d("comm:swap2",2,totalsend);
    k_pbc_flag = Kokkos::subview(k_swap2,0,Kokkos::ALL);
+3 −3
Original line number Diff line number Diff line
@@ -67,14 +67,14 @@ NBinKokkos<DeviceType>::NBinKokkos(LAMMPS *lmp) : NBinStandard(lmp) {
template<class DeviceType>
void NBinKokkos<DeviceType>::bin_atoms_setup(int nall)
{
  if (mbins > k_bins.d_view.extent(0)) {
  if (mbins > (int)k_bins.d_view.extent(0)) {
    k_bins = DAT::tdual_int_2d("Neighbor::d_bins",mbins,atoms_per_bin);
    bins = k_bins.view<DeviceType>();

    k_bincount = DAT::tdual_int_1d("Neighbor::d_bincount",mbins);
    bincount = k_bincount.view<DeviceType>();
  }
  if (nall > k_atom2bin.d_view.extent(0)) {
  if (nall > (int)k_atom2bin.d_view.extent(0)) {
    k_atom2bin = DAT::tdual_int_1d("Neighbor::d_atom2bin",nall);
    atom2bin = k_atom2bin.view<DeviceType>();
  }
@@ -138,7 +138,7 @@ void NBinKokkos<DeviceType>::binatomsItem(const int &i) const

  atom2bin(i) = ibin;
  const int ac = Kokkos::atomic_fetch_add(&bincount[ibin], (int)1);
  if(ac < bins.extent(1)) {
  if(ac < (int)bins.extent(1)) {
    bins(ibin, ac) = i;
  } else {
    d_resize() = 1;
+2 −2
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ void NeighBondKokkos<DeviceType>::build_topology_kk()
  int* map_array_host = atom->get_map_array();
  int map_size = atom->get_map_size();
  int map_maxarray = atom->get_map_maxarray();
  if (map_maxarray > k_map_array.extent(0))
  if (map_maxarray > (int)k_map_array.extent(0))
    k_map_array = DAT::tdual_int_1d("NeighBond:map_array",map_maxarray);
  for (int i=0; i<map_size; i++)
    k_map_array.h_view[i] = map_array_host[i];
@@ -226,7 +226,7 @@ void NeighBondKokkos<DeviceType>::build_topology_kk()
  map_array = k_map_array.view<DeviceType>();

  int* sametag_host = atomKK->sametag;
  if (nmax > k_sametag.extent(0))
  if (nmax > (int)k_sametag.extent(0))
    k_sametag = DAT::tdual_int_1d("NeighBond:sametag",nmax);
  for (int i=0; i<nall; i++)
    k_sametag.h_view[i] = sametag_host[i];
+2 −2
Original line number Diff line number Diff line
@@ -103,14 +103,14 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::copy_stencil_info()

    int maxstencil = ns->get_maxstencil();

    if (maxstencil > k_stencil.extent(0))
    if (maxstencil > (int)k_stencil.extent(0))
      k_stencil = DAT::tdual_int_1d("neighlist:stencil",maxstencil);
    for (int k = 0; k < maxstencil; k++)
      k_stencil.h_view(k) = ns->stencil[k];
    k_stencil.modify<LMPHostType>();
    k_stencil.sync<DeviceType>();
    if (GHOST) {
      if (maxstencil > k_stencilxyz.extent(0))
      if (maxstencil > (int)k_stencilxyz.extent(0))
        k_stencilxyz = DAT::tdual_int_1d_3("neighlist:stencilxyz",maxstencil);
      for (int k = 0; k < maxstencil; k++) {
        k_stencilxyz.h_view(k,0) = ns->stencilxyz[k][0];
+2 −2
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ void PairExp6rxKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
  {
     const int np_total = nlocal + atom->nghost;

     if (np_total > PairExp6ParamData.epsilon1.extent(0)) {
     if (np_total > (int)PairExp6ParamData.epsilon1.extent(0)) {
       PairExp6ParamData.epsilon1      = typename AT::t_float_1d("PairExp6ParamData.epsilon1"     ,np_total);
       PairExp6ParamData.alpha1        = typename AT::t_float_1d("PairExp6ParamData.alpha1"       ,np_total);
       PairExp6ParamData.rm1           = typename AT::t_float_1d("PairExp6ParamData.rm1"          ,np_total);
@@ -309,7 +309,7 @@ void PairExp6rxKokkos<DeviceType>::compute(int eflag_in, int vflag_in)

  nthreads = lmp->kokkos->nthreads;
  int nmax = f.extent(0);
  if (nmax > t_f.extent(1)) {
  if (nmax > (int)t_f.extent(1)) {
    t_f = t_f_array_thread("pair_exp6_rx:t_f",nthreads,nmax);
    t_uCG = t_efloat_1d_thread("pair_exp6_rx:t_uCG",nthreads,nmax);
    t_uCGnew = t_efloat_1d_thread("pair_exp6_rx:t_UCGnew",nthreads,nmax);
Loading