HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SYS_Platform.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * Authored by:
7  * Side Effects Software Inc.
8  *
9  * NAME: SYS_Platform.h (SYS Library, C++)
10  *
11  * COMMENTS: Functions related to OS/Machine specific
12  * information.
13  */
14 
15 #ifndef __SYS_Platform_h__
16 #define __SYS_Platform_h__
17 
18 #include "SYS_API.h"
19 #include "SYS_Types.h"
20 #include <string>
21 
22 /// Get processor information about the CPU that Houdini is running on.
23 /// Please see SYS_ProcessorDefines.h for CPU information
24 SYS_API extern void SYSgetProcessor(int &majortype, int &flags);
25 
26 /// Determine if we satisfy minimum processor requirements
27 SYS_API extern bool SYShasMinimumProcessor();
28 
29 /// Returns the number of processors available for the process, taking into
30 /// account affinity masks.
31 ///
32 /// NOTE: Unless you have a good reason to call this directly, you probably
33 /// want to call UT_Thread::getNumProcessors(), instead, because that
34 /// takes into account users opting to limit the thread count,
35 /// and caches the number for fast querying.
36 SYS_API extern int SYSgetProcessorCount();
37 
38 #if defined(WIN32)
39 /// These are intended for private use by UT_Thread
40 /// @{
41 struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX;
42 SYS_API extern const struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *SYSgetProcessorGroupInfo();
43 struct _GROUP_AFFINITY;
44 typedef int (__stdcall *SetThreadGroupAffinityFunc)(void*, const struct _GROUP_AFFINITY *, struct _GROUP_AFFINITY*);
45 SYS_API extern SetThreadGroupAffinityFunc SYSgetSetThreadGroupAffinity();
46 /// @}
47 #endif
48 
49 /// Find the name of the operating system that Houdini was compiled for
50 SYS_API extern const char *SYSgetOsProc();
51 
52 /// Return a "nice" name of the current operating system
54 
55 /// Find the exact OS, 32-bit or 64-bit build, compiler version
56 SYS_API extern const char *SYSgetPlatformSpec();
57 
58 /// Returns the amount of installed memory (not VM).
60 
61 /// Returns a char* representing the manufacturerer's name
63 
64 /// Just a handy, quick, and fast function to test the platform for which
65 /// the code is being compiled.
66 SYS_API extern bool SYSisMBSD();
67 SYS_API extern bool SYSisLinux();
68 SYS_API extern bool SYSisWindows();
69 
70 /// Return the MAC addresses for all the deviced on this system. The caller is
71 /// responsible to delete [] the addresses if num_addresses > 0.
72 SYS_API extern void SYSgetMACAddresses(
73  unsigned char *&addresses,
74  int &num_addresses);
75 
76 /// Return a single MAC address that we treat as the main MAC address for this
77 /// machine. Returns false if no MAC address could be determined.
78 SYS_API extern bool SYSgetMACAddress(unsigned char mac_address[6]);
79 
80 // Return the MAC address giving the same value returned by Python's
81 // uuid.getnode().
82 SYS_API extern bool SYSgetMACAddressAsInteger(int64 &mac_address);
83 
84 #endif // __UT_SysSpecific_h__
SYS_API const char * SYSgetPlatformSpec()
Find the exact OS, 32-bit or 64-bit build, compiler version.
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
Definition: glew.h:2864
int64 exint
Definition: SYS_Types.h:125
SYS_API std::string SYSgetCPUBrandString()
Returns a char* representing the manufacturerer's name.
SYS_API std::string SYSgetRuntimeOSLabel()
Return a "nice" name of the current operating system.
SYS_API bool SYSisWindows()
SYS_API bool SYSisLinux()
SYS_API bool SYSisMBSD()
long long int64
Definition: SYS_Types.h:116
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
SYS_API void SYSgetMACAddresses(unsigned char *&addresses, int &num_addresses)
SYS_API const char * SYSgetOsProc()
Find the name of the operating system that Houdini was compiled for.
SYS_API bool SYSgetMACAddressAsInteger(int64 &mac_address)
SYS_API bool SYSgetMACAddress(unsigned char mac_address[6])
GLsizei const GLchar *const * string
Definition: glew.h:1844
SYS_API exint SYSgetMemorySize()
Returns the amount of installed memory (not VM).
SYS_API bool SYShasMinimumProcessor()
Determine if we satisfy minimum processor requirements.
SYS_API int SYSgetProcessorCount()
#define SYS_API
Definition: SYS_API.h:11
SYS_API void SYSgetProcessor(int &majortype, int &flags)