pub struct BfpExperimentArtifact<'a> {
pub m: u32,
pub k: u32,
pub n: u32,
pub xclbin: &'a [u8],
pub insts: &'a [u8],
}Expand description
A parsed, envelope-validated XBFP container.
Fields§
§m: u32§k: u32§n: u32§xclbin: &'a [u8]§insts: &'a [u8]Implementations§
Source§impl<'a> BfpExperimentArtifact<'a>
impl<'a> BfpExperimentArtifact<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, BackendError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, BackendError>
Parse and validate the container framing and the flavor-1 shape envelope. Everything is
rejected before any native resource exists; malformed framing is the guest’s mistake
(InvalidArgument), a well-formed container outside the envelope is Unsupported.
Sourcepub fn slot_bytes(&self) -> ([u64; 2], [u64; 1])
pub fn slot_bytes(&self) -> ([u64; 2], [u64; 1])
Derived slot plan — never self-declared by the artifact. Slot 0 is A (k/8 units),
slot 1 is B (k/8 units), slot 2 is C (m·n FP32 lanes).
Sourcepub fn to_precompiled_container(&self) -> Vec<u8> ⓘ
pub fn to_precompiled_container(&self) -> Vec<u8> ⓘ
Translate into the crate’s internal precompiled container, so loading reuses the one
audited executable-construction path (artifact::parse + build_executable).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for BfpExperimentArtifact<'a>
impl<'a> RefUnwindSafe for BfpExperimentArtifact<'a>
impl<'a> Send for BfpExperimentArtifact<'a>
impl<'a> Sync for BfpExperimentArtifact<'a>
impl<'a> Unpin for BfpExperimentArtifact<'a>
impl<'a> UnsafeUnpin for BfpExperimentArtifact<'a>
impl<'a> UnwindSafe for BfpExperimentArtifact<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more