-
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 blocks: Multiply, Divide, Add, Subtract #395
Conversation
@eltos thanks for your PR. Much appreciated. In order to be able to review this, this needs to have the corresponding unit-tests and QA/CI-pipeline passing. If you could have a look... |
@RalphSteinhagen the CI failure is not related to the PR:
I've merged the main branch, hope that helps |
True. Sadly, this was not covered in the developer tutorials during the workshop. Anyway, I have now added a "Add"_test = []<typename T>(const T&) {
test_block<T, Add<T>>({
.inputs = {{1, 2, 3, T( 4.2)},
{5, 6, 7, T( 8.3)}},
.output = { 6, 8, 10, T(12.5)}
});
} | kArithmeticTypes; |
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.
@eltos thanks a lot for your commit and patience/compliance w.r.t. the QA compliances. This goes a long way and helps keeping the code maintainable! 👍
I like the tests you write and should be sufficient. Will just wait that the first CI test pass and then merge it as is.
Thanks again and welcome to the GR4 maintainer team. 😁 🎉
@all-contributors please add @eltos for plugin |
I've put up a pull request to add @eltos! 🎉 |
@eltos, your unit test doesn't seem to be portable (Emscripten, probably 32bit vs. 64bit). Could you have a look and fix this? Thanks in advance. |
I can't see where the qa_math unit test fails? I am not familiar with emscripten, but what I can see from the emcc job's logs is a kill with error 137 while building the scheduler (before even building or executing qa_math).
Other than that there are some warnings on implicit conversion in some of the dependencies (pmt, ut, fmt) which are not related to this PR, and there is a warning on the usage of |
Signed-off-by: Eltos <eltos@outlook.de>
Signed-off-by: Eltos <eltos@outlook.de>
Signed-off-by: Eltos <eltos@outlook.de>
Signed-off-by: Eltos <eltos@outlook.de>
@eltos As already discussed this unfortunately was not merged in a timely manner on our side and now there were some API changes that had to be followed up. I already did them, but it seems I cannot update your PR branch. Could you either allow gnuradio4 maintainers to push to your branch (see here) or I would close this one and create a new PR. |
@wirew0rm you should be able to push now, I enabled the setting. |
a232b83
to
9794293
Compare
Merged as the remaining CI failures were unrelated and will be solved with #455 Thank you again for giving this a go already at this early stage and your patience and feedback! |
To learn how to implement blocks in gr4 I want to implement and contribute a simple math block as part of the Block Tutorial at European GNU Radio Days 2024. This PR is a work-in-progress state of my efforts.
Usage example:
Feedback:
I found it difficult to implement the block with a dynamic number of ports since I didn't find documentation on this, nor did I find a description on how to connect the ports in the graph (tried "in0", "in#0" etc. first).
I finally got it, but since this is a very general concept, it would be beneficial to provide the mechanics of "n_inputs" settings etc. in the base block and enable something like
PortInMulti<T, Limits<1, 32>> in;
for ease of use.Also, having more example flowgraphs like the one above would be helpful for newcomers.