Hello all,
Is there an example code for 2D or 3D convolution using vsldConvExecX? I am not sure I understand the documentation (Ch. 10 in MKL doc.). It seems like I cannot pass a dynamically allocated 2D array to vsldConvExecX. Is this correct? If so do I just pass a 1D array (with the usual pointer arithmetic to access elements in i,j fashion?)? If so what do the strides and shapes look like?
I have something like this
.........
VSLConvTaskPtr task;
MKL_INT rank,mode,xshape[2],yshape[2],zshape[2];
static double x[sx*sx],y[sy*sy],z[sz*sz];
MKL_INT xstride[2],ystride[2],zstride[2];
int status,i;
xshape[0] = xshape[1] = sx; yshape[0] = yshape[1] = sy; zshape[0] = zshape[1] = sz;
xstride[0] = 1; xstride[1] = sx; ystride[0] = 1; ystride[1] = sy; zstride[0] = 1; zstride[1] = ??
for (i=0; i<(sx*sx); i++)
x=i*i;
for (i=0; i<(sy*sy); i++)
y = 1;
rank = 1;
mode = VSL_CONV_MODE_AUTO;
status = vsldConvNewTask(&task,mode,rank,xshape,yshape,zshape);
...
status = vsldConvExecX(task,y,ystride,z,zstride);
........
I am unsure what zstride[1] will be. Also, I am thinking that sz would be the same size as the input signal, is this ok?
Please let me know if I am messing up the code real bad and what is the correct way to proceed.
Thanks in advance,
C.S.N