Skip to content
Snippets Groups Projects
Commit 22767467 authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

layers fix

parent cbffc256
No related branches found
No related tags found
No related merge requests found
Pipeline #22990 passed
...@@ -88,6 +88,7 @@ int nx = (xmax-xmin)/delta; ...@@ -88,6 +88,7 @@ int nx = (xmax-xmin)/delta;
int ny = (ymax-ymin)/delta; int ny = (ymax-ymin)/delta;
int *m = (int*) calloc(nx*ny,sizeof(int)); int *m = (int*) calloc(nx*ny,sizeof(int));
float layers[] = {{{layers}}}; float layers[] = {{{layers}}};
int nlayers = {nlayers};
int nthreads = std::thread::hardware_concurrency(); int nthreads = std::thread::hardware_concurrency();
// //
int fn(float X,float Y,float Z) {{ int fn(float X,float Y,float Z) {{
...@@ -96,7 +97,7 @@ int fn(float X,float Y,float Z) {{ ...@@ -96,7 +97,7 @@ int fn(float X,float Y,float Z) {{
// //
void calc(int nx,int ny,int nthreads,int thread) {{ void calc(int nx,int ny,int nthreads,int thread) {{
int intensity; int intensity;
for (int layer = 0; layer < 2; ++layer) {{ for (int layer = 0; layer < nlayers; ++layer) {{
float z = layers[layer]; float z = layers[layer];
if (thread == 0) if (thread == 0)
cout << " z = " << z << endl; cout << " z = " << z << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment