19 Jun
2009
19 Jun
'09
10:45 p.m.
Richard B. Kreckel wrote:
You could either read up on the C++ feature "placement new" or, better, simply use C++ standard containers instead of malloc'ed memory.
Or, simpler than that, use normal arrays: A = new cl_N[N]; for(i=0; i<N; i++) { A[i] = complex(cl_float(i),cl_float(2)); } for(i=0; i<N; i++) { cout << A[i] << endl; } Bruno