AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
UnSort.h
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
26#ifndef UNSORT_H_INCLUDED
27#define UNSORT_H_INCLUDED
28
29#include <CalcServer.h>
30#include <CalcServer/Kernel.h>
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
96 void setVariables();
97
99 std::string _var_name;
100
102 std::string _perms_name;
103
106
109
111 cl_mem _id_input;
112
114 cl_mem _input;
115
117 cl_mem _output;
118
120 cl_kernel _kernel;
121
123 size_t _global_work_size;
125 size_t _local_work_size;
127 unsigned int _n;
128};
129
130}
131} // namespace
132
133#endif // UNSORT_H_INCLUDED
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
Tools base class. The way that AQUAgpusph compute each problem is set through a set of tools that are...
Definition: Tool.h:46
const std::string name()
Definition: Tool.h:66
Recover the original id of each particle.
Definition: UnSort.h:43
~UnSort()
Definition: UnSort.cpp:60
InputOutput::ArrayVariable * input()
Definition: UnSort.h:67
cl_mem output()
Definition: UnSort.h:72
void setup()
Definition: UnSort.cpp:71
cl_event _execute(const std::vector< cl_event > events)
Definition: UnSort.cpp:84
Definition: Variable.h:700
OpenCL kernel kernel based tool. (see Aqua::CalcServer::Kernel for details)
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45