Skip to content
Snippets Groups Projects
Commit 205aca8f authored by patavirt's avatar patavirt
Browse files

array: namespace array

parent 4d96bdb6
No related branches found
No related tags found
No related merge requests found
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
#include "common.hpp" #include "common.hpp"
#include "array.hpp" #include "array.hpp"
template <typename Scalar, typename Shape> 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 nx = Q.dim(0);
size_t ny = Q.dim(1); size_t ny = Q.dim(1);
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include <initializer_list> #include <initializer_list>
#include <stdexcept> #include <stdexcept>
namespace array {
constexpr size_t Dynamic = SIZE_MAX; constexpr size_t Dynamic = SIZE_MAX;
/*! Array dimensions and strides: known at compile-time & dynamic /*! Array dimensions and strides: known at compile-time & dynamic
...@@ -326,5 +328,6 @@ public: ...@@ -326,5 +328,6 @@ public:
operator EigenMap() const { return matrix(); } operator EigenMap() const { return matrix(); }
}; };
} // namespace array
#endif #endif
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "action.hpp" #include "action.hpp"
using namespace std::complex_literals; using namespace std::complex_literals;
using namespace array;
template <typename Scalar, typename Shape> template <typename Scalar, typename Shape>
void dump(Array<Scalar,Shape> Q) void dump(Array<Scalar,Shape> Q)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment