jeudi 28 octobre 2021

What optimization technique (ex: loop piplining, urolling, merging..etc) can be applied on my code?

I am new to parallel implementation using optimization techniques. I read many documentations about this topic.

But I am not sure what optimization technique is the proper to be applied on my code to reduce execution time.

(ex: loop pipliing, loop unrolling, dataflow, loop merging ...etc )

my code:

for (int i = 0; i < 4344; i++)
    {
        for (int j = i + 1; j < 4344; j++)
        {
            if (array_dist[index_arr[i]] > array_dist[index_arr[j]])
            {
                x = index_arr[i];
                index_arr[i] = index_arr[j];
                index_arr[j] = x;
            }

        }
    }

Aucun commentaire:

Enregistrer un commentaire