Skip to main content

flint_sys/
limb_types.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use crate::deps::*;
4
5
6pub const FLINT_MAX_FACTORS_IN_LIMB: u32 = 15;
7#[repr(C)]
8pub struct n_factor_t {
9    pub num: libc::c_int,
10    pub exp: [libc::c_int; 15usize],
11    pub p: [ulong; 15usize],
12}
13#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14const _: () = {
15    ["Size of n_factor_t"][::std::mem::size_of::<n_factor_t>() - 184usize];
16    ["Alignment of n_factor_t"][::std::mem::align_of::<n_factor_t>() - 8usize];
17    ["Offset of field: n_factor_t::num"][::std::mem::offset_of!(n_factor_t, num) - 0usize];
18    ["Offset of field: n_factor_t::exp"][::std::mem::offset_of!(n_factor_t, exp) - 4usize];
19    ["Offset of field: n_factor_t::p"][::std::mem::offset_of!(n_factor_t, p) - 64usize];
20};
21impl Default for n_factor_t {
22    fn default() -> Self {
23        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
24        unsafe {
25            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
26            s.assume_init()
27        }
28    }
29}
30#[repr(C)]
31pub struct n_primes_struct {
32    pub small_i: slong,
33    pub small_num: slong,
34    pub small_primes: *mut libc::c_uint,
35    pub sieve_a: ulong,
36    pub sieve_b: ulong,
37    pub sieve_i: slong,
38    pub sieve_num: slong,
39    pub sieve: *mut libc::c_char,
40}
41#[allow(clippy::unnecessary_operation, clippy::identity_op)]
42const _: () = {
43    ["Size of n_primes_struct"][::std::mem::size_of::<n_primes_struct>() - 64usize];
44    ["Alignment of n_primes_struct"][::std::mem::align_of::<n_primes_struct>() - 8usize];
45    ["Offset of field: n_primes_struct::small_i"]
46        [::std::mem::offset_of!(n_primes_struct, small_i) - 0usize];
47    ["Offset of field: n_primes_struct::small_num"]
48        [::std::mem::offset_of!(n_primes_struct, small_num) - 8usize];
49    ["Offset of field: n_primes_struct::small_primes"]
50        [::std::mem::offset_of!(n_primes_struct, small_primes) - 16usize];
51    ["Offset of field: n_primes_struct::sieve_a"]
52        [::std::mem::offset_of!(n_primes_struct, sieve_a) - 24usize];
53    ["Offset of field: n_primes_struct::sieve_b"]
54        [::std::mem::offset_of!(n_primes_struct, sieve_b) - 32usize];
55    ["Offset of field: n_primes_struct::sieve_i"]
56        [::std::mem::offset_of!(n_primes_struct, sieve_i) - 40usize];
57    ["Offset of field: n_primes_struct::sieve_num"]
58        [::std::mem::offset_of!(n_primes_struct, sieve_num) - 48usize];
59    ["Offset of field: n_primes_struct::sieve"]
60        [::std::mem::offset_of!(n_primes_struct, sieve) - 56usize];
61};
62impl Default for n_primes_struct {
63    fn default() -> Self {
64        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
65        unsafe {
66            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
67            s.assume_init()
68        }
69    }
70}
71pub type n_primes_t = [n_primes_struct; 1usize];