Open zzycarrot opened 7 months ago
is it because the variable "image" was locked when it was been written that other threads can't use it ,which resulted in a slower speed than serial computing?
Is the behavior same with a simple #pragma omp parallel for ? (i mean without collapse/scheduling)
Is the behavior same with a simple #pragma omp parallel for ? (i mean without collapse/scheduling)
yes it is, i've tried a simple #pragma omp parallel for but with the same result
I am curious. Can you try the code from master branch in my repository with and without this #pragma ? https://github.com/ssloy/tinyrenderer/blob/6d3acdb9ee452449b528ef3900ef5528dad0f807/our_gl.cpp#L41
I am curious. Can you try the code from master branch in my repository with and without this #pragma ?
https://github.com/ssloy/tinyrenderer/blob/6d3acdb9ee452449b528ef3900ef5528dad0f807/our_gl.cpp#L41 i've tried yours now and it's performing as it should be (faster with omp) , maybe i've written my code wrongly ,
i see nothing wrong with your code, if you find the problem please share
when writting the Triangle() function ,i get a much slower result when i used omp parallel,(2 times slower infact),