Compare commits
No commits in common. "09ca162abb2f370bf4deceea0cf84b3383fe0858" and "125cd1e8181a03bf07e07554560fb29d4bb1114a" have entirely different histories.
09ca162abb
...
125cd1e818
@ -1,4 +1,3 @@
|
|||||||
#include <sched.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -49,7 +48,7 @@ __always_inline void to_float_iq(const int16_t* i_c, const int16_t* q_c, float*
|
|||||||
q_float_hi = _mm256_mul_ps(q_float_hi, scale);
|
q_float_hi = _mm256_mul_ps(q_float_hi, scale);
|
||||||
|
|
||||||
// interleave and store
|
// interleave and store
|
||||||
__m256 interleaved_lo0 = _mm256_unpacklo_ps(i_float_lo, q_float_lo);
|
__m256 interleaved_lo0 = _mm256_unpacklo_ps(i_float_lo, q_float_hi);
|
||||||
__m256 interleaved_lo1 = _mm256_unpackhi_ps(i_float_lo, q_float_lo);
|
__m256 interleaved_lo1 = _mm256_unpackhi_ps(i_float_lo, q_float_lo);
|
||||||
|
|
||||||
__m256 interleaved_hi0 = _mm256_unpacklo_ps(i_float_hi, q_float_hi);
|
__m256 interleaved_hi0 = _mm256_unpacklo_ps(i_float_hi, q_float_hi);
|
||||||
@ -59,6 +58,19 @@ __always_inline void to_float_iq(const int16_t* i_c, const int16_t* q_c, float*
|
|||||||
_mm256_storeu_ps(&output[i * 2 + 8], _mm256_permute2f128_ps(interleaved_lo0, interleaved_lo1, 0x31));
|
_mm256_storeu_ps(&output[i * 2 + 8], _mm256_permute2f128_ps(interleaved_lo0, interleaved_lo1, 0x31));
|
||||||
_mm256_storeu_ps(&output[i * 2 + 16], _mm256_permute2f128_ps(interleaved_hi0, interleaved_hi1, 0x20));
|
_mm256_storeu_ps(&output[i * 2 + 16], _mm256_permute2f128_ps(interleaved_hi0, interleaved_hi1, 0x20));
|
||||||
_mm256_storeu_ps(&output[i * 2 + 24], _mm256_permute2f128_ps(interleaved_hi0, interleaved_hi1, 0x31));
|
_mm256_storeu_ps(&output[i * 2 + 24], _mm256_permute2f128_ps(interleaved_hi0, interleaved_hi1, 0x31));
|
||||||
|
|
||||||
|
// float i_output[16];
|
||||||
|
// float q_output[16];
|
||||||
|
|
||||||
|
// _mm256_storeu_ps(&i_output[i], i_float_lo);
|
||||||
|
// _mm256_storeu_ps(&i_output[i + 8], i_float_hi);
|
||||||
|
// _mm256_storeu_ps(&q_output[i], q_float_lo);
|
||||||
|
// _mm256_storeu_ps(&q_output[i + 8], q_float_hi);
|
||||||
|
|
||||||
|
// for (int j = 0; j < 16; j++) {
|
||||||
|
// output[(i + j) * 2 + 0] = i_output[j];
|
||||||
|
// output[(i + j) * 2 + 1] = q_output[j];
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < len; ++i) {
|
for (; i < len; ++i) {
|
||||||
@ -194,7 +206,6 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
while (!stop) {
|
while (!stop) {
|
||||||
ps2000_get_streaming_last_values(unit, &get_overview_buffers);
|
ps2000_get_streaming_last_values(unit, &get_overview_buffers);
|
||||||
sched_yield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup(unit);
|
cleanup(unit);
|
||||||
|
Loading…
Reference in New Issue
Block a user