37 #if defined(OGDF_SYSTEM_OSX) 39 #elif defined(OGDF_SYSTEM_UNIX) || defined(__MINGW32__) 52 #if defined(_M_X64) || defined(__x86_64__) 54 #elif defined(_M_IX86) || defined(__i386__) 56 #elif defined(_M_IA64) || defined(__ia64__) 57 #define OGDF_ARCH_IA64 58 #elif defined(_M_MPPC) || defined(_M_PPC) || defined(__powerpc__) 60 #elif defined(__sparc__) 61 #define OGDF_ARCH_SPARC 62 #elif defined(__sparc_v9__) 63 #define OGDF_ARCH_SPARC_V9 131 #ifdef OGDF_SYSTEM_WINDOWS 133 return __mingw_aligned_malloc(size, 16);
135 return _aligned_malloc(size, 16);
137 #elif defined(OGDF_SYSTEM_OSX) 141 return memalign(16, size);
146 #ifdef OGDF_SYSTEM_WINDOWS 148 __mingw_aligned_free(p);
161 static long long physicalMemory();
164 static long long availablePhysicalMemory();
167 static size_t memoryUsedByProcess();
169 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__) 170 static size_t peakMemoryUsedByProcess();
185 static size_t memoryAllocatedByMemoryManager();
188 static size_t memoryInGlobalFreeListOfMemoryManager();
191 static size_t memoryInThreadFreeListOfMemoryManager();
198 static size_t memoryAllocatedByMalloc();
205 static size_t memoryInFreelistOfMalloc();
207 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__) 218 static void getHPCounter(int64_t &counter);
221 static double elapsedSeconds(
222 const int64_t &startCounter,
223 const int64_t &endCounter);
233 static int64_t usedRealTime(int64_t &t);
240 static int64_t realTime();
250 static int getProcessID();
266 return (s_cpuFeatures & (1 << static_cast<int>(feature))) != 0;
287 #if defined(OGDF_SYSTEM_WINDOWS) || defined(__CYGWIN__) unsigned int operator|=(unsigned int &i, CPUFeatureMask fm)
static int cacheLineBytes()
Returns the number of bytes in a cache line.
Streaming SIMD Extensions 3 (SSE3)
static int cacheSizeKBytes()
Returns the L2-cache size (in KBytes).
static int pageSize()
Returns the page size of virtual memory (in bytes).
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
static int64_t s_HPCounterFrequency
Frequency of high-performance counter.
Virtual Machine Extensions.
System specific functionality.
CPUFeature
Special features supported by a x86/x64 CPU.
static int s_cacheLine
Bytes in a cache line.
static unsigned int s_cpuFeatures
Supported CPU features.
static int cpuFeatures()
Returns the bit vector describing the CPU features supported on current system.
CPUFeatureMask
Bit mask for CPU features.
Supplemental Streaming SIMD Extensions 3 (SSSE3)
static int s_numberOfProcessors
Number of processors (cores) available.
Enhanced Intel SpeedStep Technology.
static int numberOfProcessors()
Returns the number of processors (cores) available on the current system.
Streaming SIMD Extensions 2 (SSE2)
Streaming SIMD Extensions 4.2 (SSE4.2)
Basic declarations, included by all source files.
static int s_cacheSize
Cache size in KBytes.
static void alignedMemoryFree(void *p)
static bool cpuSupports(CPUFeature feature)
Returns true if the CPU supports feature.
Streaming SIMD Extensions 4.1 (SSE4.1)
static int s_pageSize
The page size of virtual memory.
The namespace for all OGDF objects.
static void * alignedMemoryAlloc16(size_t size)
Streaming SIMD Extensions (SSE)
Processor supports MONITOR/MWAIT instructions.