VTK  9.2.20230603
vtkGPUInfoList.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGPUInfoList.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef vtkGPUInfoList_h
28 #define vtkGPUInfoList_h
29 
30 #include "vtkObject.h"
31 #include "vtkRenderingCoreModule.h" // For export macro
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkGPUInfoListArray; // STL Pimpl
35 class vtkGPUInfo;
36 
37 class VTKRENDERINGCORE_EXPORT vtkGPUInfoList : public vtkObject
38 {
39 public:
40  static vtkGPUInfoList* New();
41  vtkTypeMacro(vtkGPUInfoList, vtkObject);
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
50  virtual void Probe() = 0;
51 
55  virtual bool IsProbed();
56 
61  virtual int GetNumberOfGPUs();
62 
69  virtual vtkGPUInfo* GetGPUInfo(int i);
70 
71 protected:
73 
77  ~vtkGPUInfoList() override;
79 
80  bool Probed;
82 
83 private:
84  vtkGPUInfoList(const vtkGPUInfoList&) = delete;
85  void operator=(const vtkGPUInfoList&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif
Internal class vtkGPUInfoList.
Stores the list of GPUs VRAM information.
virtual vtkGPUInfo * GetGPUInfo(int i)
Return information about GPU i.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGPUInfoListArray * Array
virtual int GetNumberOfGPUs()
Return the number of GPUs.
virtual void Probe()=0
Build the list of vtkInfoGPU if not done yet.
vtkGPUInfoList()
Default constructor.
~vtkGPUInfoList() override
Default constructor.
virtual bool IsProbed()
Tells if the operating system has been probed.
static vtkGPUInfoList * New()
Stores GPU VRAM information.
Definition: vtkGPUInfo.h:34
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract base class for most VTK objects
Definition: vtkObject.h:83