Oбъект исследования - алгоритмы параллельной сортировки с применением базовой операции «сравнение-обмен». Цель исследования - сокращение шагов работы алгоритма сортировки массива данных за счет уменьшения количества промежуточных перестановок элементов массива. Цель достигается разработкой оригинальной схемы коммутаций элементов массива. Данная схема составляет основу модели диагональных коммутаций пар элементов массива. Массив имеет 2d-представление, что позволяет объединить в пары элементы из его различных половин. За счет 2d-представления массива образуемые пары элементов позволяют уменьшить количество перестановок. Новизна модели диагональных коммутаций состоит в том, что операции «сравнение-обмен» параллельно выполняются на неконфликтующих парах элементов, взятых из различных половин массива. Это свойство модели позволяет «прыжками» перемещать элемент в необходимую позицию массива. Модель диагональных коммутаций объединена с известной моделью четно-нечетной сортировки. В результате объединения был получен алгоритм параллельной сортировки с гибридной схемой коммутации. Эта схема реализует на четных шагах предложенную модель, а на нечетных шагах - модель четно-нечетной сортировки. Моделирование алгоритмов четно-нечетной сортировки и гибридной сортировок показало преимущество разработанной модели. Расширение четно-нечетной сортировки моделью диагональных коммутаций позволяет сократить среднее число шагов сортировки. Кроме четно-нечетной сортировки, модель диагональных коммутаций применима для алгоритмов параллельной сортировки, использующих базовую операцию «сравнение-обмен» - сортировки Батчера, Шелла, слиянием
The object of the research is parallel sorting algorithms using the basic operation "compare-swap". The aim of the research is to reduce the steps of the algorithm for sorting the data array by reducing the number of intermediate permutations of the array elements. The goal is achieved by developing an original switching circuit of the array elements. This circuit forms the basis of the model for diagonal commutation of pairs of array elements. The array is 2D, which allows one to pair elements from its different halves. Due to the 2D representation of the array, the formed pairs of elements allow reducing the number of permutations. The novelty of the diagonal commutation model is that the “compare-exchange” operations are performed in parallel on non-conflicting pairs of elements taken from different halves of the array. This property of the model allows one to "jump" the element to the desired position in the array. The diagonal commutation model is combined with the well-known odd-even sorting model. The combination resulted in a parallel sorting algorithm with a hybrid switching scheme. This scheme implements the proposed model at even steps, and the even-odd sorting model at odd steps. Modeling algorithms for odd-even sorting and hybrid sorting showed the advantage of the developed model. Extension of even-odd sorting by the diagonal commutation model allows to reduce the average number of sorting steps by 6-10%. In addition to odd-even sorting, the diagonal commutation model is applicable for parallel sorting algorithms using the basic comparison-exchange operation - Butcher, Shell, merge sorting