<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Because your input is 3x3 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132647#M25762</link>
    <description>&lt;P&gt;Because your input is 3x3 matrix, the CCE format output has 6 values, to be:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; 4.5, 0.0; -0.45, 0.259808&lt;BR /&gt;
	-1.35, 0.779423; &amp;nbsp; 0.0, 0.0&lt;BR /&gt;
	-1.35, -0.779423; &amp;nbsp;0.0, 0.0&lt;/P&gt;

&lt;P&gt;Thus, rewrite them into complex format will be:&lt;/P&gt;

&lt;P&gt;V11 V12&lt;/P&gt;

&lt;P&gt;V21 V22&lt;/P&gt;

&lt;P&gt;V31 V32&lt;/P&gt;

&lt;P&gt;Since input is a 3x3 matrix, the result output should also be 3x3. Thus, the result matrix above should be in the format of:&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;V11 V12 ??&lt;/P&gt;

&lt;P&gt;V21 V22 ??&lt;/P&gt;

&lt;P&gt;V31 V32 ??&lt;/P&gt;

&lt;P&gt;Restore it from CCE format would be:&lt;/P&gt;

&lt;P&gt;V11 V12 conj(V12)&lt;/P&gt;

&lt;P&gt;V21 V22 conj(V32)&lt;/P&gt;

&lt;P&gt;V31 V32 conj(V22)&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 05:40:00 GMT</pubDate>
    <dc:creator>Jing_Xu</dc:creator>
    <dc:date>2017-06-23T05:40:00Z</dc:date>
    <item>
      <title>Intel MKL DftiComputeForward how to get full transform matrix from CCE format in C</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132644#M25759</link>
      <description>&lt;P&gt;I'm trying to implement a 2 dimensional fourier transform via use of &lt;A href="https://software.intel.com/en-us/mkl-developer-reference-c-fft-functions"&gt;MKL FFT functions&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I'm interested in transforming from the space domain (i.e., my input signal is a 2D MxN matrix of `double`s) to the frequency domain (i.e., a 2D MxN output matrix of complexes with double accuracy, `MKL_Complex16`) and then back to the space domain after some filtering.&lt;/P&gt;

&lt;P&gt;Based on the examples provided by intel's MKL implementation (i.e., &lt;A href="https://software.intel.com/en-us/node/522297"&gt;basic_dp_real_dft_2d.c&lt;/A&gt;&amp;nbsp;etc.) I've created the following matlab-ish function:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;    bool fft2(double *in, int m, int n, MKL_Complex16 *out) {
      bool ret(false);
      DFTI_DESCRIPTOR_HANDLE hand(NULL);
      MKL_LONG dim[2] = {m, n};
      if(!DftiCreateDescriptor(&amp;amp;hand, DFTI_DOUBLE, DFTI_REAL, 2, dim)) {
        if(!DftiSetValue(hand, DFTI_PLACEMENT, DFTI_NOT_INPLACE)) {
          if(!DftiSetValue(hand, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX)) {
            MKL_LONG rs[3] = {0, n, 1};
            if(!DftiSetValue(hand, DFTI_INPUT_STRIDES, rs)) {
              MKL_LONG cs[3] = {0, n / 2 + 1, 1};
              if(!DftiSetValue(hand, DFTI_OUTPUT_STRIDES, cs)) {
                if(!DftiCommitDescriptor(hand)) {
                  ret = !DftiComputeForward(hand, in, out));
                }
              }
            }
          }
        }
      }
      DftiFreeDescriptor(&amp;amp;hand);
      return ret;
    }&lt;/PRE&gt;

&lt;P&gt;Due to the fact that I want to do some DSP stuff (e.g., Gaussian filtering) and thus I have to do matrix multiplications. I want the full transformation matrix instead of the CCE format in C matrix that &lt;A href="http://(https://software.intel.com/en-us/mkl-developer-reference-c-dfticomputeforward#22ABAA43-D44B-4CC1-8C2A-ACA1366B5C43"&gt;DftiComputeForward&lt;/A&gt;&amp;nbsp;outputs.&lt;/P&gt;

&lt;P&gt;**How can I reconstruct the full transformation matrix of an arbitrary sized 2d signal (i.e., matrix) from the CCE format in C matrix that I get as output from &lt;A href="https://software.intel.com/en-us/mkl-developer-reference-c-dfticomputeforward#22ABAA43-D44B-4CC1-8C2A-ACA1366B5C43"&gt;DftiComputeForward&lt;/A&gt;&amp;nbsp;function?**&lt;/P&gt;

