API Documentation
This section contains documentation about the data-structures, macros, and public interfaces of NvPlayfair benchmarking library.
Data Structures
NvpStatus_t
This enum defines the possible return status of the NvPlayfair library APIs.
typedef enum {
NVP_PASS,
NVP_FAIL_ALLOC,
NVP_FAIL_NOINIT,
NVP_FAIL_FILEOP,
NVP_FAIL_NULLPTR,
NVP_FAIL_NO_SAMPLES,
NVP_FAIL_VERSION_MISMATCH,
NVP_FAIL_INVALID_TIME_UNIT,
NVP_FAIL_INVALID_LOG_BACKEND,
NVP_FAIL_SAMPLE_COUNT_MISMATCH
} NvpStatus_t;
NvpTimeUnits_t
This enum defines the time-units understood by relevant NvPlayfair library APIs.
typedef enum {
SEC,
MSEC,
USEC,
NSEC
} NvpTimeUnits_t;
NvpLogBackend_t
This enum defines the backend, which can be the receiver of output from relevant library APIs.typedef enum {
CONSOLE,
NVOS
} NvpLogBackend_t;
NvpPerfStats_t
This data-structure is used to record various statistics about the respective latency data.
typedef struct {
double min;
double max;
double mean;
double pct99;
double stdev;
uint32_t count;
} NvpPerfStats_t;
NvpRateLimitInfo_t
This data-structure defines a rate-limit object that can be used to make a benchmark repeat its compute loop at a given frequency.
typedef struct {
uint32_t periodUs;
uint32_t periodNumber;
uint64_t periodicExecStartTimeUs;
} NvpRateLimitInfo_t;
NvpPerfData_t
This is the main data-structure provided by the NvPlayfair library. It can be configured as a benchmarking data object that can be used to store all the latency data gathered for a particular metric by a benchmark.
typedef struct {
uint64_t sampleNumber;
uint64_t *timestamps;
uint64_t *latencies;
uint32_t maxSamples;
bool initialized;
char *filename;
} NvpPerfData_t;
NvpLibVersion_t
This data structure is used to capture the version information of the library.
typedef struct {
uint64_t major;
uint64_t minor;
} NvpLibVersion_t;