diff options
author | 2019-11-08 23:52:14 +0100 | |
---|---|---|
committer | 2019-11-08 23:52:14 +0100 | |
commit | 88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch) | |
tree | 955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/parray.h | |
parent | 731c4fe52073a7a7561bf04559e9f0b3b791388d (diff) |
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/parray.h')
-rw-r--r-- | src/lib/netlist/plib/parray.h | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/lib/netlist/plib/parray.h b/src/lib/netlist/plib/parray.h index 174d047f35c..ea240faaac7 100644 --- a/src/lib/netlist/plib/parray.h +++ b/src/lib/netlist/plib/parray.h @@ -1,13 +1,13 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * parray.h - * - */ #ifndef PARRAY_H_ #define PARRAY_H_ +/// +/// \file parray.h +/// + #include "palloc.h" #include "pconfig.h" #include "pexception.h" @@ -36,21 +36,20 @@ namespace plib { using container = typename std::vector<FT, aligned_allocator<FT, PALIGN_VECTOROPT>>; }; - /** - * \brief Array with preallocated or dynamic allocation - * - * Passing SIZE > 0 has the same functionality as a std::array. - * SIZE = 0 is pure dynamic allocation, the actual array size is passed to the - * constructor. - * SIZE < 0 reserves abs(SIZE) elements statically in place allocated. The - * actual size is passed in by the constructor. - * This array is purely intended for HPC application where depending on the - * architecture a preference dynamic/static has to be made. - * - * This struct is not intended to be a full replacement to std::array. - * It is a subset to enable switching between dynamic and static allocation. - * I consider > 10% performance difference to be a use case. - */ + /// \brief Array with preallocated or dynamic allocation. + /// + /// Passing SIZE > 0 has the same functionality as a std::array. + /// SIZE = 0 is pure dynamic allocation, the actual array size is passed to the + /// constructor. + /// SIZE < 0 reserves abs(SIZE) elements statically in place allocated. The + /// actual size is passed in by the constructor. + /// This array is purely intended for HPC application where depending on the + /// architecture a preference dynamic/static has to be made. + /// + /// This struct is not intended to be a full replacement to std::array. + /// It is a subset to enable switching between dynamic and static allocation. + /// I consider > 10% performance difference to be a use case. + /// template <typename FT, int SIZE> struct parray @@ -96,7 +95,7 @@ namespace plib { } - /* allow construction in fixed size arrays */ + // allow construction in fixed size arrays parray() : m_size(SIZEABS()) { @@ -176,4 +175,4 @@ namespace plib { -#endif /* PARRAY_H_ */ +#endif // PARRAY_H_ |