27#ifndef RADIXSORT_H_INCLUDED
28#define RADIXSORT_H_INCLUDED
52#define _RADIX (1 << _STEPBITS)
59#define _HISTOSPLIT 512U
65#if _ITEMS < __CL_MIN_LOCALSIZE__
67#define _ITEMS __CL_MIN_LOCALSIZE__
69#if _HISTOSPLIT / 2 < __CL_MIN_LOCALSIZE__
71#define _HISTOSPLIT 2 * __CL_MIN_LOCALSIZE__
73#if _RADIX * _GROUPS * _ITEMS / 2 / _HISTOSPLIT < __CL_MIN_LOCALSIZE__
75#define _GROUPS 2 * __CL_MIN_LOCALSIZE__* _HISTOSPLIT / (_RADIX * _ITEMS)
105 const std::string variable =
"icell",
106 const std::string permutations =
"id_unsorted",
107 const std::string inv_permutations =
"id_sorted",
123 cl_event
_execute(
const std::vector<cl_event> events);
137 cl_event histograms(cl_event keys_event, cl_event histograms_event);
143 cl_event scan(cl_event event);
150 cl_event reorder(cl_event perms_event, cl_event histograms_event);
155 cl_event inversePermutations();
178 void setupTypedArgs();
185 std::string _var_name;
188 std::string _perms_name;
191 std::string _inv_perms_name;
209 cl_kernel _init_kernel;
211 cl_kernel _histograms_kernel;
213 cl_kernel _scan_kernel;
215 cl_kernel _paste_kernel;
217 cl_kernel _sort_kernel;
219 cl_kernel _inv_perms_kernel;
255 size_t _local_work_size;
258 size_t _global_work_size;
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
OpenCL kernel kernel based tool. (see Aqua::CalcServer::Kernel for details)
RadixSort(const std::string tool_name, const std::string variable="icell", const std::string permutations="id_unsorted", const std::string inv_permutations="id_sorted", bool once=false)
Definition RadixSort.cpp:43
void setup()
Definition RadixSort.cpp:114
cl_event _execute(const std::vector< cl_event > events)
Definition RadixSort.cpp:130
~RadixSort()
Definition RadixSort.cpp:83
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50
Set of definitions and macros related with the implementation.
#define uicl
Unsigned integer number.
Definition sphPrerequisites.hpp:85