- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone
I am using icc compiler to deal with my mkl_complex16 arrays, i was trying out my mathematical formula that i want to implement on the mic... but i got these errors:
essai.c(136): error: expression must have struct or union type
sum.real= sum.real+w.real*y_in.real[z+1][s+1];
^
essai.c(137): error: expression must have struct or union type
sum.imag= sum.imag+w.imag*y_in.imag[z+1][s+1];
^
Here is my code:
MKL_Complex16 y_in[4][16];
MKL_Complex16 w,sum;
int s,z,y;
int l =20;
int nThreads =4;
for (s=0;s<(l-1);s++)
{
for(z=0;z<(nThread-1);z++)
{
for(y=0;y<(nThread-1);y++)
{
w.real= y;
w.imag=-y;
sum.real= sum.real+w.real*y_in.real[z+1][s+1];
sum.imag= sum.imag+w.imag*y_in.imag[z+1][s+1];
}
}
}
Any help would be apperciated
Thank you
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MooN K.
I try build your code and the error looks be in y_in.real[z+1][s+1].
complex16.cpp(28): error: expression must have class type
sum.real= sum.real+w.real*y_in.real[z+1][s+1];
You can fix the problem as below
sum.real=0;
sum.imag=0;
....
sum.real= sum.real+w.real*y_in[z+1][s+1].real;
sum.imag= sum.imag+w.imag*y_in[z+1][s+1].imag;
Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page