-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: Documentation * WIP: New documentation * Fixed cargo format error
- Loading branch information
Showing
35 changed files
with
876 additions
and
588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
//! Public interface to Blis routines. | ||
pub mod gemm; | ||
pub mod threading; | ||
pub mod types; | ||
|
||
use cauchy::Scalar; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,16 @@ | ||
//! Interface to Blis types | ||
use crate::raw; | ||
|
||
/// Transposition Mode. | ||
#[derive(Clone, Copy, PartialEq)] | ||
#[repr(u32)] | ||
pub enum TransMode { | ||
/// Complex conjugate of matrix. | ||
ConjNoTrans = raw::trans_t_BLIS_CONJ_NO_TRANSPOSE, | ||
/// No modification of matrix. | ||
NoTrans = raw::trans_t_BLIS_NO_TRANSPOSE, | ||
/// Transposition of matrix. | ||
Trans = raw::trans_t_BLIS_TRANSPOSE, | ||
/// Conjugate transpose of matrix. | ||
ConjTrans = raw::trans_t_BLIS_CONJ_TRANSPOSE, | ||
} | ||
|
||
// pub trait BlisIdentifier { | ||
// const ID: u32; | ||
// } | ||
|
||
// impl BlisIdentifier for f32 { | ||
// const ID: u32 = raw::num_t_BLIS_FLOAT; | ||
// } | ||
|
||
// impl BlisIdentifier for f64 { | ||
// const ID: u32 = raw::num_t_BLIS_DOUBLE; | ||
// } | ||
|
||
// impl BlisIdentifier for c32 { | ||
// const ID: u32 = raw::num_t_BLIS_SCOMPLEX; | ||
// } | ||
|
||
// impl BlisIdentifier for c64 { | ||
// const ID: u32 = raw::num_t_BLIS_DCOMPLEX; | ||
// } | ||
|
||
// pub struct BlisObject { | ||
// obj: raw::obj_t, | ||
// requires_free: bool, | ||
// } | ||
|
||
// impl Drop for BlisObject { | ||
// fn drop(&mut self) { | ||
// if self.requires_free { | ||
// unsafe { | ||
// crate::raw::bli_obj_free(&mut self.obj); | ||
// } | ||
// } | ||
// } | ||
// } | ||
|
||
// impl Default for raw::obj_t { | ||
// fn default() -> Self { | ||
// Self { | ||
// root: std::ptr::null_mut(), | ||
// off: [0, 0], | ||
// dim: [0, 0], | ||
// diag_off: 0, | ||
// info: 0, | ||
// info2: 0, | ||
// elem_size: 0, | ||
// buffer: std::ptr::null_mut(), | ||
// rs: 0, | ||
// cs: 0, | ||
// is: 0, | ||
// scalar: raw::dcomplex { | ||
// real: 0.0, | ||
// imag: 0.0, | ||
// }, | ||
// m_padded: 0, | ||
// n_padded: 0, | ||
// ps: 0, | ||
// pd: 0, | ||
// m_panel: 0, | ||
// n_panel: 0, | ||
// pack_fn: None, | ||
// pack_params: std::ptr::null_mut(), | ||
// ker_fn: None, | ||
// ker_params: std::ptr::null_mut(), | ||
// } | ||
// } | ||
// } | ||
|
||
// impl BlisObject { | ||
// pub fn from_slice<T: Scalar + BlisIdentifier>( | ||
// data: &mut [T], | ||
// stride: (usize, usize), | ||
// shape: (usize, usize), | ||
// ) -> Self { | ||
// // The maximum index that still needs to fit in the data slice. | ||
// let max_index = stride.0 * (shape.0 - 1) + stride.1 * (shape.1 - 1); | ||
// assert_eq!( | ||
// data.len(), | ||
// 1 + max_index, | ||
// "Length of slice is {} but expected {}", | ||
// data.len(), | ||
// 1 + max_index | ||
// ); | ||
|
||
// let mut obj = raw::obj_t::default(); | ||
|
||
// unsafe { | ||
// raw::bli_obj_create_with_attached_buffer( | ||
// T::ID, | ||
// shape.0 as i64, | ||
// shape.1 as i64, | ||
// data.as_mut_ptr() as *mut std::ffi::c_void, | ||
// stride.0 as i64, | ||
// stride.1 as i64, | ||
// &mut obj, | ||
// ) | ||
|
||
// }; | ||
|
||
// BlisObject { | ||
// obj, | ||
// requires_free: false, | ||
// } | ||
// } | ||
|
||
// pub fn from_scalar<T: Scalar + BlisIdentifier>(scalar: T) -> Self { | ||
// let mut obj = raw::obj_t::default(); | ||
// unsafe { raw::bli_obj_create_1x1(T::ID, &mut obj) }; | ||
|
||
// unsafe { | ||
// raw::bli_setsc( | ||
// num::cast::<T::Real, f64>(scalar.re()).unwrap(), | ||
// num::cast::<T::Real, f64>(scalar.im()).unwrap(), | ||
// &obj, | ||
// ) | ||
// }; | ||
|
||
// Self { | ||
// obj, | ||
// requires_free: true, | ||
// } | ||
// } | ||
|
||
// pub fn get_obj(&self) -> &raw::obj_t { | ||
// &self.obj | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
|
||
pub mod interface; | ||
pub mod raw; | ||
pub mod threading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
//! Common RLST data structures | ||
//! Common Rlst data structures | ||
#![cfg_attr(feature = "strict", deny(warnings))] | ||
|
||
pub mod traits; | ||
pub mod types; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.