tfe_tensor_f64_data

Function tfe_tensor_f64_data 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tfe_tensor_f64_data( _tensor: *const TfeTensorF64, ) -> *const f64
Expand description

Return a pointer to the tensor’s raw data buffer.

The pointer is valid until tfe_tensor_f64_release is called on the tensor.

§Safety

tensor must be a valid, non-null tensor pointer. The returned pointer must not be used after tfe_tensor_f64_release(tensor).

§Examples (C)

const double *ptr = tfe_tensor_f64_data(t);
size_t n = tfe_tensor_f64_len(t);
for (size_t i = 0; i < n; i++) {
    printf("%f ", ptr[i]);
}