-
Notifications
You must be signed in to change notification settings - Fork 4
/
0128-rblas.rs
47 lines (39 loc) · 931 Bytes
/
0128-rblas.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*!
```rudra-poc
[target]
crate = "rblas"
version = "0.0.13"
[report]
issue_date = 2021-02-05
issue_url = "https://github.com/mikkyang/rust-blas/issues/26"
[[bugs]]
analyzer = "UnsafeDataflow"
bug_class = "UninitExposure"
bug_count = 3
rudra_report_locations = [
"src/vector/mod.rs:30:5: 38:6",
"src/math/matrix_vector.rs:21:5: 31:6",
"src/math/mat.rs:111:5: 125:6",
]
```
!*/
#![forbid(unsafe_code)]
use rblas::matrix::Matrix;
use rblas::vector::ops::Copy;
use rblas::vector::Vector;
#[derive(Clone, Debug)]
struct MyType(Box<u64>);
impl Copy for MyType {
fn copy<V, W>(src: &V, dst: &mut W)
where
V: ?Sized + Vector<Self>,
W: ?Sized + Vector<Self>,
{
}
fn copy_mat(src: &Matrix<Self>, dst: &mut Matrix<Self>) {}
}
fn main() {
let vec = vec![MyType(Box::new(42))];
let as_blas_vector = &vec as &Vector<_>;
let back_to_vec: Vec<MyType> = as_blas_vector.into();
}