source: trunk/dports/science/gnuradio/files/patch-volk-shuffle.diff @ 127653

Last change on this file since 127653 was 127653, checked in by michaelld@…, 5 years ago

gnuradio: add temporary patch to fix use of constants for shuffle in volk; addresses ticket #45540.

File size: 2.0 KB
  • volk/kernels/volk/volk_32fc_deinterleave_32f_x2.h

    old new static inline void volk_32fc_deinterleave_32f_x2_a_avx(float* iBuffer, float* qB 
    4141  float* qBufferPtr = qBuffer;
    4242
    4343  unsigned int number = 0;
    44   // Mask for real and imaginary parts
    45   int realMask = 0x88;
    46   int imagMask = 0xdd;
    4744  const unsigned int eighthPoints = num_points / 8;
    4845  __m256 cplxValue1, cplxValue2, complex1, complex2, iValue, qValue;
    4946  for(;number < eighthPoints; number++){
    static inline void volk_32fc_deinterleave_32f_x2_a_avx(float* iBuffer, float* qB 
    5855    complex2 = _mm256_permute2f128_ps(cplxValue1, cplxValue2, 0x31);
    5956
    6057    // Arrange in i1i2i3i4 format
    61     iValue = _mm256_shuffle_ps(complex1, complex2, realMask);
     58    iValue = _mm256_shuffle_ps(complex1, complex2, 0x88);
    6259    // Arrange in q1q2q3q4 format
    63     qValue = _mm256_shuffle_ps(complex1, complex2, imagMask);
     60    qValue = _mm256_shuffle_ps(complex1, complex2, 0xdd);
    6461
    6562    _mm256_store_ps(iBufferPtr, iValue);
    6663    _mm256_store_ps(qBufferPtr, qValue);
  • volk/kernels/volk/volk_32fc_deinterleave_imag_32f.h

    old new  
    3737static inline void volk_32fc_deinterleave_imag_32f_a_avx(float* qBuffer, const lv_32fc_t* complexVector, unsigned int num_points){
    3838  unsigned int number = 0;
    3939  const unsigned int eighthPoints = num_points / 8;
    40   int imagMask = 0xdd;
    4140  const float* complexVectorPtr = (const float*)complexVector;
    4241  float* qBufferPtr = qBuffer;
    4342
    static inline void volk_32fc_deinterleave_imag_32f_a_avx(float* qBuffer, const l 
    5453    complex2 = _mm256_permute2f128_ps(cplxValue1, cplxValue2, 0x31);
    5554
    5655    // Arrange in q1q2q3q4 format
    57     qValue = _mm256_shuffle_ps(complex1, complex2, imagMask);
     56    qValue = _mm256_shuffle_ps(complex1, complex2, 0xdd);
    5857    //iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(3,1,3,1));
    5958
    6059    _mm256_store_ps(qBufferPtr, qValue);
Note: See TracBrowser for help on using the repository browser.