循环中的分配可以并行化吗?

I am trying to parallelize this following part of my C code. By my limited researching (google), I can not conclude whether it is possible or not, especially the second line of the loop with a round() function and an int casting.

for (i = 0; i < N; i++)
{
    t1 = (c1 * (sqrt(c2 - dataSet1[i][0]) - dataSet1[i][1]) / dataSet1[i][2];   
    store[i][0] = c3 * dataSet2[i][(int)round(t1)];
}

c(n)s are the loop constantsand all data types are float.

If possible, I am open to implementing any ideas like vectorization, using OpenCL C or etc that may yield performance improvement for N ~ 100,000.

评论