From 205aca8fdcdafe5303166295a2b34e6e7c07868b Mon Sep 17 00:00:00 2001
From: Pauli Virtanen <pauli.t.virtanen@jyu.fi>
Date: Wed, 3 Aug 2022 17:43:32 +0300
Subject: [PATCH] array: namespace array

---
 src/action.hpp | 3 +--
 src/array.hpp  | 3 +++
 src/main.cpp   | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/action.hpp b/src/action.hpp
index 70831e3..fd35932 100644
--- a/src/action.hpp
+++ b/src/action.hpp
@@ -4,9 +4,8 @@
 #include "common.hpp"
 #include "array.hpp"
 
-
 template <typename Scalar, typename Shape>
-inline Scalar S_2(Array<Scalar, Shape> Q)
+inline Scalar S_2(array::Array<Scalar, Shape> Q)
 {
     size_t nx = Q.dim(0);
     size_t ny = Q.dim(1);
diff --git a/src/array.hpp b/src/array.hpp
index f293caa..086376f 100644
--- a/src/array.hpp
+++ b/src/array.hpp
@@ -7,6 +7,8 @@
 #include <initializer_list>
 #include <stdexcept>
 
+namespace array {
+
 constexpr size_t Dynamic = SIZE_MAX;
 
 /*! Array dimensions and strides: known at compile-time & dynamic
@@ -326,5 +328,6 @@ public:
     operator EigenMap() const { return matrix(); }
 };
 
+} // namespace array
 
 #endif
diff --git a/src/main.cpp b/src/main.cpp
index ee71d97..dcd6bf4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,6 +3,7 @@
 #include "action.hpp"
 
 using namespace std::complex_literals;
+using namespace array;
 
 template <typename Scalar, typename Shape>
 void dump(Array<Scalar,Shape> Q)
-- 
GitLab