AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Set.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 SET_H_INCLUDED
27#define SET_H_INCLUDED
28
29#include "CalcServer.hpp"
30#include "SetScalar.hpp"
31#include "Kernel.hpp"
32
33namespace Aqua {
34namespace CalcServer {
35
40{
41 public:
59 Set(const std::string name,
60 const std::string var_name,
61 const std::string value,
62 bool once = false);
63
66 ~Set();
67
70 void setup();
71
72 protected:
75 void _solve();
76
81 cl_event _execute(const std::vector<cl_event> events);
82
83 private:
86 void variable();
87
90 void setupOpenCL();
91
95 void setVariables();
96
98 std::string _var_name;
100 std::string _value;
101
104
106 cl_mem _input;
107
109 cl_kernel _kernel;
110
112 size_t _global_work_size;
114 size_t _work_group_size;
116 size_t _n;
117
119 void* _data;
120};
121
122}
123} // namespace
124
125#endif // SET_H_INCLUDED
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
OpenCL kernel kernel based tool. (see Aqua::CalcServer::Kernel for details)
Set a scalar variable. (See Aqua::CalcServer::SetScalar for details)
void name(const std::string tool_name)
Definition Tool.hpp:66
Base class for tools that has to evaluate a scalar expression.
Definition SetScalar.hpp:74
Set(const std::string name, const std::string var_name, const std::string value, bool once=false)
Definition Set.cpp:42
~Set()
Definition Set.cpp:62
void setup()
Definition Set.cpp:71
void _solve()
Evaluate the expression if possible.
Definition Set.cpp:104
cl_event _execute(const std::vector< cl_event > events)
Definition Set.cpp:117
An array variable.
Definition Variable.hpp:894
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50