Hi,

I am really new to Cuda just started with the help of Cuda programming guide and tool kit. In the matrix multiplication is it compulsory to declare it in a single dimension …

when i was declaring this Kernel

//kernel declaration

__global__void matmul( float *m, float*n, float*p, int width)

{

int tx=threadIdx.x;

int ty=threadIdx.y;

int bx=blockIdx.x;

int by=blockIdx.y

float tile_width;

float row=by*tile_width+ty;
float col=bx*tile_width+tx;

float k;

int row,col;

float pvalue=0;

for(k=0;k<width;k++)

{

row=(int)m [by*width+ty];
col=(int)n [bx*width+tx];

pvalue+=m[row][k]* n[k][col];

}

p[row][col]=pvalue;

}

on debugging it shows the errors as follows in the second last line of program…

error1: expression must have pointer to object type.

error2: expression must have integer or enum type.

Please help me. This problem really screw me a lot and even with my best effort I am not able to find it’s solution.

Thanks in advance…