multidimensional convolution example?

multidimensional convolution example?

Hi, I'm hoping someone here can give me an example using MKL functions for multidimensional convolution. All convolution examples from MKL package are 1D. I was able to run 1D convolution with no problem.

Got stuck at calling 2D convolution. Anybody could give me a hint? Appreciate it.

My code fragment for a 2D convolution of a 3x3 signal and a 3x3 kernel (results should be7x7):
......
x=calloc(sigDim1*sigDim2, sizeof(float));
y=calloc(kerDim1*kerDim2, sizeof(float));
z=calloc(resDim1*resDim2, sizeof(float));
......
int xShape[]={3,3}; int xStride[]={1,1};
int yShape[]={3,3}; int yStride[]={1,1};
int zShape[]={7,7}; int zStride[]={1,1};
......
dim=2;
mode=VSL_CONV_MODE_DIRECT;
vslsConvNewTask(&task,mode,dim,
&xShape,&yShape,&zShape);
status=vslsConvExec(task,x,&xStride,
y,&yStride,z,&zStride);
......

Task constructor passes. But Task Execution returned with error (status=-2303)

Message Edited by ttf on 03-08-2006 08:19 AM

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.