&lt;P&gt;For example if I have the following 2D real signal:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; 0.1, 0.2, 0.3&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px;" /&gt;
		&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; 0.4, 0.5, 0.6&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px;" /&gt;
		&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &amp;nbsp; 0.7, 0.8, 0.9&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;It's full transformation matrix would be:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;4.5 + 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -0.45 + 0.259808j, -0.45 - 0.259808j&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; -1.35 + 0.779423j, &amp;nbsp;0 &amp;nbsp; &amp;nbsp;- 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;- 0j&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; -1.35 - 0.779423j, &amp;nbsp;0 &amp;nbsp; &amp;nbsp;+ 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp;+ 0j&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;However the result from `DftiComputeForward` in CCE is:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;4.5 + 0j, &amp;nbsp;-0.45 + 0.259808j, -1.35 + 0.779423j,&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; - 0j, &amp;nbsp;-1.35 - 0.779423j, &amp;nbsp;0 &amp;nbsp; &amp;nbsp;+ 0j,&lt;BR /&gt;
		&amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; + 0j, &amp;nbsp; 0 + 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;+ 0j&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 21 Jun 2017 08:23:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132644#M25759</guid>
      <dc:creator>bouzas__dimitrios</dc:creator>
      <dc:date>2017-06-21T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Please check https://software</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132645#M25760</link>
      <description>&lt;P&gt;Please check&amp;nbsp;https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/288202.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 00:04:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132645#M25760</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-06-22T00:04:00Z</dc:date>
    </item>
    <item>
      <title>Jing X. Thanx for the reply,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132646#M25761</link>
      <description>&lt;P&gt;&lt;A href="https://software.intel.com/en-us/user/1458945" style="font-size: 11px; background-color: rgb(238, 238, 238);"&gt;Jing X.&lt;/A&gt;&amp;nbsp;Thanx for the reply, but I've seen this thread already, actually I've spent several days thinking what I'm doing wrong with respect with the guidelines given there. Applying however the suggested solution, didn't manage to get the correct results. For example in the following demo, I've created a function called&amp;nbsp;convertFromCCEFormat() which takes as input the output array in CCE format in C of the DftiComputeForward function and based on the best reply provided by&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/93956" style="font-size: 11px; background-color: rgb(238, 238, 238);"&gt;Dmitry Baksheev&lt;/A&gt;&amp;nbsp;I'm trying to "reconstruct" the full matrix. To put it more simply, feeding in DftiComputeForward the 2D 3x3 real valued matrix:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; &amp;nbsp; 0.1, 0.2, 0.3&lt;/SPAN&gt;&lt;BR style="font-size: 12px; font-style: italic;" /&gt;
		&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; &amp;nbsp; 0.4, 0.5, 0.6&lt;/SPAN&gt;&lt;BR style="font-size: 12px; font-style: italic;" /&gt;
		&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; &amp;nbsp; 0.7, 0.8, 0.9&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I get as result 5 element (i.e., 3x3 / 2 + 1) the complex valued vector:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&amp;nbsp;4.5, &amp;nbsp; &amp;nbsp;0.0&lt;/P&gt;

	&lt;P&gt;-0.45, &amp;nbsp;0.259808&lt;/P&gt;

	&lt;P&gt;-1.35, &amp;nbsp;0.779423&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;0.0, &amp;nbsp; &amp;nbsp;0.0&lt;/P&gt;

	&lt;P&gt;-1.35, -0.779423&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The correct result of the transformation would be the complex valued 3x3 matrix:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; 4.5 + 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -0.45 + 0.259808j, -0.45 - &amp;nbsp;0.259808j&lt;/SPAN&gt;&lt;BR style="font-size: 12px; font-style: italic;" /&gt;
		&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; -1.35 + 0.779423j, &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; - 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;0j&lt;/SPAN&gt;&lt;BR style="font-size: 12px; font-style: italic;" /&gt;
		&lt;SPAN style="font-size: 12px; font-style: italic;"&gt;&amp;nbsp; -1.35 - 0.779423j, &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; + 0j, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;+ 0j&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;My question is how would I transform the out of DftiComputeForward which is in CCE format in C to the matrix above?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;To my understanding the thread suggests that the CCE format stores only the one half of the transformation. Due to the fact that fft matrix is conjugate symmetric you could reconstruct the original transformation matrix based on this symmetry. While the row subscript &lt;SPAN style="font-size: 13.008px;"&gt;in the output&amp;nbsp;&lt;/SPAN&gt;runs normally in [0 - M) (where M is the number of rows of the initial signal 2D matrix) the columns subscript runs in [0 - N/2] (where N is the number of columns of the initial signal 2D matrix). Thus, for column subscripts greater than N / 2 we have to take the conjugate mirror element (i.e., y(i, N - j), where i and j are arbitrary row and column subscripts respectively). That's what I'm doing in my&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;convertFromCCEFormat()&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;function (at least that's what I think I'm doing) but it doesn't seem to give me correct results.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 1em;"&gt;[DEMO]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include "mkl_service.h"
