Skip to main content

flint_sys/
d_mat.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use crate::deps::*;
4use crate::flint::*;
5
6
7#[repr(C)]
8pub struct d_mat_struct {
9    pub entries: *mut f64,
10    pub r: slong,
11    pub c: slong,
12    pub rows: *mut *mut f64,
13}
14#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15const _: () = {
16    ["Size of d_mat_struct"][::std::mem::size_of::<d_mat_struct>() - 32usize];
17    ["Alignment of d_mat_struct"][::std::mem::align_of::<d_mat_struct>() - 8usize];
18    ["Offset of field: d_mat_struct::entries"]
19        [::std::mem::offset_of!(d_mat_struct, entries) - 0usize];
20    ["Offset of field: d_mat_struct::r"][::std::mem::offset_of!(d_mat_struct, r) - 8usize];
21    ["Offset of field: d_mat_struct::c"][::std::mem::offset_of!(d_mat_struct, c) - 16usize];
22    ["Offset of field: d_mat_struct::rows"][::std::mem::offset_of!(d_mat_struct, rows) - 24usize];
23};
24impl Default for d_mat_struct {
25    fn default() -> Self {
26        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
27        unsafe {
28            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
29            s.assume_init()
30        }
31    }
32}
33pub type d_mat_t = [d_mat_struct; 1usize];
34extern "C" {
35    #[link_name = "d_mat_nrows__extern"]
36    pub fn d_mat_nrows(mat: *const d_mat_struct) -> slong;
37    #[link_name = "d_mat_ncols__extern"]
38    pub fn d_mat_ncols(mat: *const d_mat_struct) -> slong;
39    pub fn d_mat_init(mat: *mut d_mat_struct, rows: slong, cols: slong);
40    #[link_name = "d_mat_swap_entrywise__extern"]
41    pub fn d_mat_swap_entrywise(mat1: *mut d_mat_struct, mat2: *mut d_mat_struct);
42    pub fn d_mat_set(mat1: *mut d_mat_struct, mat2: *const d_mat_struct);
43    pub fn d_mat_clear(mat: *mut d_mat_struct);
44    pub fn d_mat_equal(mat1: *const d_mat_struct, mat2: *const d_mat_struct) -> libc::c_int;
45    pub fn d_mat_approx_equal(
46        mat1: *const d_mat_struct,
47        mat2: *const d_mat_struct,
48        eps: f64,
49    ) -> libc::c_int;
50    #[link_name = "d_mat_is_square__extern"]
51    pub fn d_mat_is_square(mat: *const d_mat_struct) -> libc::c_int;
52    pub fn d_mat_zero(mat: *mut d_mat_struct);
53    pub fn d_mat_print(mat: *const d_mat_struct);
54    pub fn d_mat_randtest(
55        mat: *mut d_mat_struct,
56        state: *mut flint_rand_struct,
57        minexp: slong,
58        maxexp: slong,
59    );
60    pub fn d_mat_transpose(B: *mut d_mat_struct, A: *const d_mat_struct);
61    pub fn d_mat_mul_classical(
62        C: *mut d_mat_struct,
63        A: *const d_mat_struct,
64        B: *const d_mat_struct,
65    );
66}