|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
39 #if defined(OGDF_SYSTEM_OSX)
41 #elif defined(OGDF_SYSTEM_UNIX) || defined(__MINGW32__)
54 #if defined(_M_X64) || defined(__x86_64__)
55 # define OGDF_ARCH_X64
56 #elif defined(_M_IX86) || defined(__i386__)
57 # define OGDF_ARCH_X86
58 #elif defined(_M_IA64) || defined(__ia64__)
59 # define OGDF_ARCH_IA64
60 #elif defined(_M_MPPC) || defined(_M_PPC) || defined(__powerpc__)
61 # define OGDF_ARCH_PPC
62 #elif defined(__sparc__)
63 # define OGDF_ARCH_SPARC
64 #elif defined(__sparc_v9__)
65 # define OGDF_ARCH_SPARC_V9
132 #ifdef OGDF_SYSTEM_WINDOWS
134 return __mingw_aligned_malloc(size, 16);
136 return _aligned_malloc(size, 16);
138 #elif defined(OGDF_SYSTEM_OSX)
142 return memalign(16, size);
147 #ifdef OGDF_SYSTEM_WINDOWS
149 __mingw_aligned_free(p);
162 static long long physicalMemory();
165 static long long availablePhysicalMemory();
168 static size_t memoryUsedByProcess();
170 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__)
171 static size_t peakMemoryUsedByProcess();
186 static size_t memoryAllocatedByMemoryManager();
189 static size_t memoryInGlobalFreeListOfMemoryManager();
192 static size_t memoryInThreadFreeListOfMemoryManager();
199 static size_t memoryAllocatedByMalloc();
206 static size_t memoryInFreelistOfMalloc();
208 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__)
219 static void getHPCounter(int64_t& counter);
222 static double elapsedSeconds(
const int64_t& startCounter,
const int64_t& endCounter);
232 static int64_t usedRealTime(int64_t& t);
239 static int64_t realTime();
249 static int getProcessID();
265 return (s_cpuFeatures & (1 <<
static_cast<int>(feature))) != 0;
286 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__)
The namespace for all OGDF objects.
static int s_numberOfProcessors
Number of processors (cores) available.
@ MMX
Intel MMX Technology.
@ SSE4_2
Streaming SIMD Extensions 4.2 (SSE4.2)
CPUFeatureMask
Bit mask for CPU features.
@ SSSE3
Supplemental Streaming SIMD Extensions 3 (SSSE3)
@ SSE4_1
Streaming SIMD Extensions 4.1 (SSE4.1)
@ SSSE3
Supplemental Streaming SIMD Extensions 3 (SSSE3)
@ EST
Enhanced Intel SpeedStep Technology.
@ SSE3
Streaming SIMD Extensions 3 (SSE3)
@ SSE4_2
Streaming SIMD Extensions 4.2 (SSE4.2)
@ SMX
Safer Mode Extensions.
@ VMX
Virtual Machine Extensions.
@ MONITOR
Processor supports MONITOR/MWAIT instructions.
static void alignedMemoryFree(void *p)
static unsigned int s_cpuFeatures
Supported CPU features.
@ SSE4_1
Streaming SIMD Extensions 4.1 (SSE4.1)
@ SSE3
Streaming SIMD Extensions 3 (SSE3)
unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
CPUFeature
Special features supported by a x86/x64 CPU.
static int cacheSizeKBytes()
Returns the L2-cache size (in KBytes).
static int pageSize()
Returns the page size of virtual memory (in bytes).
static void * alignedMemoryAlloc16(size_t size)
@ SSE2
Streaming SIMD Extensions 2 (SSE2)
@ SMX
Safer Mode Extensions.
static int64_t s_HPCounterFrequency
Frequency of high-performance counter.
static int cacheLineBytes()
Returns the number of bytes in a cache line.
@ VMX
Virtual Machine Extensions.
static int s_pageSize
The page size of virtual memory.
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
@ SSE
Streaming SIMD Extensions (SSE)
@ SSE2
Streaming SIMD Extensions 2 (SSE2)
@ MMX
Intel MMX Technology.
System specific functionality.
static bool cpuSupports(CPUFeature feature)
Returns true if the CPU supports feature.
static int s_cacheSize
Cache size in KBytes.
static int s_cacheLine
Bytes in a cache line.
@ SSE
Streaming SIMD Extensions (SSE)
static int cpuFeatures()
Returns the bit vector describing the CPU features supported on current system.
@ EST
Enhanced Intel SpeedStep Technology.
static int numberOfProcessors()
Returns the number of processors (cores) available on the current system.
@ MONITOR
Processor supports MONITOR/MWAIT instructions.