Function Method_set_input

Source
pub unsafe extern "C" fn Method_set_input(
    this: *mut Method,
    input_evalue: *const EValue,
    input_idx: usize,
) -> Error
Expand description

Sets the internal input value to be equivalent to the to the provided value.

@param[in] input_evalue The evalue to copy into the method input. If the evalue is a tensor, the data is copied in most cases, so the tensor passed in here does not always need to outlive this call. But there is a case where the Method will keep a pointer to the tensor’s data. Based on the memory plan of the method, the inputs may not have buffer space pre-allocated for them. In this case the executor will alias the memory of the tensors provided as inputs here rather then deepcopy the input into the memory planned arena.

@param[in] input_idx Zero-based index of the input to set. Must be less than the value returned by inputs_size().

@returns Error::Ok on success, non-Ok on failure.