Commit 72f3c380 authored by Stan Moore's avatar Stan Moore
Browse files

Fix warning with #pragma unroll

parent 6b024d46
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1129,4 +1129,10 @@ struct alignas(32) CayleyKleinPack {
#define LAMMPS_LAMBDA [=]
#endif

#ifdef LMP_KOKKOS_GPU
#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__)
#define LMP_KK_DEVICE_COMPILE
#endif
#endif

#endif
+8 −0
Original line number Diff line number Diff line
@@ -599,14 +599,18 @@ void SNAKokkos<DeviceType>::compute_zi(const int& iatom_mod, const int& jjz, con
      int jju2 = idxu_block[j2] + (j2+1)*mb2max;
      int icgb = mb1min*(j2+1) + mb2max;

#ifdef LMP_KK_DEVICE_COMPILE
      #pragma unroll
#endif
      for(int ib = 0; ib < nb; ib++) {

        int ma1 = ma1min;
        int ma2 = ma2max;
        int icga = ma1min*(j2+1) + ma2max;

#ifdef LMP_KK_DEVICE_COMPILE
        #pragma unroll
#endif
        for(int ia = 0; ia < na; ia++) {
          const SNAcomplex utot1 = ulisttot_pack(iatom_mod, jju1+ma1, elem1, iatom_div);
          const SNAcomplex utot2 = ulisttot_pack(iatom_mod, jju2+ma2, elem2, iatom_div);
@@ -767,14 +771,18 @@ void SNAKokkos<DeviceType>::compute_yi(int iatom_mod, int jjz, int iatom_div,
      int jju2 = idxu_block[j2] + (j2 + 1) * mb2max;
      int icgb = mb1min * (j2 + 1) + mb2max;

#ifdef LMP_KK_DEVICE_COMPILE
      #pragma unroll
#endif
      for (int ib = 0; ib < nb; ib++) {

        int ma1 = ma1min;
        int ma2 = ma2max;
        int icga = ma1min*(j2+1) + ma2max;

#ifdef LMP_KK_DEVICE_COMPILE
        #pragma unroll
#endif
        for (int ia = 0; ia < na; ia++) {
          const SNAcomplex utot1 = ulisttot_pack(iatom_mod,jju1+ma1,elem1,iatom_div);
          const SNAcomplex utot2 = ulisttot_pack(iatom_mod,jju2+ma2,elem2,iatom_div);