Typedef CustomGetOutputFn_t¶
Defined in File custom.h
Typedef Documentation¶
-
typedef bool (*
CustomGetOutputFn_t
)(void *output_context, const char *name, size_t shape_dim_cnt, int64_t *shape_dims, uint64_t content_byte_size, void **content)¶ Type for the CustomGetOutput callback function.
This callback function is provided in the call to ComputeExecute and is used to report the shape of an output and to get the buffers to store the output tensor values.
- Return
false if error, true if success.
- Parameters
output_context
: The output context provided in call to CustomExecute.name
: The name of the output tensor.shape_dim_cnt
: The number of dimensions in the output shape.shape_dims
: The dimensions of the output shape.content_byte_size
: The size, in bytes, of the output tensor.content
: Returns a pointer to a buffer where the output for the tensor should be copied. If nullptr and function returns true (no error), then the output should not be written and the backend should continue to the next output. If non-nullptr, the size of the buffer will be large enough to hold ‘content_byte_size’ bytes.