AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
Performance.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
23
24#ifndef PERFORMANCE_H_INCLUDED
25#define PERFORMANCE_H_INCLUDED
26
27#include <fstream>
28#include "Report.hpp"
29
30namespace Aqua {
31namespace CalcServer {
32namespace Reports {
33
45{
46 public:
62 Performance(const std::string tool_name,
63 const std::string output_file = "");
64
68
71 void setup();
72
77 void print();
78
79 protected:
84
89 cl_event _execute(const std::vector<cl_event> events);
90
91 private:
95 std::ofstream writer();
96
98 std::string _color;
100 bool _bold;
102 std::string _output_file;
104 unsigned int _output_file_index;
105
107 cl_ulong _timer;
108};
109
110}
111}
112} // namespace
113
114#endif // PERFORMANCE_H_INCLUDED
Runtime output base class. (See Aqua::CalcServer::Reports::Report for details)
size_t computeAllocatedMemory()
Get the allocated memory.
Definition Performance.cpp:187
~Performance()
Destructor.
Definition Performance.cpp:53
void setup()
Initialize the tool.
Definition Performance.cpp:56
void print()
Definition Performance.cpp:95
cl_event _execute(const std::vector< cl_event > events)
Definition Performance.cpp:234
Performance(const std::string tool_name, const std::string output_file="")
Constructor.
Definition Performance.cpp:44
Runtime outputs base class.
Definition Report.hpp:50
Runtime outputs name space.
Definition Dump.cpp:34
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50