Is there an analytic formula for c, such that the outermost loop on i can be parallelized so that c can be computed for any given iteration of i, j, k? N is known. The code is iterating through all unique triplets of some 1 dimensional array.
<code>for i=1:N-2
for j=i+1:N-1
for k=j+1:N
c++
tripletarray[c] = oneDarray[i] * oneDarray[j] * oneDarray[k];
</code>
<code>for i=1:N-2
for j=i+1:N-1
for k=j+1:N
c++
tripletarray[c] = oneDarray[i] * oneDarray[j] * oneDarray[k];
</code>
for i=1:N-2
for j=i+1:N-1
for k=j+1:N
c++
tripletarray[c] = oneDarray[i] * oneDarray[j] * oneDarray[k];