summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/parray.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-10-17 10:21:00 +0200
committer couriersud <couriersud@gmx.org>2019-10-17 10:21:00 +0200
commitdb318046c4ed54fa7822b6aec55bec6d427e1e95 (patch)
tree1636e304db0c44da12d192ef8cd17837d4975b86 /src/lib/netlist/plib/parray.h
parentda35541e842fe09869d24f2dda23162194c369ce (diff)
Netlist: code maintenance and bug fixes. (nw)
- solver now uses dynamic allocation on systems larger than 512x512 - fixed osx build - moved nl_lists.h classes to plists.h - fixed netlist makefile clint section - readability and typos
Diffstat (limited to 'src/lib/netlist/plib/parray.h')
-rw-r--r--src/lib/netlist/plib/parray.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/netlist/plib/parray.h b/src/lib/netlist/plib/parray.h
index 65251a02002..d8f7a441f6f 100644
--- a/src/lib/netlist/plib/parray.h
+++ b/src/lib/netlist/plib/parray.h
@@ -32,6 +32,7 @@ namespace plib {
struct sizeabs<FT, 0>
{
static constexpr std::size_t ABS() { return 0; }
+ //using container = typename std::vector<FT, arena_allocator<mempool, FT, 64>>;
using container = typename std::vector<FT, aligned_allocator<FT, PALIGN_VECTOROPT>>;
};
@@ -75,6 +76,15 @@ namespace plib {
{
}
+ // osx clang doesn't like COPYASSIGNMOVE(parray, default)
+ // it will generate some weird error messages about move assignment
+ // constructor having a different noexcept status.
+
+ parray(const parray &rhs) : m_a(rhs.m_a), m_size(rhs.m_size) {}
+ parray(parray &&rhs) noexcept : m_a(std::move(rhs.m_a)), m_size(std::move(rhs.m_size)) {}
+ parray &operator=(const parray &rhs) { m_a = rhs.m_a; m_size = rhs.m_size; return *this; }
+ parray &operator=(parray &&rhs) noexcept { std::swap(m_a,rhs.m_a); std::swap(m_size, rhs.m_size); return *this; }
+
template <int X = SIZE >
parray(size_type size, typename std::enable_if<(X != 0), int>::type = 0)
: m_size(size)
@@ -125,6 +135,8 @@ namespace plib {
(*this)[i] = parray<FT, SIZE2>(size2);
}
}
+
+ COPYASSIGNMOVE(parray2D, default)
};
} // namespace plib