For example, if an ‘if statement’ is included in a for statement as shown below, is it difficult to achieve parallel processing using threads?
The results of one thread’s calculations are never used by another thread.
int a[100] = {0};
int b[100]; //save some value..
for(d = 0; d < 100; d++){
a[d] = 0;
if(b[d] != 0){
for(i = 10; i < 100; i++){
a[d] = i - 2;
}
}
}