Typedef TRITONSERVER_InferenceResponseCompleteFn_t

Typedef Documentation

typedef void (*TRITONSERVER_InferenceResponseCompleteFn_t)(TRITONSERVER_InferenceResponse *response, const uint32_t flags, void *userp)

Type for callback function indicating that an inference response has completed.

The callback function takes ownership of the TRITONSERVER_InferenceResponse object. The ‘userp’ data is the data provided as ‘response_userp’ in the call to TRITONSERVER_InferenceRequestSetResponseCallback.

One or more flags may be specified when the callback is invoked:

  • TRITONSERVER_RESPONSE_COMPLETE_FINAL: Indicates that no more responses will be generated for a given request (more specifically, that no more responses will be generated for the inference request that set this callback and ‘userp’). When this flag is set ‘response’ may be a response object or may be nullptr. If ‘response’ is not nullptr, then ‘response’ is the last response that Triton will produce for the request. If ‘response’ is nullptr then Triton is indicating that no more responses will be produced for the request.