AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
UnSort.hpp
Go to the documentation of this file.
1/*
2 * This file is part of AQUAgpusph, a free CFD program based on SPH.
3 * Copyright (C) 2012 Jose Luis Cercos Pita <jl.cercos@upm.es>
4 *
5 * AQUAgpusph is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * AQUAgpusph is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with AQUAgpusph. If not, see <http://www.gnu.org/licenses/>.
17 */
18
25
26#ifndef UNSORT_H_INCLUDED
27#define UNSORT_H_INCLUDED
28
29#include "CalcServer.hpp"
30#include "Kernel.hpp"
31
32namespace Aqua {
33namespace CalcServer {
34
43{
44 public:
51 UnSort(const std::string name,
52 const std::string var_name,
53 const std::string permutations_name = "id",
54 bool once = false);
55
58 ~UnSort();
59
62 void setup();
63
68
72 cl_mem output() { return _output; }
73
74 protected:
79 cl_event _execute(const std::vector<cl_event> events);
80
81 private:
84 void variables();
85
88 void setupMem();
89
92 void setupOpenCL();
93
95 std::string _var_name;
96
98 std::string _perms_name;
99
102
105
107 cl_mem _id_input;
108
110 cl_mem _input;
111
113 cl_mem _output;
114
116 cl_kernel _kernel;
117
119 size_t _global_work_size;
121 size_t _work_group_size;
123 size_t _n;
124
126 ArgSetter* _args_setter;
127};
128
129}
130} // namespace
131
132#endif // UNSORT_H_INCLUDED
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
OpenCL kernel kernel based tool. (see Aqua::CalcServer::Kernel for details)
Definition Kernel.hpp:99
void name(const std::string tool_name)
Definition Tool.hpp:66
Tools base class.
Definition Tool.hpp:176
~UnSort()
Definition UnSort.cpp:62
InputOutput::ArrayVariable * input()
Definition UnSort.hpp:67
UnSort(const std::string name, const std::string var_name, const std::string permutations_name="id", bool once=false)
Definition UnSort.cpp:42
cl_mem output()
Definition UnSort.hpp:72
void setup()
Definition UnSort.cpp:74
cl_event _execute(const std::vector< cl_event > events)
Definition UnSort.cpp:96
An array variable.
Definition Variable.hpp:894
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50