You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compilation for C-Type complex number code in for GCC 6.2 running on MacOS:
g++-6 utils.cpp -c
g++-6 complexmulttiming.cpp utils.o -o complexmulttimingc -Ofast -funroll-loops -D USE_C_TYPE_COMPLEX
complexmulttiming.cpp: In function 'int main(int, char**)':
complexmulttiming.cpp:115:5: error: 'complex' was not declared in this scope
complex double *z = (complex double *)malloc(sizeof(complex double)*M);
^~~~~~~
complexmulttiming.cpp:115:5: note: suggested alternative:
In file included from /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/ccomplex:39:0,
from /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/complex.h:32,
from complexmulttiming.cpp:4:
/usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/complex:63:32: note: 'std::complex'
template class complex;
^~~~~~~
complexmulttiming.cpp:116:13: error: expected ';' before 'double'
complex double *z2 = (complex double )malloc(sizeof(complex double)M);
^~~~~~
complexmulttiming.cpp:118:7: error: 'z' was not declared in this scope
z[i] = data1_re[i] + Idata1_im[i];
^
complexmulttiming.cpp:119:7: error: 'z2' was not declared in this scope
z2[i] = data2_re[i] + Idata2_im[i];
^~
complexmulttiming.cpp:123:7: error: 'z' was not declared in this scope
z[i] = z[i-1] + z[i] * z2[i];
^
complexmulttiming.cpp:123:30: error: 'z2' was not declared in this scope
z[i] = z[i-1] + z[i] * z2[i];
^~
complexmulttiming.cpp:126:89: error: 'z' was not declared in this scope
printf("%lld C-type complex mults in %.3g s\n\tresult = %.12f + %.12fI\n",M,t,creal(z[M-1]),cimag(z[M-1]));
^
complexmulttiming.cpp:127:19: error: 'z2' was not declared in this scope
free(z); free(z2);
^~
The text was updated successfully, but these errors were encountered:
Compilation for C-Type complex number code in for GCC 6.2 running on MacOS:
g++-6 utils.cpp -c
g++-6 complexmulttiming.cpp utils.o -o complexmulttimingc -Ofast -funroll-loops -D USE_C_TYPE_COMPLEX
complexmulttiming.cpp: In function 'int main(int, char**)':
complexmulttiming.cpp:115:5: error: 'complex' was not declared in this scope
complex double *z = (complex double *)malloc(sizeof(complex double)*M);
^~~~~~~
complexmulttiming.cpp:115:5: note: suggested alternative:
In file included from /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/ccomplex:39:0,
from /usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/complex.h:32,
from complexmulttiming.cpp:4:
/usr/local/Cellar/gcc/6.2.0/include/c++/6.2.0/complex:63:32: note: 'std::complex'
template class complex;
^~~~~~~
complexmulttiming.cpp:116:13: error: expected ';' before 'double'
complex double *z2 = (complex double )malloc(sizeof(complex double)M);
^~~~~~
complexmulttiming.cpp:118:7: error: 'z' was not declared in this scope
z[i] = data1_re[i] + Idata1_im[i];
^
complexmulttiming.cpp:119:7: error: 'z2' was not declared in this scope
z2[i] = data2_re[i] + Idata2_im[i];
^~
complexmulttiming.cpp:123:7: error: 'z' was not declared in this scope
z[i] = z[i-1] + z[i] * z2[i];
^
complexmulttiming.cpp:123:30: error: 'z2' was not declared in this scope
z[i] = z[i-1] + z[i] * z2[i];
^~
complexmulttiming.cpp:126:89: error: 'z' was not declared in this scope
printf("%lld C-type complex mults in %.3g s\n\tresult = %.12f + %.12fI\n",M,t,creal(z[M-1]),cimag(z[M-1]));
^
complexmulttiming.cpp:127:19: error: 'z2' was not declared in this scope
free(z); free(z2);
^~
The text was updated successfully, but these errors were encountered: