Go Back   AC3D Forums > General > AC3D Suggestions
Register FAQ Members List Calendar Today's Posts

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 26th December 2020, 11:48 AM   #4
modeler
Member
Advanced member
 
Join Date: Nov 2003
Posts: 35
Default Re: Overall support for multicore cpu

I got it to work. I missed one of the variables that has to be included inside the for loop.

int cores = (int)num_vertices / 100;
if (cores == 0)
cores = 1;
if (cores > omp_get_num_procs())
cores = omp_get_num_procs();
int m;

#pragma omp parallel for num_threads (cores) private(m)
for (m = 0; m < (int)num_vertices; m++)
{
Point3 v;
Vertex *vtemp;
v.x = vert[m].v[0];
v.y = vert[m].v[1];
v.z = vert[m].v[2];
vtemp = object_find_vertex_point(ob, &v);
vindex[m] = ac_object_get_vertex_index(ob, vtemp);
}

Last edited by modeler; 27th December 2020 at 11:29 AM.
modeler is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 05:34 PM.


AC3D Forum
(C) Inivis Limited 2020