Commit a3967f96 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Avoided few warnings.

parent d8f26b3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ copyMemory( DestinationElement* destination,
   {
      // GCC 8.1 complains that we bypass a non-trivial copy-constructor
      // (in C++17 we could use constexpr if to avoid compiling this branch in that case)
      #if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCC__)
      #if defined(__GNUC__) && ( __GNUC__ > 8 || ( __GNUC__ == 8 && __GNUC_MINOR__ > 0 ) ) && !defined(__clang__) && !defined(__NVCC__)
         #pragma GCC diagnostic push
         #pragma GCC diagnostic ignored "-Wclass-memaccess"
      #endif
+1 −7
Original line number Diff line number Diff line
@@ -386,12 +386,8 @@ bool solveHeatEquationCuda( const Config::ParameterContainer& parameters,
         std::cerr << "Copying max_du failed. " << cudaErr << std::endl;
         return false;
      }
      Real absMax( 0.0 );
      for( Index i = 0; i < cudaUpdateBlocks.x; i++ )
      {
         const Real a = fabs( max_du[ i ] );
         absMax = a > absMax ? a : absMax;
      }
      updateTimer.stop();
            
      time += currentTau;
@@ -521,14 +517,12 @@ bool solveHeatEquationHost( const Config::ParameterContainer& parameters,
      computationTimer.stop();
 
      updateTimer.start();
      Real absMax( 0.0 ), residue( 0.0 );
      Real residue( 0.0 );
      for( Index i = 0; i < dofsCount; i++ )
      {
         const Real add = currentTau * aux[ i ];
         u[ i ] += add;
         residue += fabs( add );
         /*const Real a = fabs( aux[ i ] );
         absMax = a > absMax ? a : absMax;*/
      }
      updateTimer.stop();