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 NvpStatus {
NVP_PASS,
NVP_FAIL_ALLOC,
NVP_FAIL_NOINIT,
NVP_FAIL_FILEOP,
NVP_FAIL_NULLPTR,
NVP_FAIL_NO_SAMPLES,
NVP_FAIL_INVALID_TIME_UNIT
} NvpStatus_t;
NvpTimeUnits_t
This enum defines the time-units understood by relevant NvPlayfair library APIs.
typedef enum NvpTimeUnits {
SEC,
MSEC,
USEC,
NSEC
} NvpTimeUnits_t;
NvpPerfStats_t
This data-structure is used to record various statistics about the respective latency data.
typedef struct NvpPerfStats {
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 which can be used to make a benchmark repeat its compute loop at a given frequency.
typedef struct NvpRateLimitInfo
{
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 NvpPerfData
{
uint64_t sampleNumber;
uint64_t *timestamps;
uint64_t *latencies;
uint32_t maxSamples;
bool initialized;
char *filename;
} NvpPerfData_t;