dspx 0.1.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +185 -0
- package/.vscode/c_cpp_properties.json +17 -0
- package/.vscode/settings.json +68 -0
- package/.vscode/tasks.json +28 -0
- package/DISCLAIMER.md +32 -0
- package/LICENSE +21 -0
- package/README.md +1803 -0
- package/ROADMAP.md +192 -0
- package/TECHNICAL_DEBT.md +165 -0
- package/binding.gyp +65 -0
- package/docs/ADVANCED_LOGGER_FEATURES.md +598 -0
- package/docs/AUTHENTICATION_SECURITY.md +396 -0
- package/docs/BACKEND_IMPROVEMENTS.md +399 -0
- package/docs/CHEBYSHEV_BIQUAD_EQ_IMPLEMENTATION.md +405 -0
- package/docs/FFT_IMPLEMENTATION.md +490 -0
- package/docs/FFT_IMPROVEMENTS_SUMMARY.md +387 -0
- package/docs/FFT_USER_GUIDE.md +494 -0
- package/docs/FILTERS_IMPLEMENTATION.md +260 -0
- package/docs/FILTER_API_GUIDE.md +418 -0
- package/docs/FIR_SIMD_OPTIMIZATION.md +175 -0
- package/docs/LOGGER_API_REFERENCE.md +350 -0
- package/docs/NOTCH_FILTER_QUICK_REF.md +121 -0
- package/docs/PHASE2_TESTS_AND_NOTCH_FILTER.md +341 -0
- package/docs/PHASES_5_7_SUMMARY.md +403 -0
- package/docs/PIPELINE_FILTER_INTEGRATION.md +446 -0
- package/docs/SIMD_OPTIMIZATIONS.md +211 -0
- package/docs/TEST_MIGRATION_SUMMARY.md +173 -0
- package/docs/TIMESERIES_IMPLEMENTATION_SUMMARY.md +322 -0
- package/docs/TIMESERIES_QUICK_REF.md +85 -0
- package/docs/advanced.md +559 -0
- package/docs/time-series-guide.md +617 -0
- package/docs/time-series-migration.md +376 -0
- package/jest.config.js +37 -0
- package/package.json +42 -0
- package/prebuilds/linux-x64/dsp-ts-redis.node +0 -0
- package/prebuilds/win32-x64/dsp-ts-redis.node +0 -0
- package/scripts/test.js +24 -0
- package/src/build/dsp-ts-redis.node +0 -0
- package/src/native/DspPipeline.cc +675 -0
- package/src/native/DspPipeline.h +44 -0
- package/src/native/FftBindings.cc +817 -0
- package/src/native/FilterBindings.cc +1001 -0
- package/src/native/IDspStage.h +53 -0
- package/src/native/adapters/InterpolatorStage.h +201 -0
- package/src/native/adapters/MeanAbsoluteValueStage.h +289 -0
- package/src/native/adapters/MovingAverageStage.h +306 -0
- package/src/native/adapters/RectifyStage.h +88 -0
- package/src/native/adapters/ResamplerStage.h +238 -0
- package/src/native/adapters/RmsStage.h +299 -0
- package/src/native/adapters/SscStage.h +121 -0
- package/src/native/adapters/VarianceStage.h +307 -0
- package/src/native/adapters/WampStage.h +114 -0
- package/src/native/adapters/WaveformLengthStage.h +115 -0
- package/src/native/adapters/ZScoreNormalizeStage.h +326 -0
- package/src/native/core/FftEngine.cc +441 -0
- package/src/native/core/FftEngine.h +224 -0
- package/src/native/core/FirFilter.cc +324 -0
- package/src/native/core/FirFilter.h +149 -0
- package/src/native/core/IirFilter.cc +576 -0
- package/src/native/core/IirFilter.h +210 -0
- package/src/native/core/MovingAbsoluteValueFilter.cc +17 -0
- package/src/native/core/MovingAbsoluteValueFilter.h +135 -0
- package/src/native/core/MovingAverageFilter.cc +18 -0
- package/src/native/core/MovingAverageFilter.h +135 -0
- package/src/native/core/MovingFftFilter.cc +291 -0
- package/src/native/core/MovingFftFilter.h +203 -0
- package/src/native/core/MovingVarianceFilter.cc +194 -0
- package/src/native/core/MovingVarianceFilter.h +114 -0
- package/src/native/core/MovingZScoreFilter.cc +215 -0
- package/src/native/core/MovingZScoreFilter.h +113 -0
- package/src/native/core/Policies.h +352 -0
- package/src/native/core/RmsFilter.cc +18 -0
- package/src/native/core/RmsFilter.h +131 -0
- package/src/native/core/SscFilter.cc +16 -0
- package/src/native/core/SscFilter.h +137 -0
- package/src/native/core/WampFilter.cc +16 -0
- package/src/native/core/WampFilter.h +101 -0
- package/src/native/core/WaveformLengthFilter.cc +17 -0
- package/src/native/core/WaveformLengthFilter.h +98 -0
- package/src/native/utils/CircularBufferArray.cc +336 -0
- package/src/native/utils/CircularBufferArray.h +62 -0
- package/src/native/utils/CircularBufferVector.cc +145 -0
- package/src/native/utils/CircularBufferVector.h +45 -0
- package/src/native/utils/NapiUtils.cc +53 -0
- package/src/native/utils/NapiUtils.h +21 -0
- package/src/native/utils/SimdOps.h +870 -0
- package/src/native/utils/SlidingWindowFilter.cc +239 -0
- package/src/native/utils/SlidingWindowFilter.h +159 -0
- package/src/native/utils/TimeSeriesBuffer.cc +205 -0
- package/src/native/utils/TimeSeriesBuffer.h +140 -0
- package/src/ts/CircularLogBuffer.ts +87 -0
- package/src/ts/DriftDetector.ts +331 -0
- package/src/ts/TopicRouter.ts +428 -0
- package/src/ts/__tests__/AdvancedDsp.test.ts +585 -0
- package/src/ts/__tests__/AuthAndEdgeCases.test.ts +241 -0
- package/src/ts/__tests__/Chaining.test.ts +387 -0
- package/src/ts/__tests__/ChebyshevBiquad.test.ts +229 -0
- package/src/ts/__tests__/CircularLogBuffer.test.ts +158 -0
- package/src/ts/__tests__/DriftDetector.test.ts +389 -0
- package/src/ts/__tests__/Fft.test.ts +484 -0
- package/src/ts/__tests__/ListState.test.ts +153 -0
- package/src/ts/__tests__/Logger.test.ts +208 -0
- package/src/ts/__tests__/LoggerAdvanced.test.ts +319 -0
- package/src/ts/__tests__/LoggerMinor.test.ts +247 -0
- package/src/ts/__tests__/MeanAbsoluteValue.test.ts +398 -0
- package/src/ts/__tests__/MovingAverage.test.ts +322 -0
- package/src/ts/__tests__/RMS.test.ts +315 -0
- package/src/ts/__tests__/Rectify.test.ts +272 -0
- package/src/ts/__tests__/Redis.test.ts +456 -0
- package/src/ts/__tests__/SlopeSignChange.test.ts +166 -0
- package/src/ts/__tests__/Tap.test.ts +164 -0
- package/src/ts/__tests__/TimeBasedExpiration.test.ts +124 -0
- package/src/ts/__tests__/TimeBasedRmsAndMav.test.ts +231 -0
- package/src/ts/__tests__/TimeBasedVarianceAndZScore.test.ts +284 -0
- package/src/ts/__tests__/TimeSeries.test.ts +254 -0
- package/src/ts/__tests__/TopicRouter.test.ts +332 -0
- package/src/ts/__tests__/TopicRouterAdvanced.test.ts +483 -0
- package/src/ts/__tests__/TopicRouterPriority.test.ts +487 -0
- package/src/ts/__tests__/Variance.test.ts +509 -0
- package/src/ts/__tests__/WaveformLength.test.ts +147 -0
- package/src/ts/__tests__/WillisonAmplitude.test.ts +197 -0
- package/src/ts/__tests__/ZScoreNormalize.test.ts +459 -0
- package/src/ts/advanced-dsp.ts +566 -0
- package/src/ts/backends.ts +1137 -0
- package/src/ts/bindings.ts +1225 -0
- package/src/ts/easter-egg.ts +42 -0
- package/src/ts/examples/MeanAbsoluteValue/test-state.ts +99 -0
- package/src/ts/examples/MeanAbsoluteValue/test-streaming.ts +269 -0
- package/src/ts/examples/MovingAverage/test-state.ts +85 -0
- package/src/ts/examples/MovingAverage/test-streaming.ts +188 -0
- package/src/ts/examples/RMS/test-state.ts +97 -0
- package/src/ts/examples/RMS/test-streaming.ts +253 -0
- package/src/ts/examples/Rectify/test-state.ts +107 -0
- package/src/ts/examples/Rectify/test-streaming.ts +242 -0
- package/src/ts/examples/Variance/test-state.ts +195 -0
- package/src/ts/examples/Variance/test-streaming.ts +260 -0
- package/src/ts/examples/ZScoreNormalize/test-state.ts +277 -0
- package/src/ts/examples/ZScoreNormalize/test-streaming.ts +306 -0
- package/src/ts/examples/advanced-dsp-examples.ts +397 -0
- package/src/ts/examples/callbacks/advanced-router-features.ts +326 -0
- package/src/ts/examples/callbacks/benchmark-circular-buffer.ts +109 -0
- package/src/ts/examples/callbacks/monitoring-example.ts +265 -0
- package/src/ts/examples/callbacks/pipeline-callbacks-example.ts +137 -0
- package/src/ts/examples/callbacks/pooled-callbacks-example.ts +274 -0
- package/src/ts/examples/callbacks/priority-routing-example.ts +277 -0
- package/src/ts/examples/callbacks/production-topic-router.ts +214 -0
- package/src/ts/examples/callbacks/topic-based-logging.ts +161 -0
- package/src/ts/examples/chaining/test-chaining-redis.ts +113 -0
- package/src/ts/examples/chaining/test-chaining.ts +52 -0
- package/src/ts/examples/emg-features-example.ts +284 -0
- package/src/ts/examples/fft-example.ts +309 -0
- package/src/ts/examples/fft-examples.ts +349 -0
- package/src/ts/examples/filter-examples.ts +320 -0
- package/src/ts/examples/list-state-example.ts +131 -0
- package/src/ts/examples/logger-example.ts +91 -0
- package/src/ts/examples/notch-filter-examples.ts +243 -0
- package/src/ts/examples/phase5/drift-detection-example.ts +290 -0
- package/src/ts/examples/phase6-7/production-observability.ts +476 -0
- package/src/ts/examples/phase6-7/redis-timeseries-integration.ts +446 -0
- package/src/ts/examples/redis/redis-example.ts +202 -0
- package/src/ts/examples/redis-example.ts +202 -0
- package/src/ts/examples/simd-benchmark.ts +126 -0
- package/src/ts/examples/tap-debugging.ts +230 -0
- package/src/ts/examples/timeseries/comparison-example.ts +290 -0
- package/src/ts/examples/timeseries/iot-sensor-example.ts +143 -0
- package/src/ts/examples/timeseries/redis-streaming-example.ts +233 -0
- package/src/ts/examples/waveform-length-example.ts +139 -0
- package/src/ts/fft.ts +722 -0
- package/src/ts/filters.ts +1078 -0
- package/src/ts/index.ts +120 -0
- package/src/ts/types.ts +589 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#include "CircularBufferVector.h"
|
|
2
|
+
#include <algorithm>
|
|
3
|
+
#include <stdexcept>
|
|
4
|
+
|
|
5
|
+
using namespace dsp::utils;
|
|
6
|
+
|
|
7
|
+
// -----------------------------------------------------------------------------
|
|
8
|
+
// Constructor
|
|
9
|
+
// Initializes the circular buffer with a specified size
|
|
10
|
+
// @ param size - The size of the circular buffer
|
|
11
|
+
// @ return void
|
|
12
|
+
template <typename T>
|
|
13
|
+
CircularBufferVector<T>::CircularBufferVector(size_t size)
|
|
14
|
+
: head(0), tail(0), capacity(std::max(size, static_cast<size_t>(1))), count(0)
|
|
15
|
+
{
|
|
16
|
+
this->buffer.resize(this->capacity);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// -----------------------------------------------------------------------------
|
|
20
|
+
// Method: push
|
|
21
|
+
// Adds an item to the circular buffer
|
|
22
|
+
// @ param item - The item to add
|
|
23
|
+
// @ return bool - True if the item was added, false if the buffer is full
|
|
24
|
+
template <typename T>
|
|
25
|
+
bool CircularBufferVector<T>::push(const T &item)
|
|
26
|
+
{
|
|
27
|
+
if (isFull())
|
|
28
|
+
{
|
|
29
|
+
return false; // Buffer is full
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
this->buffer[this->head] = item;
|
|
33
|
+
this->head = (this->head + 1) % this->capacity;
|
|
34
|
+
this->count++;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// -----------------------------------------------------------------------------
|
|
39
|
+
// Method: pop
|
|
40
|
+
// Removes an item from the circular buffer
|
|
41
|
+
// @ param item - The item to remove
|
|
42
|
+
// @ return bool - True if the item was removed, false if the buffer is empty
|
|
43
|
+
template <typename T>
|
|
44
|
+
bool CircularBufferVector<T>::pop(T &item) noexcept
|
|
45
|
+
{
|
|
46
|
+
if (isEmpty())
|
|
47
|
+
{
|
|
48
|
+
return false; // Buffer is empty
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
item = this->buffer[this->tail];
|
|
52
|
+
this->tail = (this->tail + 1) % this->capacity;
|
|
53
|
+
this->count--;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// -----------------------------------------------------------------------------
|
|
58
|
+
// Method: clear
|
|
59
|
+
// Clears the circular buffer
|
|
60
|
+
// @ param void
|
|
61
|
+
// @ return void
|
|
62
|
+
template <typename T>
|
|
63
|
+
void CircularBufferVector<T>::clear() noexcept
|
|
64
|
+
{
|
|
65
|
+
this->head = 0;
|
|
66
|
+
this->tail = 0;
|
|
67
|
+
this->count = 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// -----------------------------------------------------------------------------
|
|
71
|
+
// Method: pushOverwrite
|
|
72
|
+
// Adds an item to the circular buffer, overwriting the oldest item if full
|
|
73
|
+
// @ param item - The item to add
|
|
74
|
+
// @ return void
|
|
75
|
+
template <typename T>
|
|
76
|
+
void CircularBufferVector<T>::pushOverwrite(const T &item)
|
|
77
|
+
{
|
|
78
|
+
this->buffer[this->head] = item;
|
|
79
|
+
this->head = (this->head + 1) % this->capacity;
|
|
80
|
+
|
|
81
|
+
this->count < this->capacity ? ++this->count : this->tail = (this->tail + 1) % this->capacity;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// -----------------------------------------------------------------------------
|
|
85
|
+
// Getter: getCapacity
|
|
86
|
+
// @ param void
|
|
87
|
+
// @ return size_t - The capacity of the circular buffer
|
|
88
|
+
template <typename T>
|
|
89
|
+
size_t CircularBufferVector<T>::getCapacity() const noexcept
|
|
90
|
+
{
|
|
91
|
+
return this->capacity;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// -----------------------------------------------------------------------------
|
|
95
|
+
// Getter: getCount
|
|
96
|
+
// @ param void
|
|
97
|
+
// @ return size_t - The number of elements in the circular buffer
|
|
98
|
+
template <typename T>
|
|
99
|
+
size_t CircularBufferVector<T>::getCount() const noexcept
|
|
100
|
+
{
|
|
101
|
+
return this->count;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// -----------------------------------------------------------------------------
|
|
105
|
+
// Getter: isEmpty
|
|
106
|
+
// @ param void
|
|
107
|
+
// @ return bool - True if the buffer is empty, false otherwise
|
|
108
|
+
template <typename T>
|
|
109
|
+
bool CircularBufferVector<T>::isEmpty() const noexcept
|
|
110
|
+
{
|
|
111
|
+
return this->count == 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// -----------------------------------------------------------------------------
|
|
115
|
+
// Getter: isFull
|
|
116
|
+
// @ param void
|
|
117
|
+
// @ return bool - True if the buffer is full, false otherwise
|
|
118
|
+
template <typename T>
|
|
119
|
+
bool CircularBufferVector<T>::isFull() const noexcept
|
|
120
|
+
{
|
|
121
|
+
return this->count == this->capacity;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// -----------------------------------------------------------------------------
|
|
125
|
+
// Getter: peek
|
|
126
|
+
// @ param void
|
|
127
|
+
// @ return T - The item at the head of the buffer
|
|
128
|
+
template <typename T>
|
|
129
|
+
T CircularBufferVector<T>::peek() const
|
|
130
|
+
{
|
|
131
|
+
if (isEmpty())
|
|
132
|
+
{
|
|
133
|
+
throw std::runtime_error("Buffer is empty");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return this->buffer[this->tail];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Explicit template instantiation for common types
|
|
140
|
+
namespace dsp::utils
|
|
141
|
+
{
|
|
142
|
+
template class CircularBufferVector<int>;
|
|
143
|
+
template class CircularBufferVector<float>;
|
|
144
|
+
template class CircularBufferVector<double>;
|
|
145
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <vector>
|
|
4
|
+
#include <stdexcept>
|
|
5
|
+
|
|
6
|
+
namespace dsp::utils
|
|
7
|
+
{
|
|
8
|
+
template <typename T>
|
|
9
|
+
|
|
10
|
+
class CircularBufferVector
|
|
11
|
+
{
|
|
12
|
+
public:
|
|
13
|
+
// constructors
|
|
14
|
+
explicit CircularBufferVector(size_t size);
|
|
15
|
+
CircularBufferVector(const CircularBufferVector &other) = delete; // disable copy to avoid shallow copy
|
|
16
|
+
CircularBufferVector &operator=(const CircularBufferVector &other) = delete; // disable copy assignment to avoid shallow copy
|
|
17
|
+
|
|
18
|
+
// move semantics
|
|
19
|
+
CircularBufferVector(CircularBufferVector &&other) noexcept = default;
|
|
20
|
+
CircularBufferVector &operator=(CircularBufferVector &&other) noexcept = default;
|
|
21
|
+
|
|
22
|
+
// methods
|
|
23
|
+
bool push(const T &item);
|
|
24
|
+
bool pop(T &item) noexcept;
|
|
25
|
+
void clear() noexcept;
|
|
26
|
+
void pushOverwrite(const T &item);
|
|
27
|
+
|
|
28
|
+
// getters
|
|
29
|
+
size_t getCapacity() const noexcept;
|
|
30
|
+
size_t getCount() const noexcept;
|
|
31
|
+
bool isEmpty() const noexcept;
|
|
32
|
+
bool isFull() const noexcept;
|
|
33
|
+
T peek() const;
|
|
34
|
+
|
|
35
|
+
// destructor not needed since vector manages its own memory
|
|
36
|
+
~CircularBufferVector() = default;
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
std::vector<T> buffer;
|
|
40
|
+
size_t head;
|
|
41
|
+
size_t tail;
|
|
42
|
+
size_t capacity;
|
|
43
|
+
size_t count;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#include "NapiUtils.h"
|
|
2
|
+
|
|
3
|
+
template <typename T>
|
|
4
|
+
std::vector<T> dsp::utils::NapiArrayToVector(const Napi::Array &arr)
|
|
5
|
+
{
|
|
6
|
+
std::vector<T> vec;
|
|
7
|
+
vec.reserve(arr.Length());
|
|
8
|
+
for (uint32_t j = 0; j < arr.Length(); ++j)
|
|
9
|
+
{
|
|
10
|
+
if (std::is_same<T, bool>::value)
|
|
11
|
+
{
|
|
12
|
+
vec.push_back(arr.Get(j).As<Napi::Boolean>().Value());
|
|
13
|
+
}
|
|
14
|
+
else if (std::is_same<T, double>::value)
|
|
15
|
+
{
|
|
16
|
+
// Use DoubleValue() for double to preserve precision
|
|
17
|
+
vec.push_back(static_cast<T>(arr.Get(j).As<Napi::Number>().DoubleValue()));
|
|
18
|
+
}
|
|
19
|
+
else
|
|
20
|
+
{
|
|
21
|
+
// Use FloatValue() for float types
|
|
22
|
+
vec.push_back(static_cast<T>(arr.Get(j).As<Napi::Number>().FloatValue()));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return vec;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
template <typename T>
|
|
29
|
+
Napi::Array dsp::utils::VectorToNapiArray(Napi::Env env, const std::vector<T> &vec)
|
|
30
|
+
{
|
|
31
|
+
Napi::Array arr = Napi::Array::New(env, vec.size());
|
|
32
|
+
for (size_t j = 0; j < vec.size(); ++j)
|
|
33
|
+
{
|
|
34
|
+
if (std::is_same<T, bool>::value)
|
|
35
|
+
{
|
|
36
|
+
arr.Set(j, Napi::Boolean::New(env, static_cast<bool>(vec[j])));
|
|
37
|
+
}
|
|
38
|
+
else
|
|
39
|
+
{
|
|
40
|
+
arr.Set(j, Napi::Number::New(env, static_cast<double>(vec[j])));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return arr;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Explicit template instantiations
|
|
47
|
+
template std::vector<float> dsp::utils::NapiArrayToVector<float>(const Napi::Array &);
|
|
48
|
+
template std::vector<double> dsp::utils::NapiArrayToVector<double>(const Napi::Array &);
|
|
49
|
+
template std::vector<bool> dsp::utils::NapiArrayToVector<bool>(const Napi::Array &);
|
|
50
|
+
|
|
51
|
+
template Napi::Array dsp::utils::VectorToNapiArray<float>(Napi::Env, const std::vector<float> &);
|
|
52
|
+
template Napi::Array dsp::utils::VectorToNapiArray<double>(Napi::Env, const std::vector<double> &);
|
|
53
|
+
template Napi::Array dsp::utils::VectorToNapiArray<bool>(Napi::Env, const std::vector<bool> &);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <napi.h>
|
|
4
|
+
#include <vector>
|
|
5
|
+
#include <type_traits> // For std::is_same
|
|
6
|
+
|
|
7
|
+
namespace dsp::utils
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* @brief Helper to convert Napi::Array to std::vector
|
|
11
|
+
*/
|
|
12
|
+
template <typename T>
|
|
13
|
+
std::vector<T> NapiArrayToVector(const Napi::Array &arr);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @brief Helper to convert std::vector to Napi::Array
|
|
17
|
+
*/
|
|
18
|
+
template <typename T>
|
|
19
|
+
Napi::Array VectorToNapiArray(Napi::Env env, const std::vector<T> &vec);
|
|
20
|
+
|
|
21
|
+
} // namespace dsp::utils
|