OFDM modulator. Parallel processing.

Parallel processing is a non-trivial method to speed up our applications. Our computers have often two or more cores today. It is also possible to use some coprocessors like GPU or FPGA. All of this staff allows to run complex systems in the real-time.

In this post I will show you how to simply implement parallel processing in the OFDM modulator. Let’s take a look at the listings below.

void Cworking_Application_Layer::cworking_process_OFDM_modulation( Cworking_Matrix_Data& cworking_input, Cworking_Matrix_Data& cworking_output )
{
  /* For each symbol */
  #pragma omp parallel for
  for ( size_t cworking_symbol = 0; cworking_symbol < cworking_input.cworking_symbols; cworking_symbol++ )
  {
    /* Create temporary symbol vector */
    Cworking_Complex_Vector cworking_symbol_output;

    /* ------------------------ OFDM Modulation ------------------------ */

    /* Calculate IFFT */
    this->cworking_dsp.muged_1D_ifft( cworking_input.cworking_radio_frame[ cworking_symbol ], cworking_symbol_output );

    /* ------------------------ OFDM Modulation ------------------------ */

    /* Store output into matrix */
    for ( size_t cworking_subcarrier = 0; cworking_subcarrier < cworking_symbol_output.length; cworking_subcarrier++ )
    {
      /* Store single sub-carrier */
      cworking_output.cworking_radio_frame[ cworking_symbol ].array[ cworking_subcarrier ] =
      cworking_symbol_output.array[ cworking_subcarrier ];
    }

    /* Clean memory */
    delete [] cworking_symbol_output.array;
  }
}

Continue reading