Commit 1a1a4867 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'JK/warnings' into 'develop'

Unused variable warnings

See merge request !61
parents 7527973f e9a8c397
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )

# set default build options
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -Wno-unused-local-typedefs -Wno-unknown-pragmas" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" )
# pass -rdynamic only in Debug mode
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ benchmarkArrayOperations( Benchmark & benchmark,
   deviceArray2.setSize( size );
#endif

   Real resultHost, resultDevice;
   Real resultHost;


   // reset functions
@@ -104,6 +104,7 @@ benchmarkArrayOperations( Benchmark & benchmark,
   benchmark.setOperation( "comparison (operator==)", 2 * datasetSize );
   benchmark.time< Devices::Host >( reset1, "CPU", compareHost );
#ifdef HAVE_CUDA
   Real resultDevice;
   auto compareCuda = [&]() {
      resultDevice = (int) ( deviceArray == deviceArray2 );
   };
@@ -118,6 +119,7 @@ benchmarkArrayOperations( Benchmark & benchmark,
   // copyBasetime is used later inside HAVE_CUDA guard, so the compiler will
   // complain when compiling without CUDA
   const double copyBasetime = benchmark.time< Devices::Host >( reset1, "CPU", copyAssignHostHost );
   (void)copyBasetime;  // ignore unused variable
#ifdef HAVE_CUDA
   auto copyAssignCudaCuda = [&]() {
      deviceArray = deviceArray2;
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ struct SpmvBenchmark
         const auto gi = distributedMatrix.getLocalRowRange().getGlobalIndex( i );
         distributedRowLengths[ gi ] = matrix.getRowCapacity( gi );
      }
      distributedMatrix.setCompressedRowLengths( distributedRowLengths );
      distributedMatrix.setRowCapacities( distributedRowLengths );

      // copy data from the global matrix/vector into the distributed matrix/vector
      for( IndexType i = 0; i < distributedMatrix.getLocalMatrix().getRows(); i++ ) {
+1 −1
Original line number Diff line number Diff line
@@ -646,7 +646,6 @@ HeatEquationBenchmarkProblem< Mesh, BoundaryCondition, RightHandSide, Differenti
applyBoundaryConditions( const RealType& time,
                            DofVectorPointer& uDofs )
{
   const MeshPointer& mesh = this->getMesh();
   if( this->cudaKernelType == "templated" )
   {
      this->bindDofs( uDofs );
@@ -698,6 +697,7 @@ applyBoundaryConditions( const RealType& time,
#endif
      userData.boundaryConditions = &this->boundaryConditionPointer.template getData< Devices::Cuda >();
      Meshes::Traverser< MeshType, Cell > meshTraverser;
      const MeshPointer& mesh = this->getMesh();
      // */
      /*meshTraverser.template processBoundaryEntities< BoundaryEntitiesProcessor >
                                                    ( mesh,
+2 −2
Original line number Diff line number Diff line
@@ -457,13 +457,13 @@ struct LinearSolversBenchmark
      DistributedVector dist_x0( localRange, matrixPointer->getRows(), group );
      DistributedVector dist_b( localRange, matrixPointer->getRows(), group );

      // copy the row lengths from the global matrix to the distributed matrix
      // copy the row capacities from the global matrix to the distributed matrix
      DistributedRowLengths distributedRowLengths( localRange, matrixPointer->getRows(), group );
      for( IndexType i = 0; i < distMatrixPointer->getLocalMatrix().getRows(); i++ ) {
         const auto gi = distMatrixPointer->getLocalRowRange().getGlobalIndex( i );
         distributedRowLengths[ gi ] = matrixPointer->getRowCapacity( gi );
      }
      distMatrixPointer->setCompressedRowLengths( distributedRowLengths );
      distMatrixPointer->setRowCapacities( distributedRowLengths );

      // copy data from the global matrix/vector into the distributed matrix/vector
      for( IndexType i = 0; i < distMatrixPointer->getLocalMatrix().getRows(); i++ ) {
Loading