【问题标题】:3D Convolution using Intel MKL使用英特尔 MKL 的 3D 卷积
【发布时间】:2014-11-21 02:36:24
【问题描述】:

我正在尝试使用 Intel MKL 计算 3D 数组的 3D 卷积。有人可以给我一些提示吗?使用MKL 可以实现吗?提前致谢。

【问题讨论】:

  • 如果您有解决方案,请发布。好问题。

标签: c 3d fft convolution intel-mkl


【解决方案1】:

英特尔有an example on their page 的 3D FFT,它应该有助于在频率空间中通过乘法执行卷积。抱歉,我没有完整的解决方案:

三维实数 FFT(C 接口)

#include "mkl_dfti.h"
float x[32][100][19];
float _Complex y[32][100][10]; /* 10 = 19/2 + 1 */
DFTI_DESCRIPTOR_HANDLE my_desc_handle;
MKL_LONG status, l[3];
MKL_LONG strides_out[4];

//...put input data into x[j][k][s] 0<=j<=31, 0<=k<=99, 0<=s<=18
l[0] = 32; l[1] = 100; l[2] = 19;

strides_out[0] = 0; strides_out[1] = 1000;
strides_out[2] = 10; strides_out[3] = 1;

status = DftiCreateDescriptor( &my_desc_handle, DFTI_SINGLE,
DFTI_REAL, 3, l );
status = DftiSetValue(my_desc_handle,
DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX);
status = DftiSetValue( my_desc_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE );
status = DftiSetValue(my_desc_handle,
DFTI_OUTPUT_STRIDES, strides_out);

status = DftiCommitDescriptor(my_desc_handle);
status = DftiComputeForward(my_desc_handle, x, y);
status = DftiFreeDescriptor(&my_desc_handle);
/* result is the complex value z(j,k,s) 0<=j<=31; 0<=k<=99, 0<=s<=9
and is stored in complex matrix y in CCE format. */

接下来的步骤是对填充内核执行相同的变换、两个复数数组的逐点乘法以及逆 FFT。

【讨论】:

  • 谢谢。我看过那个例子,它展示了如何使用这个库。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-02-21
  • 2016-07-14
  • 2016-09-26
  • 2019-11-19
  • 2022-07-06
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多