#include "mkl_dfti.h"
#include &amp;lt;cstdio&amp;gt;

template&amp;lt;typename T&amp;gt;
T&amp;amp;
rowMajorAccess(T *a, int m, int n, int i, int j) {
  return a[i * n + j];
}

void
print(double const &amp;amp;val) {
  printf("%4.4lf ", val);
}

void
print(MKL_Complex16 const &amp;amp;val) {
  printf("(%4.4lf, %4.4lf) ", val.real, val.imag);
}

template&amp;lt;typename T&amp;gt;
void
printMatrix(T *a, int m, int n) {
  for (int i(0); i &amp;lt; m; ++i) {
    for (int j(0); j &amp;lt; n; ++j) {
      print(a[i * n + j]);
    }
    printf("\n");
  }
}

template&amp;lt;typename T&amp;gt;
T*
initMatrix(int m, int n) {
  T *out = (T*)mkl_malloc(m * n * sizeof(T), 128);
  for (int i(0), n_elem(m * n); i &amp;lt; n_elem; ++i) out&lt;I&gt; = {};
  return out;
}

MKL_Complex16
conj(MKL_Complex16 const &amp;amp;in) {
  MKL_Complex16 out;
  out.real = in.real;
  out.imag = -in.imag;
  return out;
}

bool fft2(double *in, int m, int n, MKL_Complex16 *out) {
  bool ret(false);
  DFTI_DESCRIPTOR_HANDLE hand(NULL);
  MKL_LONG dim[2] = { m, n };
  if (!DftiCreateDescriptor(&amp;amp;hand, DFTI_DOUBLE, DFTI_REAL, 2, dim)) {
    if (!DftiSetValue(hand, DFTI_PLACEMENT, DFTI_NOT_INPLACE)) {
      if (!DftiSetValue(hand, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX)) {
        MKL_LONG rs[3] = { 0, n, 1 };
        if (!DftiSetValue(hand, DFTI_INPUT_STRIDES, rs)) {
          MKL_LONG cs[3] = { 0, n / 2 + 1, 1 };
          if (!DftiSetValue(hand, DFTI_OUTPUT_STRIDES, cs)) {
            if (!DftiCommitDescriptor(hand)) {
              ret = !DftiComputeForward(hand, in, out);
            }
          }
        }
      }
    }
  }
  DftiFreeDescriptor(&amp;amp;hand);
  return ret;
}

MKL_Complex16*
convertFromCCEFormat(MKL_Complex16 *cce, int m, int n) {
  MKL_Complex16 *out = initMatrix&amp;lt;MKL_Complex16&amp;gt;(m, n);
  int half = n / 2 + 1;
  for (int i(0); i &amp;lt; m; ++i) {
    for (int j(0); j &amp;lt; half; ++j) {
      rowMajorAccess(out, m, n, i, j) = rowMajorAccess(cce, m, n, i, j);
    }
    for (int j(half); j &amp;lt; n; ++j) {
      rowMajorAccess(out, m, n, i, j) = conj(rowMajorAccess(cce, m, n, i, n - j));
    }
  }
  return out;
}

