Hi Steve,
Thanks for you kind reply. When I set a small value for the if sentence, such as if (dot_product > threshold && carray[i][0] >= 4.0 ) {
I print information for the loop with “loop_out” and “loo_in” sign and information for “carry[i][0] and carry[i][1]” (red sentence in the following) .
The endless_loop gives information like this
"
loop_out 8190
loop_in
48 129 4 0 42 58
53 146 4 0 42 94
loop_in
loop_out 8191
loop_in
48 129 4 0 42 58
53 146 4 0 42 94
loop_in
loop_out 8192
loop_in
48 129 4 0 42 58
53 146 4 0 42 94
loop_in
"
You can see that the carray[j][1] did not change after one loop. I can not understand what happen in this case. However, when I remove “&& carray[i][0] >= 4.0 ) {”, everything is ok.
I wonder if there exists a bug here.
The red sentences were added for checking.