CustusX  22.04-rc3
An IGT application
cxOpenCLPrinter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXOPENCLPRINTER_H_
13 #define CXOPENCLPRINTER_H_
14 
15 #include "cxResourceExport.h"
16 
17 #include <string>
18 #include "OpenCLManager.hpp"
19 class QString;
20 
21 namespace cx
22 {
33 class cxResource_EXPORT OpenCLPrinter
34 {
35 public:
36  static void printPlatformAndDeviceInfo();
37  static void printPlatformInfo(cl::Platform platform);
38  static void printDeviceInfo(cl::Device device, bool verbose = false);
39  static void printContextInfo(cl::Context context);
40  static void printProgramInfo(cl::Program program);
41  static void printProgramSource(cl::Program program);
42  static void printKernelInfo(cl::Kernel kernel);
43  static void printMemoryInfo(cl::Memory memory);
44 
45 private:
46  static void printStringList(std::string list, std::string separator = " ");
47  static void print(std::string name, std::string value, int indents = 1);
48  static void print(std::string name, int value, int indents = 1);
49  static std::string const getIndentation(unsigned int numberOfIndents);
50 };
51 } //namespace cx
52 #endif /* CXOPENCLPRINTER_H_ */
void print(QString header, QRect r)
Utilities for printing information about OpenCL.
Namespace for all CustusX production code.