Perception Tool Kit (PTK) API Guide
core.h File Reference
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PTK_CRT
 

Macros

#define PTK_CORE_H
 
#define PTK_assert(x)
 

Functions

void PTK_init (PTK_CRT *crt)
 This function initializes the library with the given list of function pointers to functions that provide the C runtime library functions. The most basic requirement is that exit be available, but the remaining members are optional. More...
 
void PTK_exit (int status)
 This performs an immediate exit of the entire task, which typically will also kill all other threads running. It should only be used when an unrecoverable error has been detected. The status code may or may not be useful on all systems, but it is required per the C standard library specification. More...
 
void PTK_printf (const char *fmt,...)
 If printf was configured, this formats the given string and prints it appropriately. Otherwise, it does nothing. More...
 
uint64_t PTK_getTime ()
 If available, this obtains the real time in microseconds since a some reference point in the past. This reference point may not change during a single program's execution, but it may be reset, e.g. to 0 or another constant, whenever the program is restarted. More...
 

Macro Definition Documentation

◆ PTK_CORE_H

#define PTK_CORE_H

◆ PTK_assert

#define PTK_assert (   x)
Value:
do { \
if (!(x)) { \
PTK_printf("Assertion `" #x "` failed on line %d in %s\n", __LINE__, __FILE__); \
PTK_exit(1); \
} } while(0)