File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 2
2
use ndarray:: * ;
3
3
4
4
use super :: error:: * ;
5
- use lapack:: c:: Layout as FFI_Layout ;
5
+ use lapack:: c:: Layout as Layout_ ;
6
+
7
+ pub type Row = usize ;
8
+ pub type Col = usize ;
9
+
10
+ pub type Row_ = i32 ;
11
+ pub type Col_ = i32 ;
6
12
7
13
pub enum Layout {
8
- C ( ( usize , usize ) ) ,
9
- F ( ( usize , usize ) ) ,
14
+ C ( ( Row , Col ) ) ,
15
+ F ( ( Row , Col ) ) ,
10
16
}
11
17
12
18
impl Layout {
13
- pub fn size ( & self ) -> ( usize , usize ) {
19
+ pub fn size ( & self ) -> ( Row , Col ) {
14
20
match self {
15
21
& Layout :: C ( s) => s,
16
22
& Layout :: F ( s) => s,
17
23
}
18
24
}
19
25
20
- pub fn ffi_size ( & self ) -> ( i32 , i32 ) {
26
+ pub fn ffi_size ( & self ) -> ( Col_ , Row_ ) {
21
27
let ( n, m) = self . size ( ) ;
22
- ( m as i32 , n as i32 )
28
+ ( m as Col_ , n as Row_ )
23
29
}
24
30
25
- pub fn ffi_layout ( & self ) -> FFI_Layout {
31
+ pub fn ffi_layout ( & self ) -> Layout_ {
26
32
match self {
27
- & Layout :: C ( _) => FFI_Layout :: RowMajor ,
28
- & Layout :: F ( _) => FFI_Layout :: ColumnMajor ,
33
+ & Layout :: C ( _) => Layout_ :: RowMajor ,
34
+ & Layout :: F ( _) => Layout_ :: ColumnMajor ,
29
35
}
30
36
}
31
37
}
You can’t perform that action at this time.
0 commit comments