pub struct BlrTensor {
pub model: Arc<CmfModel>,
pub idx: usize,
pub rows: usize,
pub cols: usize,
pub core: BlrCore,
}Expand description
A mapped blr tensor: the model keeps the bytes, core the parsed scales.
Fields§
§model: Arc<CmfModel>§idx: usize§rows: usize§cols: usize§core: BlrCoreImplementations§
Source§impl BlrTensor
impl BlrTensor
pub fn from_model(model: &Arc<CmfModel>, idx: usize) -> Result<Self, String>
pub fn bytes(&self) -> &[u8] ⓘ
pub fn name(&self) -> &str
pub fn matvec(&self, x: &[f32], out: &mut [f32], pool: Option<&Pool>)
pub fn matmat(&self, xs: &[f32], b: usize, out: &mut [f32], pool: Option<&Pool>)
pub fn row_f32(&self, i: usize, dst: &mut [f32])
pub fn add_col_scaled(&self, c: usize, w: f32, out: &mut [f32])
Auto Trait Implementations§
impl Freeze for BlrTensor
impl RefUnwindSafe for BlrTensor
impl Send for BlrTensor
impl Sync for BlrTensor
impl Unpin for BlrTensor
impl UnsafeUnpin for BlrTensor
impl UnwindSafe for BlrTensor
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