INNER CODE UNIT · Rust

name

sonos/tract · api/ffi/src/lib.rs:1673

            let name = CStr::from_ptr(*symbols.add(i) as _)
                .to_str()
                .with_context(|| {
                    format!("failed to parse symbol name for {i}th symbol (not utf8)")
                })?
                .to_owned();
            table.push((name, *values.add(i)));
        }
        let r = (*dim).0.eval(table)?;
        *result = Box::into_raw(Box::new(TractDim(r)));
        Ok(())
    })
}

/// Try converting a Dim into an actual integer
///
/// Will fail if the Dim contains symbols.
#[unsafe(no_mangle)]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…