Lib/Kernels/DotVector.cpp
/**
 * Multiply current instance with the DFT elements of column `col`.
 *
 * The DFT matrix elements are calculated inline.
 * Note that low-precision sin/cos is used for vc4.
 *
 * @param row  index of row in dft array to process
 *
 * **TODO** use same header as ComplexDotVector::dft_dot_product().
 */
Multiply current instance with the DFT elements of column `col`.
The DFT matrix elements are calculated inline.
Note that low-precision sin/cos is used for vc4.

@param row  index of row in dft array to process


Multiply current instance with the DFT elements of column ` col ` . The DFT matrix elements are calculated inline . Note that low - precision sin / cos is used for vc4 . @param row index of row in dft array to process
void DotVector::dft_dot_product(Int const &row, Complex &result, int num_elements, Int const &offset) {
  Complex tmp(0, 0);               comment("DotVector::dft_dot_product()");
  for (int i = 0; i < (int) size(); ++i) {
    Int col = (i*16 + index() + offset);  
    Float param = -1.0f*toFloat(row*col)/toFloat(num_elements);
    Complex tmp1(elements[i]*cos(param), elements[i]*sin(param));
    tmp += tmp1;
  }
  rotate_sum(tmp.re(), result.re());
  rotate_sum(tmp.im(), result.im());
}
void DotVector :: dft_dot_product ( Int const & row , Complex & result , int num_elements , Int const & offset ) { Complex tmp ( 0 , 0 ) ; comment ( " " ) ; for ( int i = 0 ; i < ( int ) size ( ) ; ++ i ) { Int col = ( i * 16 + index ( ) + offset ) ; Float param = -1.0f * toFloat ( row * col ) / toFloat ( num_elements ) ; Complex tmp1 ( elements [ i ] * cos ( param ) , elements [ i ] * sin ( param ) ) ; tmp += tmp1 ; } rotate_sum ( tmp . re ( ) , result . re ( ) ) ; rotate_sum ( tmp . im ( ) , result . im ( ) ) ; }
Multiply current instance with the DFT elements of column `col`.
Multiply current instance with the DFT elements of column ` col ` .
// Index of column to process