Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / math / tests / testarrayrefs.h
index d0b5b0db8c45209a52aef8cfeacb4c9f951c9c24..39da21cc114e92a3d45a58393a4bc03f798d0824 100644 (file)
@@ -52,37 +52,34 @@ namespace test
 {
 
 //! Initialization overload for non-BasicVector
-template <typename T>
-void fillInputContents(ArrayRef<T> inputRef,
-                       int         scaleFactor)
+template<typename T>
+void fillInputContents(ArrayRef<T> inputRef, int scaleFactor)
 {
     inputRef[0] = 1;
     inputRef[1] = 2;
     inputRef[2] = 3;
-    for (auto &element : inputRef)
+    for (autoelement : inputRef)
     {
         element *= scaleFactor;
     }
 }
 
 //! Initialization overload for BasicVector
-template <typename T>
-void fillInputContents(ArrayRef < BasicVector < T>> inputRef,
-                       int                          scaleFactor)
+template<typename T>
+void fillInputContents(ArrayRef<BasicVector<T>> inputRef, int scaleFactor)
 {
-    inputRef[0] = {1, 2, 3};
-    inputRef[1] = {4, 5, 6};
-    inputRef[2] = {7, 8, 9};
-    for (auto &element : inputRef)
+    inputRef[0] = { 1, 2, 3 };
+    inputRef[1] = { 4, 5, 6 };
+    inputRef[2] = { 7, 8, 9 };
+    for (autoelement : inputRef)
     {
         element *= scaleFactor;
     }
 }
 
 //! Dispatcher function for filling.
-template <typename PaddedVectorOfT>
-void fillInput(PaddedVectorOfT *input,
-               int              scaleFactor)
+template<typename PaddedVectorOfT>
+void fillInput(PaddedVectorOfT* input, int scaleFactor)
 {
     // Use a size for the vector in tests that is prime enough to
     // expose problems where they exist.
@@ -93,9 +90,8 @@ void fillInput(PaddedVectorOfT *input,
 }
 
 //! Comparison overload for non-BasicVector
-template <typename T>
-void compareViews(ArrayRef<T> input,
-                  ArrayRef<T> output)
+template<typename T>
+void compareViews(ArrayRef<T> input, ArrayRef<T> output)
 {
     ASSERT_EQ(input.size(), output.size());
     for (index i = 0; i != input.ssize(); ++i)
@@ -105,9 +101,8 @@ void compareViews(ArrayRef<T> input,
 }
 
 //! Comparison overload for BasicVector<T>
-template <typename T>
-void compareViews(ArrayRef < BasicVector < T>> input,
-                  ArrayRef < BasicVector < T>> output)
+template<typename T>
+void compareViews(ArrayRef<BasicVector<T>> input, ArrayRef<BasicVector<T>> output)
 {
     ASSERT_EQ(input.size(), output.size());
     for (index i = 0; i != input.ssize(); ++i)