27#ifndef RADIXSORT_H_INCLUDED
28#define RADIXSORT_H_INCLUDED
48#define __UINTBITS__ 32
55#define _RADIX (1 << _STEPBITS)
62#define _HISTOSPLIT 512
68#if _ITEMS < __CL_MIN_LOCALSIZE__
70#define _ITEMS __CL_MIN_LOCALSIZE__
72#if _HISTOSPLIT / 2 < __CL_MIN_LOCALSIZE__
74#define _HISTOSPLIT 2 * __CL_MIN_LOCALSIZE__
76#if _RADIX * _GROUPS * _ITEMS / 2 / _HISTOSPLIT < __CL_MIN_LOCALSIZE__
78#define _GROUPS 2 * __CL_MIN_LOCALSIZE__* _HISTOSPLIT / (_RADIX * _ITEMS)
108 const std::string variable =
"icell",
109 const std::string permutations =
"id_unsorted",
110 const std::string inv_permutations =
"id_sorted",
126 cl_event
_execute(
const std::vector<cl_event> events);
140 cl_event histograms(cl_event keys_event, cl_event histograms_event);
146 cl_event scan(cl_event event);
153 cl_event reorder(cl_event perms_event, cl_event histograms_event);
158 cl_event inversePermutations();
182 std::string _var_name;
185 std::string _perms_name;
188 std::string _inv_perms_name;
203 cl_kernel _init_kernel;
205 cl_kernel _histograms_kernel;
207 cl_kernel _scan_kernel;
209 cl_kernel _paste_kernel;
211 cl_kernel _sort_kernel;
213 cl_kernel _inv_perms_kernel;
233 unsigned int _groups;
239 unsigned int _histo_split;
242 unsigned int _key_bits;
244 unsigned int _n_pass;
249 size_t _local_work_size;
252 size_t _global_work_size;
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
Methods to perform a radix sort using the GPU (or any device supported by OpenCL)....
Definition: RadixSort.h:97
void setup()
Definition: RadixSort.cpp:119
cl_event _execute(const std::vector< cl_event > events)
Definition: RadixSort.cpp:135
~RadixSort()
Definition: RadixSort.cpp:75
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Set of definitions and macros related with the implementation.