Dhairya Malhotra vor 6 Jahren
Ursprung
Commit
833d879839
3 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen
  1. 4 4
      include/sctl/comm.txx
  2. 1 0
      include/sctl/morton.hpp
  3. 2 2
      include/sctl/ompUtils.txx

+ 4 - 4
include/sctl/comm.txx

@@ -223,16 +223,16 @@ template <class SType, class RType> void* Comm::Ialltoallv_sparse(ConstIterator<
 
   for (Integer i = 0; i < mpi_size_; i++) {
     if (rcounts[i]) {
-      rbuf[rdispls[i]];
-      rbuf[rdispls[i] + rcounts[i] - 1];
+      SCTL_UNUSED(rbuf[rdispls[i]]);
+      SCTL_UNUSED(rbuf[rdispls[i] + rcounts[i] - 1]);
       MPI_Irecv(&rbuf[rdispls[i]], rcounts[i], CommDatatype<RType>::value(), i, tag, mpi_comm_, &request[request_iter]);
       request_iter++;
     }
   }
   for (Integer i = 0; i < mpi_size_; i++) {
     if (scounts[i]) {
-      sbuf[sdispls[i]];
-      sbuf[sdispls[i] + scounts[i] - 1];
+      SCTL_UNUSED(sbuf[sdispls[i]]);
+      SCTL_UNUSED(sbuf[sdispls[i] + scounts[i] - 1]);
       MPI_Isend(&sbuf[sdispls[i]], scounts[i], CommDatatype<SType>::value(), i, tag, mpi_comm_, &request[request_iter]);
       request_iter++;
     }

+ 1 - 0
include/sctl/morton.hpp

@@ -160,6 +160,7 @@ template <Integer DIM = 3> class Morton {
     for (Integer i = DIM - 1; i >= 0; i--) {
       if (mask & (x[i] ^ m.x[i])) return x[i] < m.x[i];
     }
+    return false; // TODO: check
   }
 
   bool operator>(const Morton &m) const { return m < (*this); }

+ 2 - 2
include/sctl/ompUtils.txx

@@ -95,8 +95,8 @@ template <class T, class StrictWeakOrdering> inline void omp_par::merge_sort(T A
     std::sort(A, A_last, comp);
     return;
   }
-  A[0];
-  A[N - 1];
+  SCTL_UNUSED(A[0]);
+  SCTL_UNUSED(A[N - 1]);
 
   // Split the array A into p equal parts.
   Vector<_DiffType> split;