I have Selection sort function
inline void selection_sort(double* arrayPtr, int length_array)
{
for (auto i = 0; i < length_array; i++)
{
for (auto j = i + 1; j < length_array; j++)
{
if (arrayPtr[i] > arrayPtr[j])
{
std::swap(arrayPtr[i], arrayPtr[j]);
}
}
}
}
How to optimize it with multithreading?
I found solutions only for quicksort but these solutions did not help me.