feat(sda): add first templates and creators - #64
Open
ohrenschmaus wants to merge 5 commits into
Open
Conversation
ohrenschmaus
commented
Sep 2, 2026
Collaborator
- fix typo in TargetsEventPreprocessor
- add two sda-templates
- add create_design to sda.py
- add src/c_compile/sda.py
- add generate_c_files-tests
- fix typo in TargetsEventPreprocessor - add two sda-templates - add create_design to sda.py - add src/c_compile/sda.py - add generate_c_files-tests
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
Collaborator
Author
|
Der linting-error ist komisch. Als ich die init.py-Datei angepasst hatte -> wie vorgeschlagen, wurde geschrieben, dass ich es so schreiben soll, wie es vorher war. |
- add elasticai/creator_plugins/eventdetection/c/preprocessing_abs_template.h - add elasticai/creator_plugins/eventdetection/c/preprocessing_neo_template.h - add elasticai/creator_plugins/eventdetection/c/preprocessing_normal_template.h - add elasticai/creator_plugins/eventdetection/src/c_compile/preprocessor.py - update elasticai/preprocessor/eventdetection/preprocessors.py - update elasticai/preprocessor/eventdetection/preprocessors_test.py
Collaborator
Author
|
I started in the wrong place. Here are the correct templates and builders in eventdetection/preprocessors.py |
AErbsloeh
requested changes
Sep 3, 2026
| #include <stdint.h> | ||
| #include <stdlib.h> | ||
|
|
||
| #ifndef DEF_NEW_SDA_ABSOLUTE_CONST_IMPL |
Contributor
There was a problem hiding this comment.
Name: That's not really SDA. It is more like the event-preprocessing input
| bool calc_sda_abs_const_ ## id(input_type data, input_type *out) { \ | ||
| static const input_type thr = (input_type)(threshold); \ | ||
| *out = (input_type)abs(data); \ | ||
| return (input_type)abs(data) >= thr; \ |
Contributor
There was a problem hiding this comment.
Why is here the comparison? This should be done later with the EventProcessor/Detector
| ) | ||
|
|
||
|
|
||
| def build_sda_normal_const( |
| bool calc_neo_ ## id(input_type data, input_type *out) { \ | ||
| static input_type taps[3] = {0}; \ | ||
| static int8_t count = 0; \ | ||
| if (count < 3) { \ |
Contributor
There was a problem hiding this comment.
stimmt die Logik mit dem count?
| #include <stdbool.h> | ||
| #include <stdint.h> | ||
|
|
||
| #ifndef DEF_NEW_SDA_NORMAL_CONST_IMPL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.