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 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(
223 const int64_t &startCounter,
224 const int64_t &endCounter);
234 static int64_t usedRealTime(int64_t &t);
241 static int64_t realTime();
251 static int getProcessID();
267 return (s_cpuFeatures & (1 << static_cast<int>(feature))) != 0;
288 #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.