Typedef TRTSERVER_ResponseAllocatorReleaseFn_t

Typedef Documentation

typedef TRTSERVER_Error *(*TRTSERVER_ResponseAllocatorReleaseFn_t)(TRTSERVER_ResponseAllocator *allocator, void *buffer, void *buffer_userp, size_t byte_size, TRTSERVER_Memory_Type memory_type, int64_t memory_type_id)

Type for function that is called when the server no longer holds any reference to a buffer allocated by TRTSERVER_ResponseAllocatorAllocFn_t.

In practice this function is called when the response object associated with the buffer is deleted by TRTSERVER_InferenceResponseDelete.

The ‘buffer’ and ‘buffer_userp’ arguments equal those returned by TRTSERVER_ResponseAllocatorAllocFn_t and ‘byte_size’, ‘memory_type’ and ‘memory_type_id’ equal the values passed to TRTSERVER_ResponseAllocatorAllocFn_t.

Return a TRTSERVER_Error object on failure, return nullptr on success.