P
Pushkar Pradhan
I tried to read the archives and solve this problem, but now I think I
better post my problem:
int main() {
int blkSz[NUMBASECASES][2] = { {2,2},
{2,3},
.....,
{6,6} };
write_bc_perf(mflops1, blkSz, NUMBASECASES);
void write_bc_perf(double mflops1[], int blockSz[][], int numEntries)
{
......../*other code*/
fprintf(fp, "%dx%d %g\n", blockSz[0], blockSz[1], mflops1);
......../*other code*/
}
This is my compiler error:
psp1@leto:~/pdc$ gcc -g -o main exec_basecases.c gen_matrix.c codelets.c
exec_basecases.c: In function `write_bc_perf':
exec_basecases.c:120: arithmetic on pointer to an incomplete type
exec_basecases.c:120: arithmetic on pointer to an incomplete type
When I comment out the above fprintf.. and compile,
In gdb I try to access blockSz[0] in write_bc_perf function, I get
the correct values for i=0, but the values are incorrect for i=1, i=2, etc.
Can anyone point out the problem.
better post my problem:
int main() {
int blkSz[NUMBASECASES][2] = { {2,2},
{2,3},
.....,
{6,6} };
write_bc_perf(mflops1, blkSz, NUMBASECASES);
void write_bc_perf(double mflops1[], int blockSz[][], int numEntries)
{
......../*other code*/
fprintf(fp, "%dx%d %g\n", blockSz[0], blockSz[1], mflops1);
......../*other code*/
}
This is my compiler error:
psp1@leto:~/pdc$ gcc -g -o main exec_basecases.c gen_matrix.c codelets.c
exec_basecases.c: In function `write_bc_perf':
exec_basecases.c:120: arithmetic on pointer to an incomplete type
exec_basecases.c:120: arithmetic on pointer to an incomplete type
When I comment out the above fprintf.. and compile,
In gdb I try to access blockSz[0] in write_bc_perf function, I get
the correct values for i=0, but the values are incorrect for i=1, i=2, etc.
Can anyone point out the problem.