Skip to main content

IlpRegistry

Struct IlpRegistry 

Source
pub struct IlpRegistry { /* private fields */ }
Expand description

Registry for ILP tensor masks.

Implementations§

Source§

impl IlpRegistry

Source

pub fn new() -> Self

Create an empty ILP registry.

Source

pub fn clear(&mut self)

Clear all registered masks, releasing GPU buffers.

Source

pub fn insert_mask( &mut self, name: String, hard: CudaBuffer, soft: CudaBuffer, schema_size: usize, )

Register a dense ILP mask (hard + soft weight buffers).

Source

pub fn insert_mask_from_sparse( &mut self, name: String, schema_size: usize, active_ijk: &[(u32, u32, u32)], active_soft: &[f32], budget: usize, ) -> Result<(), XlogError>

Insert a mask built from sparse candidate data.

Performs deterministic top-k ranking (desc soft value, then lower index) and stores the selected (i,j,k) entries directly — no dense buffer.

Source

pub fn insert_selected_mask( &mut self, name: String, schema_size: usize, active_entries: &[(u32, u32, u32)], )

Insert an already-selected sparse mask, preserving caller order exactly.

Source

pub fn insert_selected_mask_device( &mut self, name: String, schema_size: usize, candidate_order: Vec<(u32, u32, u32)>, active_flags: CudaBuffer, selected_count: usize, )

Insert a device-resident sparse mask with active flags on GPU.

Source

pub fn get_mask(&self, name: &str) -> Option<&IlpMask>

Look up a registered mask by name.

Source

pub fn has_sparse_device_mask(&self) -> bool

Returns true if any registered mask uses the sparse-device representation.

Trait Implementations§

Source§

impl Default for IlpRegistry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,