From 6fb9163fa0472c9e556544ef5a0f590780c10204 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz>
Date: Thu, 20 Sep 2018 19:41:26 +0200
Subject: [PATCH] Fixes after merge

---
 src/TNL/Matrices/BiEllpack.h        |  5 ++---
 src/TNL/Matrices/Matrix.h           |  2 +-
 src/TNL/Matrices/Matrix_impl.h      | 28 ++++++++++++++--------------
 src/TNL/Matrices/SparseRow.h        |  4 ++--
 src/UnitTests/Meshes/CMakeLists.txt | 22 +++++++++++-----------
 5 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/src/TNL/Matrices/BiEllpack.h b/src/TNL/Matrices/BiEllpack.h
index 2612653e55..ef5f90d473 100644
--- a/src/TNL/Matrices/BiEllpack.h
+++ b/src/TNL/Matrices/BiEllpack.h
@@ -10,8 +10,8 @@
 
 /****
  * This class implements BiELL format from:
- * 
- * Zheng C., Gu S., Gu T.-X., Yang B., Liu X.-P., 
+ *
+ * Zheng C., Gu S., Gu T.-X., Yang B., Liu X.-P.,
  * BiELL: A bisection ELLPACK-based storage format for optimizing SpMV on GPUs,
  * Journal of Parallel and Distributed Computing, 74 (7), pp. 2639-2647, 2014.
  */
@@ -143,7 +143,6 @@ public:
 
 //	void verifyRowLengths( const typename BiEllpack< Real, Device, Index, StripSize >::CompressedRowLengthsVector& rowLengths );
 
-   
 	template< typename InVector,
 			  typename OutVector >
 #ifdef HAVE_CUDA
diff --git a/src/TNL/Matrices/Matrix.h b/src/TNL/Matrices/Matrix.h
index 3271597f6e..a30d8c2a42 100644
--- a/src/TNL/Matrices/Matrix.h
+++ b/src/TNL/Matrices/Matrix.h
@@ -96,7 +96,7 @@ public:
 
    template< typename Matrix >
    bool operator != ( const Matrix& matrix ) const;
-   
+
    virtual bool save( File& file ) const;
 
    virtual bool load( File& file );
diff --git a/src/TNL/Matrices/Matrix_impl.h b/src/TNL/Matrices/Matrix_impl.h
index e9cf162cb5..9728020053 100644
--- a/src/TNL/Matrices/Matrix_impl.h
+++ b/src/TNL/Matrices/Matrix_impl.h
@@ -130,20 +130,6 @@ bool Matrix< Real, Device, Index >::operator != ( const MatrixT& matrix ) const
    return ! operator == ( matrix );
 }
 
-template< typename Real,
-          typename Device,
-          typename Index >
-void
-Matrix< Real, Device, Index >::
-copyFromHostToCuda( Matrix< Real, Devices::Host, Index >& matrix )
-{
-    this->numberOfColors = matrix.getNumberOfColors();
-    this->columns = matrix.getColumns();
-    this->rows = matrix.getRows();
-
-    this->values.setSize( matrix.getValuesSize() );
-}
-
 template< typename Real,
           typename Device,
           typename Index >
@@ -225,6 +211,20 @@ computeColorsVector(Containers::Vector<Index, Device, Index> &colorsVector)
     }
 }
 
+template< typename Real,
+          typename Device,
+          typename Index >
+void
+Matrix< Real, Device, Index >::
+copyFromHostToCuda( Matrix< Real, Devices::Host, Index >& matrix )
+{
+    this->numberOfColors = matrix.getNumberOfColors();
+    this->columns = matrix.getColumns();
+    this->rows = matrix.getRows();
+
+    this->values.setSize( matrix.getValuesSize() );
+}
+
 #ifdef HAVE_CUDA
 template< typename Matrix,
           typename InVector,
diff --git a/src/TNL/Matrices/SparseRow.h b/src/TNL/Matrices/SparseRow.h
index 7d39b7b2e9..e7547ee679 100644
--- a/src/TNL/Matrices/SparseRow.h
+++ b/src/TNL/Matrices/SparseRow.h
@@ -56,9 +56,9 @@ class SparseRow
 
    protected:
 
-	   Real* values;
+      Real* values;
 
-	   Index* columns;
+      Index* columns;
 
       Index length, step;
 };
diff --git a/src/UnitTests/Meshes/CMakeLists.txt b/src/UnitTests/Meshes/CMakeLists.txt
index e35856258b..9cc6ed47ee 100644
--- a/src/UnitTests/Meshes/CMakeLists.txt
+++ b/src/UnitTests/Meshes/CMakeLists.txt
@@ -7,18 +7,18 @@ TARGET_LINK_LIBRARIES( BoundaryTagsTest
                            tnl )
 
 # Mesh cannot be compiled by nvcc < 9 due to bugs in the compiler
-if( ${BUILD_CUDA} AND ( ${CUDA_VERSION_MAJOR} GREATER 9 OR ${CUDA_VERSION_MAJOR} EQUAL 9 ) )
-    CUDA_ADD_EXECUTABLE( MeshTest MeshTest.cu
-                         OPTIONS ${CXX_TESTS_FLAGS} )
-    TARGET_LINK_LIBRARIES( MeshTest
-                            ${GTEST_BOTH_LIBRARIES}
-                            tnl )
+if( ${BUILD_CUDA} AND ${CUDA_VERSION_MAJOR} GREATER_EQUAL 9 )
+   CUDA_ADD_EXECUTABLE( MeshTest MeshTest.cu
+                        OPTIONS ${CXX_TESTS_FLAGS} )
+   TARGET_LINK_LIBRARIES( MeshTest
+                           ${GTEST_BOTH_LIBRARIES}
+                           tnl )
 
-    CUDA_ADD_EXECUTABLE( MeshOrderingTest MeshOrderingTest.cu
-                         OPTIONS ${CXX_TESTS_FLAGS} )
-    TARGET_LINK_LIBRARIES( MeshOrderingTest
-                            ${GTEST_BOTH_LIBRARIES}
-                            tnl )
+   CUDA_ADD_EXECUTABLE( MeshOrderingTest MeshOrderingTest.cu
+                        OPTIONS ${CXX_TESTS_FLAGS} )
+   TARGET_LINK_LIBRARIES( MeshOrderingTest
+                           ${GTEST_BOTH_LIBRARIES}
+                           tnl )
 else()
    ADD_EXECUTABLE( MeshTest MeshTest.cpp )
    TARGET_COMPILE_OPTIONS( MeshTest PRIVATE ${CXX_TESTS_FLAGS} )
-- 
GitLab