diff --git a/include/villas/node/config.h.in b/include/villas/node/config.h.in index 7e7884804..b2a0fa21b 100644 --- a/include/villas/node/config.h.in +++ b/include/villas/node/config.h.in @@ -29,8 +29,9 @@ #include /** Default number of values in a sample */ -#define DEFAULT_SAMPLE_LENGTH 64 +#define DEFAULT_SAMPLE_LENGTH 64u #define DEFAULT_QUEUE_LENGTH 1024u +#define MAX_SAMPLE_LENGTH 256u /** Number of hugepages which are requested from the the kernel. * @see https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt */ diff --git a/include/villas/path.h b/include/villas/path.h index e3e26d863..dfacf125d 100644 --- a/include/villas/path.h +++ b/include/villas/path.h @@ -95,8 +95,8 @@ struct path { #ifdef __cplusplus villas::Logger logger; - std::bitset<128> mask; /**< A mask of path_sources which are enabled for poll(). */ - std::bitset<128> received; /**< A mask of path_sources for which we already received samples. */ + std::bitset mask; /**< A mask of path_sources which are enabled for poll(). */ + std::bitset received; /**< A mask of path_sources for which we already received samples. */ #endif }; diff --git a/lib/hooks/average.cpp b/lib/hooks/average.cpp index 2521e5704..4cd713c92 100644 --- a/lib/hooks/average.cpp +++ b/lib/hooks/average.cpp @@ -41,7 +41,7 @@ class AverageHook : public Hook { protected: int offset; - std::bitset<128> mask; + std::bitset mask; vlist signal_names; public: diff --git a/lib/path.cpp b/lib/path.cpp index 6004eec74..448b284d4 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -116,9 +116,9 @@ int path_init(struct path *p) assert(p->state == STATE_DESTROYED); p->logger = logging.get("path"); + new (&p->received) std::bitset; + new (&p->mask) std::bitset; - new (&p->received) std::bitset<128>; - new (&p->mask) std::bitset<128>; ret = vlist_init(&p->destinations); if (ret) @@ -721,7 +721,7 @@ int path_destroy(struct path *p) if (ret) return ret; - using bs = std::bitset<128>; + using bs = std::bitset; using lg = spdlog::logger; p->received.~bs();