MPriorityOverride.h
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Priority override object
4  **
5  ** Name : MPriorityOverride.h
6  ** Author : Leonardo Bernardini
7 ** Version : Alpha 9.0 Wed May 17th 2017
8  **
9  ** Copyright 2000-2017, Virtual Vertex
10  ** All Rights Reserved.
11  **
12  ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13  ** The contents of this file may not be disclosed to third parties, copied
14  ** or duplicated in any form, in whole or in part, without the prior written
15  ** permission of the author.
16  **
17  *****************************************************************************/
18 #ifndef MPRIORITYOVERRIDE_H
19 #define MPRIORITYOVERRIDE_H
20 
21 
22 #ifdef WIN32
23 // Windows definitions
24 #ifdef MCLIENTLIB_EXPORTS
25 #define MCLIENTLIB_API __declspec(dllexport)
26 #else
27 #define MCLIENTLIB_API __declspec(dllimport)
28 #endif
29 #else
30 
31 #ifndef MCLIENTLIB_EXPORTS
32 #ifdef LINUX
33 #define MCLIENTLIB_API
34 #else
35 #define MCLIENTLIB_API
36 #endif
37 #else
38 #define MCLIENTLIB_API
39 #endif
40 #endif
41 
42 #if defined(_WIN32)
43 #pragma warning(disable: 4251)
44 #endif // _WIN32
45 
46 #include <string>
47 #include <vector>
48 
49 namespace MClientLib {
50 
61  class MCLIENTLIB_API MPriorityOverride {
62 
63  private:
64  int instanceId;
65  int instancePriority;
66  int instanceProcessPriority;
67  unsigned long long affinityMask;
68  unsigned long long gpusAffinityMask;
69 
70  public:
71 
73 
74  int getInstanceId();
75  int getInstancePriority();
76  int getInstanceProcessPriority();
77  unsigned long long getAffinityMask();
78  unsigned long long getGpusAffinityMask();
79 
80  void setInstanceId(int);
81  void setInstancePriority(int);
82  void setInstanceProcessPriority(int);
83  void setAffinityMask(unsigned long long);
84  void setGpusAffinityMask(unsigned long long);
86  static std::vector<MPriorityOverride> Unmarshall(const std::string& );
87  static std::string Marshall(const std::vector<MPriorityOverride>& list);
89  };
90 
92 }
93 
94 #endif
Class holding a priority override rule.