12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef __SORTINGNETWORK_HPP__
- #define __SORTINGNETWORK_HPP__
- #include "oasm_lib.h"
- #include "utils.hpp"
- enum OSort_Style{BUFFERS, KEY_DATA, KEY_DATAX2};
- void OddEvenMergeSort(unsigned char *buf, uint64_t N, size_t block_size);
- #if 0
- double DecryptAndOddEvenMergeSort(unsigned char *encrypted_buffer, uint64_t N, size_t block_size,
- unsigned char *result_buffer);
- #endif
- void BitonicSort(unsigned char *buffer, size_t N, size_t block_size, bool ascend);
- void BitonicSort(unsigned char *keys, size_t N, unsigned char *associated_data1,
- unsigned char *associated_data2, size_t data_size, bool ascend);
- template<OSwap_Style oswap_style, typename KeyType = uint64_t>
- void BitonicSort(unsigned char *buffer, size_t N, size_t block_size, bool ascend);
- template<OSwap_Style oswap_style, typename KeyType = uint64_t>
- inline void BitonicSort(unsigned char *keys, size_t N, unsigned char *associated_data1,
- unsigned char *associated_data2, size_t data_size, bool ascend);
- template<OSwap_Style oswap_style, typename KeyType = uint64_t>
- void BitonicMerge(unsigned char *keys, size_t N, unsigned char *associated_data1,
- unsigned char *associated_data2, size_t data_size, bool ascend);
- #if 0
- void testBitonicSort();
- #endif
- #include "SortingNetwork.tcc"
- #endif
|