int main() {
  int const m = 3;
  int const n = 3;
  double *signal = initMatrix&amp;lt;double&amp;gt;(m, n);
  signal[0] = 0.1; signal[1] = 0.2; signal[2] = 0.3;
  signal[3] = 0.4; signal[4] = 0.5; signal[5] = 0.6;
  signal[6] = 0.7; signal[7] = 0.8; signal[8] = 0.9;
  printf("Initial Signal:\n");
  printMatrix(signal, m, n);

  MKL_Complex16 *cce = initMatrix&amp;lt;MKL_Complex16&amp;gt;(m, n / 2 + 1);
  fft2(signal, m, n, cce);

  printf("CCE Format for C\n");
  for (int i(0), n_elem(m * (n / 2 + 1)); i &amp;lt; n_elem; ++i) {
    printf("  (%g, %g)\n", cce&lt;I&gt;.real, cce&lt;I&gt;.imag);
  }

  MKL_Complex16 *freq = convertFromCCEFormat(cce, m, n);
  
  printf("Frequency Domain:\n");
  printMatrix(freq, m, n);

  mkl_free(freq);
  mkl_free(cce);
  mkl_free(signal);
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jun 2017 12:42:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132646#M25761</guid>
      <dc:creator>bouzas__dimitrios</dc:creator>
      <dc:date>2017-06-22T12:42:52Z</dc:date>
    </item>
    <item>
      <title>Because your input is 3x3</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132647#M25762</link>
      <description>&lt;P&gt;Because your input is 3x3 matrix, the CCE format output has 6 values, to be:&lt;/P&gt;

&lt;P&gt;&amp;nbsp; 4.5, 0.0; -0.45, 0.259808&lt;BR /&gt;
	-1.35, 0.779423; &amp;nbsp; 0.0, 0.0&lt;BR /&gt;
	-1.35, -0.779423; &amp;nbsp;0.0, 0.0&lt;/P&gt;

&lt;P&gt;Thus, rewrite them into complex format will be:&lt;/P&gt;

&lt;P&gt;V11 V12&lt;/P&gt;

&lt;P&gt;V21 V22&lt;/P&gt;

&lt;P&gt;V31 V32&lt;/P&gt;

&lt;P&gt;Since input is a 3x3 matrix, the result output should also be 3x3. Thus, the result matrix above should be in the format of:&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;V11 V12 ??&lt;/P&gt;

&lt;P&gt;V21 V22 ??&lt;/P&gt;

&lt;P&gt;V31 V32 ??&lt;/P&gt;

&lt;P&gt;Restore it from CCE format would be:&lt;/P&gt;

&lt;P&gt;V11 V12 conj(V12)&lt;/P&gt;

&lt;P&gt;V21 V22 conj(V32)&lt;/P&gt;

&lt;P&gt;V31 V32 conj(V22)&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 05:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132647#M25762</guid>
      <dc:creator>Jing_Xu</dc:creator>
      <dc:date>2017-06-23T05:40:00Z</dc:date>
    </item>
    <item>
      <title>Jing X. (Intel) thanx for the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132648#M25763</link>
      <description>&lt;P&gt;&lt;A href="https://software.intel.com/en-us/user/1458945" style="font-size: 11px; background-color: rgb(238, 238, 238);"&gt;Jing X. (Intel)&lt;/A&gt;&amp;nbsp;thanx for the reply, that really cleared things up. For future readers having the same problem, I'm posting a CCE format in C to full matrix transformation:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;//! \brief
//! - Decompresses an M x N matrix stored in complex conjugate even sequence (alas CCE)
//!   format in C.
//!
//! \param[in] cce   : Pointer to M x N matrix stored in CCE format in C (i.e, its size is M x (N / 2 + 1)).
//! \param[in] m     : Number of rows in output matrix.
//! \param[in] n     : Number of columns in output matrix.
//! \param[in] align : Memory alignment of output matrix.
//!
//! \return M x N uncompressed matrix.
//! \brief
//! - Decompresses an M x N matrix stored in complex conjugate even sequence (alas CCE)
//!   format in C.
//!
//! \param[in] cce   : Pointer to M x N matrix stored in CCE format in C (i.e, its size is M x (N / 2 + 1)).
//! \param[in] m     : Number of rows in resulting matrix.
//! \param[in] n     : Number of columns in resulting matrix.
//! \param[in] align : Memory alignment of output matrix.
//!
//! \return M x N uncompressed matrix.
template&amp;lt;typename T&amp;gt;
T*
convertFromCCEFormat(T const *cce, unsigned int const m, unsigned int const n, unsigned int const align = 64) {
  
  T *out = (T*) mkl_malloc(m * n * sizeof(T), align);
  
  unsigned int half = n / 2 + 1;
  
  for(unsigned int i(0); i &amp;lt; m; ++i) {

    for(unsigned int j(0); j &amp;lt; half; ++j) {

      out[i * n + j] = cce[i * half + j];
    
    }
    
    for(unsigned int j(half); j &amp;lt; n; ++j) {
      
      unsigned int idx_out = i * n + j;
      unsigned int idx_cce = i * half + n - j;

      // conjugate
      out[idx_out].real =  cce[idx_cce].real;
      out[idx_out].imag = -cce[idx_cce].imag;
    
    }

  }

  return out;
}

&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 10:25:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-DftiComputeForward-how-to-get-full-transform-matrix/m-p/1132648#M25763</guid>
      <dc:creator>bouzas__dimitrios</dc:creator>
      <dc:date>2017-06-23T10:25:05Z</dc:date>
    </item>
  </channel>
</rss>

