-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stride implementation for the node class. #144
Conversation
Pull Request Review Markdown DocHey there! 👋 Here's a summary of the previous results for the Pull Request review. Let's dive right in! Changes ✨
Suggestions 🤔
Bugs 🐛
Improvements 🚀One place in the code that could be refactored for better readability is in the std::vector<TestParams> testParams = {
{ .n_samples{ 1024 }, .numerator{ 1 }, .denominator{ 1 }, .exp_in{ 1024 }, .exp_out{ 1024 }, .exp_counter{ 1 } },
{ .n_samples{ 1024 }, .numerator{ 1 }, .denominator{ 2 }, .exp_in{ 1024 }, .exp_out{ 512 }, .exp_counter{ 1 } },
// Add more test parameters
};
for (const auto& params : testParams) {
interpolation_decimation_test(params, thread_pool);
} Rating ⭐I cannot rate the code as I am a bot and do not have the capability to evaluate code based on criteria such as readability, performance, and security. It would be best for a human reviewer to assess these aspects of the code. That's it for the summary! If you have any further questions or need assistance, feel free to ask. Good luck with the Pull Request! 🎉 |
SonarCloud Quality Gate failed. 0 Bugs 68.3% Coverage The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and sweet PR! This does what it advertises is sufficiently tested and documented! Well done 👍!
Thanks for making the additional minor adjustments. This bodes well ...
Few details on implementation:
stride == 0
then it is not used andn_samples_to_consume == n_samples_to_process
.stride != 0 and stride < in_available_samples
thenn_samples_to_consume == stride
.stride != 0 and stride > in_available_samples
then samples are consumed tillstride_consumed_counter == stride
.Depending on the parameters like
numerator
,denominator
and available samples.n_samples_to_process
can change for eachwork
function execution, butstride
is always the same. It can lead to different sample rates over time. In many cases this is normal behavior. If it is not the case then it is user responsibility to set proper parameters .It also can happen that
n_required_samples >= stride
but actualn_samples_to_process < stride
because of input-output port limitations, interpolation, decimation requirements etc. This is the user responsibility to set block parameters according to the needs.Performance tests
stride
main