vtkPVMemoryUseInformation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkPVMemoryUseInformation_h
11 #define vtkPVMemoryUseInformation_h
12 
13 #include "vtkPVInformation.h"
14 
15 #include <vector> // needed for std::vector
16 using std::vector;
17 
19 
21 {
22 public:
25  void PrintSelf(ostream& os, vtkIndent indent) override;
26 
30  void CopyFromObject(vtkObject*) override;
31 
35  void AddInformation(vtkPVInformation*) override;
36 
38 
41  void CopyToStream(vtkClientServerStream*) override;
42  void CopyFromStream(const vtkClientServerStream*) override;
44 
48  size_t GetSize() { return this->MemInfos.size(); }
49  int GetProcessType(size_t i) { return this->MemInfos[i].ProcessType; }
50  int GetRank(size_t i) { return this->MemInfos[i].Rank; }
51  long long GetProcMemoryUse(size_t i) { return this->MemInfos[i].ProcMemUse; }
52  long long GetHostMemoryUse(size_t i) { return this->MemInfos[i].HostMemUse; }
53 
54 protected:
56  ~vtkPVMemoryUseInformation() override;
57 
58 private:
59  class MemInfo
60  {
61  public:
62  MemInfo()
63  : ProcessType(-1)
64  , Rank(0)
65  , ProcMemUse(0)
66  , HostMemUse(0)
67  {
68  }
69  void Print();
70 
71  int ProcessType;
72  int Rank;
73  long long ProcMemUse;
74  long long HostMemUse;
75  };
76  vector<MemInfo> MemInfos;
77 
79  void operator=(const vtkPVMemoryUseInformation&) = delete;
80 };
81 
82 #endif
virtual void CopyFromStream(const vtkClientServerStream *)
Manage a serialized version of the information.
void PrintSelf(ostream &os, vtkIndent indent) override
A vtkClientServerStream serializable container for a single process&#39;s instantaneous memory usage...
Store messages for the interpreter.
#define VTKREMOTINGCORE_EXPORT
virtual void AddInformation(vtkPVInformation *)
Merge another information object.
virtual void CopyToStream(vtkClientServerStream *)=0
Manage a serialized version of the information.
virtual void CopyFromObject(vtkObject *)
Transfer information about a single object into this object.
static vtkObject * New()
size_t GetSize()
access the managed information.
Superclass for information objects.