-
Notifications
You must be signed in to change notification settings - Fork 205
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 length checks to volk_8u_x2_encodeframepolar_8u #642
Conversation
Signed-off-by: Clayton Smith <[email protected]>
} else { | ||
volk_8u_x2_encodeframepolar_8u_generic(u_target, u_temp, stage_size); | ||
} | ||
volk_8u_x2_encodeframepolar_8u_u_avx2(u_target, u_temp, stage_size); |
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.
May as well call the AVX2 version here, since we're in volk_32f_8u_polarbutterfly_32f_u_avx2
.
I also confirmed that GNU Radio's diff --git a/cmake/Modules/GrTest.cmake b/cmake/Modules/GrTest.cmake
index b5b2c196ec..f31e199067 100644
--- a/cmake/Modules/GrTest.cmake
+++ b/cmake/Modules/GrTest.cmake
@@ -67,7 +67,7 @@ function(GR_ADD_TEST test_name)
# We add it to the beginning of the list to use locally-built modules before installed ones.
list(INSERT pypath 0 "${PROJECT_BINARY_DIR}/test_modules")
- set(environs "VOLK_GENERIC=1" "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}"
+ set(environs "GR_DONT_LOAD_PREFS=1" "srcdir=${srcdir}"
"GR_CONF_CONTROLPORT_ON=False")
list(APPEND environs ${GR_TEST_ENVIRONS})
|
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.
LGTM. When I implemented these kernels, these very small sizes seemed to be useless for an FEC code. But people stumble over it anyways. Thus, we should fix that.
If GNU Radio's |
Another motivation for making this change is that it would allow a CI test to sweep over small vector lengths (which are prone to bugs) in all kernels. |
Add length checks to volk_8u_x2_encodeframepolar_8u
Fixes #414.
The various
volk_8u_x2_encodeframepolar_8u
implementations have warnings about the input size:volk/kernels/volk/volk_8u_x2_encodeframepolar_8u.h
Lines 157 to 158 in a26a1b8
volk/kernels/volk/volk_8u_x2_encodeframepolar_8u.h
Lines 430 to 431 in a26a1b8
volk/kernels/volk/volk_8u_x2_encodeframepolar_8u.h
Lines 692 to 693 in a26a1b8
volk/kernels/volk/volk_8u_x2_encodeframepolar_8u.h
Lines 964 to 965 in a26a1b8
So let's heed those warnings by falling back to the generic implementation if the input size is too small.
Doing so also removes the need for extra size checks in
volk_32f_8u_polarbutterfly_32f.h
.After this change, all failures disappear. I tested with the following:
I also verified that all valgrind warnings disappear after these changes. I tested with: