AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
LinkList.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 LINKLIST_H_INCLUDED
27#define LINKLIST_H_INCLUDED
28
29#include <sphPrerequisites.h>
30#include <vector>
31#include <CalcServer/Tool.h>
34
35namespace Aqua {
36namespace CalcServer {
37
51{
52 public:
58 LinkList(const std::string tool_name,
59 const std::string input = "pos",
60 bool once = false);
61
64 ~LinkList();
65
68 void setup();
69
70 protected:
75 cl_event _execute(const std::vector<cl_event> events);
76
77 private:
80 void setupOpenCL();
81
84 void nCells();
85
88 void allocate();
89
92 void setVariables();
93
95 std::string _input_name;
96
98 float _cell_length;
99
101 uivec4 _n_cells;
102
104 Reduction* _min_pos;
105
107 Reduction* _max_pos;
108
110 RadixSort* _sort;
111
113 cl_kernel _ihoc;
115 size_t _ihoc_lws;
117 size_t _ihoc_gws;
119 std::vector<void*> _ihoc_args;
120
122 cl_kernel _icell;
124 size_t _icell_lws;
126 size_t _icell_gws;
128 std::vector<void*> _icell_args;
129
131 cl_kernel _ll;
133 size_t _ll_lws;
135 size_t _ll_gws;
137 std::vector<void*> _ll_args;
138};
139
140}
141} // namespace
142
143#endif // LINKLIST_H_INCLUDED
Methods to perform a radix sort using the GPU (or any device supported by OpenCL)....
Reductions, like scans, prefix sums, maximum or minimum, etc... (See Aqua::CalcServer::Reduction for ...
Tools virtual environment to allow the user to define/manipulate the tools used to carry out the simu...
Methods to perform a radix sort using the GPU (or any device supported by OpenCL)....
Definition: RadixSort.h:97
Reductions, like scans, prefix sums, maximum or minimum, etc...
Definition: Reduction.h:43
Tools base class. The way that AQUAgpusph compute each problem is set through a set of tools that are...
Definition: Tool.h:46
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Set of definitions and macros related with the implementation.