It provides a global allocator, error callback, and profiler API.
A global allocator with interface
may be set by the user with the function
and accessed using
An internal, default allocator is used if the user does not set their own, or if NULL is passed into NvBlastGlobalSetAllocatorCallback.
This allocator is used by NvBlastTk, as well as any extension that allocates memory. In addition, utility macros are provided such as NVBLAST_ALLOC, NVBLAST_FREE, NVBLAST_NEW, and NVBLAST_DELETE.
A global error message callback with interface
may be set by the user with the function
and accessed using
An internal, default error callback is used if the user does not set their own, or if NULL is passed into NvBlastGlobalSetErrorCallback.
This error callback is used by NvBlastTk, as well as many extensions. In addition, utility macros are provided such as NVBLAST_LOG_ERROR and NVBLAST_LOG_WARNING.
Finally, a function with signature given by NvBlastLog is provided which uses the global error callback,
This function may be passed into any NvBlast™ function's log parameter.
BlastTk contains many profiling zones which use the global profiler which can be accessed in this library. The user may implement the interface
and pass it to the globals library using
A NULL pointer may be passed in, disabling profiling. Profiler features are only active in checked, debug and profile builds.
The granularity of events reported can be selected with