tfe_tropical_einsum_maxmul_f64

Function tfe_tropical_einsum_maxmul_f64 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn tfe_tropical_einsum_maxmul_f64( subscripts: *const c_char, operands: *const *const TfeTensorF64, num_operands: usize, status: *mut tfe_status_t, ) -> *mut TfeTensorF64
Expand description

Execute tropical einsum under MaxMul algebra (⊕=max, ⊗=×).

Accepts standard TfeTensorF64 handles and interprets them as tropical scalars internally. Returns a new tensor that the caller must release with tfe_tensor_f64_release.

§Safety

  • subscripts must be a valid null-terminated C string.
  • operands must point to an array of num_operands valid tensor pointers.
  • status must be a valid, non-null pointer.

§Examples (C)

const tfe_tensor_f64 *ops[] = {a, b};
tfe_status_t status;
tfe_tensor_f64 *c = tfe_tropical_einsum_maxmul_f64("ij,jk->ik", ops, 2, &status);
tfe_tensor_f64_release(c);