Lib/Kernels/ComplexDotVector.cpp
void ComplexDotVector::dft_dot_product(Int const &row, Complex &result, int num_elements, Int const &offset) {
  Complex tmp(0, 0);               comment("ComplexDotVector::dft_dot_product()");

  for (int i = 0; i < (int) size(); ++i) {
    Int col = (i*16 + index() + offset);  // Index of column to process
    Float param = -1.0f*toFloat(row*col)/toFloat(num_elements);
    Complex tmp1(re[i], im[i]);
    Complex tmp2(cos(param), sin(param));

    tmp += tmp1*tmp2;
  }

  rotate_sum(tmp.re(), result.re());
  rotate_sum(tmp.im(), result.im());
}
/**
 * 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
 * @param result       out parameter, to which result of dot product will be stored
 * @param num_elements total number of elements to use in divisor for phase.
 *                     For full multiplication, this will be the same as the dot vector size;
 *                     for block multiplication, this will be a multiple of size, the multiple
 *                     being the number of blocks.
 * @param offset       offset of num elements to use in columns for block matrix multiplication
 */
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
@param result       out parameter, to which result of dot product will be stored
@param num_elements total number of elements to use in divisor for phase.
For full multiplication, this will be the same as the dot vector size;
for block multiplication, this will be a multiple of size, the multiple
being the number of blocks.
@param offset       offset of num elements to use in columns for block matrix multiplication
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 @param result out parameter to which result of dot product will be stored @param num_elements total number of elements to use in divisor for phase . For full multiplication this will be the same as the dot vector size ; for block multiplication this will be a multiple of size the multiple being the number of blocks . @param offset offset of num elements to use in columns for block matrix multiplication
void ComplexDotVector::dft_dot_product(Int const &row, Complex &result, int num_elements, Int const &offset) {
  Complex tmp(0, 0);               comment("ComplexDotVector::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(re[i], im[i]);
    Complex tmp2(cos(param), sin(param));
    tmp += tmp1*tmp2;
  }
  rotate_sum(tmp.re(), result.re());
  rotate_sum(tmp.im(), result.im());
}
void ComplexDotVector :: 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 ( re [ i ] , im [ i ] ) ; Complex tmp2 ( cos ( param ) , sin ( param ) ) ; tmp += tmp1 * tmp2 ; } 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