43 static int64_t
time();
48 enum CPU_ExtensionX86 {
mmx,
mmx_ex,
_3d_now,
_3d_now_ex,
sse,
sse2,
sse3,
ssse3,
sse4_a,
sse4_1,
sse4_2,
xop,
avx,
aes,
fma3,
fma4 };
58 static void *
aligned_alloc(
size_t size,
size_t alignment = 16);
64 static int capture_stack_trace(
int frames_to_skip,
int max_frames,
void **out_frames,
unsigned int *out_hash =
nullptr);
74 static void sleep(
int millis);
81 static void pause(
int millis);
static bool detect_cpu_extension(CPU_ExtensionX86 ext)
static int num_cores()
Return the number of CPU cores.
CPU_ExtensionX86
Definition: system.h:48
static void aligned_free(void *ptr)
Frees aligned memory.
static std::vector< std::string > stack_frames_text(void **frames, int num_frames)
Returns the function names and lines for the specified stack frame addresses.
static void pause(int millis)
Pause for 'millis' milliseconds.
static void * aligned_alloc(size_t size, size_t alignment=16)
Allocates aligned memory.
General system helper functions.
Definition: system.h:39
static std::string exe_path()
Returns the full dirname of the executable that started this.
static int64_t time()
Get the current time (since system boot), in milliseconds.
static int64_t microseconds()
Get the current time microseconds.
static int capture_stack_trace(int frames_to_skip, int max_frames, void **out_frames, unsigned int *out_hash=nullptr)
Captures a stack back trace by walking up the stack and recording the information for each frame...
CPU_ExtensionPPC
Definition: system.h:49
static void sleep(int millis)
Sleep for 'millis' milliseconds.
Definition: Application/application.h:35