arnaucube
arnaucube/poulpyPublic Self-hosted repository
poulpy/base2k/src/ffi/reim.rs
base2k/src/ffi/reim.rsRaw
  1#[repr(C)]
  2#[derive(Debug, Copy, Clone)]
  3pub struct reim_fft_precomp {
  4    _unused: [u8; 0],
  5}
  6pub type REIM_FFT_PRECOMP = reim_fft_precomp;
  7#[repr(C)]
  8#[derive(Debug, Copy, Clone)]
  9pub struct reim_ifft_precomp {
 10    _unused: [u8; 0],
 11}
 12pub type REIM_IFFT_PRECOMP = reim_ifft_precomp;
 13#[repr(C)]
 14#[derive(Debug, Copy, Clone)]
 15pub struct reim_mul_precomp {
 16    _unused: [u8; 0],
 17}
 18pub type REIM_FFTVEC_MUL_PRECOMP = reim_mul_precomp;
 19#[repr(C)]
 20#[derive(Debug, Copy, Clone)]
 21pub struct reim_addmul_precomp {
 22    _unused: [u8; 0],
 23}
 24pub type REIM_FFTVEC_ADDMUL_PRECOMP = reim_addmul_precomp;
 25#[repr(C)]
 26#[derive(Debug, Copy, Clone)]
 27pub struct reim_from_znx32_precomp {
 28    _unused: [u8; 0],
 29}
 30pub type REIM_FROM_ZNX32_PRECOMP = reim_from_znx32_precomp;
 31#[repr(C)]
 32#[derive(Debug, Copy, Clone)]
 33pub struct reim_from_znx64_precomp {
 34    _unused: [u8; 0],
 35}
 36pub type REIM_FROM_ZNX64_PRECOMP = reim_from_znx64_precomp;
 37#[repr(C)]
 38#[derive(Debug, Copy, Clone)]
 39pub struct reim_from_tnx32_precomp {
 40    _unused: [u8; 0],
 41}
 42pub type REIM_FROM_TNX32_PRECOMP = reim_from_tnx32_precomp;
 43#[repr(C)]
 44#[derive(Debug, Copy, Clone)]
 45pub struct reim_to_tnx32_precomp {
 46    _unused: [u8; 0],
 47}
 48pub type REIM_TO_TNX32_PRECOMP = reim_to_tnx32_precomp;
 49#[repr(C)]
 50#[derive(Debug, Copy, Clone)]
 51pub struct reim_to_tnx_precomp {
 52    _unused: [u8; 0],
 53}
 54pub type REIM_TO_TNX_PRECOMP = reim_to_tnx_precomp;
 55#[repr(C)]
 56#[derive(Debug, Copy, Clone)]
 57pub struct reim_to_znx64_precomp {
 58    _unused: [u8; 0],
 59}
 60pub type REIM_TO_ZNX64_PRECOMP = reim_to_znx64_precomp;
 61unsafe extern "C" {
 62    pub fn new_reim_fft_precomp(m: u32, num_buffers: u32) -> *mut REIM_FFT_PRECOMP;
 63}
 64unsafe extern "C" {
 65    pub fn reim_fft_precomp_get_buffer(
 66        tables: *const REIM_FFT_PRECOMP,
 67        buffer_index: u32,
 68    ) -> *mut f64;
 69}
 70unsafe extern "C" {
 71    pub fn new_reim_fft_buffer(m: u32) -> *mut f64;
 72}
 73unsafe extern "C" {
 74    pub fn delete_reim_fft_buffer(buffer: *mut f64);
 75}
 76unsafe extern "C" {
 77    pub fn reim_fft(tables: *const REIM_FFT_PRECOMP, data: *mut f64);
 78}
 79unsafe extern "C" {
 80    pub fn new_reim_ifft_precomp(m: u32, num_buffers: u32) -> *mut REIM_IFFT_PRECOMP;
 81}
 82unsafe extern "C" {
 83    pub fn reim_ifft_precomp_get_buffer(
 84        tables: *const REIM_IFFT_PRECOMP,
 85        buffer_index: u32,
 86    ) -> *mut f64;
 87}
 88unsafe extern "C" {
 89    pub fn reim_ifft(tables: *const REIM_IFFT_PRECOMP, data: *mut f64);
 90}
 91unsafe extern "C" {
 92    pub fn new_reim_fftvec_mul_precomp(m: u32) -> *mut REIM_FFTVEC_MUL_PRECOMP;
 93}
 94unsafe extern "C" {
 95    pub fn reim_fftvec_mul(
 96        tables: *const REIM_FFTVEC_MUL_PRECOMP,
 97        r: *mut f64,
 98        a: *const f64,
 99        b: *const f64,
100    );
101}
102unsafe extern "C" {
103    pub fn new_reim_fftvec_addmul_precomp(m: u32) -> *mut REIM_FFTVEC_ADDMUL_PRECOMP;
104}
105unsafe extern "C" {
106    pub fn reim_fftvec_addmul(
107        tables: *const REIM_FFTVEC_ADDMUL_PRECOMP,
108        r: *mut f64,
109        a: *const f64,
110        b: *const f64,
111    );
112}
113unsafe extern "C" {
114    pub fn new_reim_from_znx32_precomp(m: u32, log2bound: u32) -> *mut REIM_FROM_ZNX32_PRECOMP;
115}
116unsafe extern "C" {
117    pub fn reim_from_znx32(
118        tables: *const REIM_FROM_ZNX32_PRECOMP,
119        r: *mut ::std::os::raw::c_void,
120        a: *const i32,
121    );
122}
123unsafe extern "C" {
124    pub fn reim_from_znx64(
125        tables: *const REIM_FROM_ZNX64_PRECOMP,
126        r: *mut ::std::os::raw::c_void,
127        a: *const i64,
128    );
129}
130unsafe extern "C" {
131    pub fn new_reim_from_znx64_precomp(m: u32, maxbnd: u32) -> *mut REIM_FROM_ZNX64_PRECOMP;
132}
133unsafe extern "C" {
134    pub fn reim_from_znx64_simple(
135        m: u32,
136        log2bound: u32,
137        r: *mut ::std::os::raw::c_void,
138        a: *const i64,
139    );
140}
141unsafe extern "C" {
142    pub fn new_reim_from_tnx32_precomp(m: u32) -> *mut REIM_FROM_TNX32_PRECOMP;
143}
144unsafe extern "C" {
145    pub fn reim_from_tnx32(
146        tables: *const REIM_FROM_TNX32_PRECOMP,
147        r: *mut ::std::os::raw::c_void,
148        a: *const i32,
149    );
150}
151unsafe extern "C" {
152    pub fn new_reim_to_tnx32_precomp(
153        m: u32,
154        divisor: f64,
155        log2overhead: u32,
156    ) -> *mut REIM_TO_TNX32_PRECOMP;
157}
158unsafe extern "C" {
159    pub fn reim_to_tnx32(
160        tables: *const REIM_TO_TNX32_PRECOMP,
161        r: *mut i32,
162        a: *const ::std::os::raw::c_void,
163    );
164}
165unsafe extern "C" {
166    pub fn new_reim_to_tnx_precomp(
167        m: u32,
168        divisor: f64,
169        log2overhead: u32,
170    ) -> *mut REIM_TO_TNX_PRECOMP;
171}
172unsafe extern "C" {
173    pub fn reim_to_tnx(tables: *const REIM_TO_TNX_PRECOMP, r: *mut f64, a: *const f64);
174}
175unsafe extern "C" {
176    pub fn reim_to_tnx_simple(m: u32, divisor: f64, log2overhead: u32, r: *mut f64, a: *const f64);
177}
178unsafe extern "C" {
179    pub fn new_reim_to_znx64_precomp(
180        m: u32,
181        divisor: f64,
182        log2bound: u32,
183    ) -> *mut REIM_TO_ZNX64_PRECOMP;
184}
185unsafe extern "C" {
186    pub fn reim_to_znx64(
187        precomp: *const REIM_TO_ZNX64_PRECOMP,
188        r: *mut i64,
189        a: *const ::std::os::raw::c_void,
190    );
191}
192unsafe extern "C" {
193    pub fn reim_to_znx64_simple(
194        m: u32,
195        divisor: f64,
196        log2bound: u32,
197        r: *mut i64,
198        a: *const ::std::os::raw::c_void,
199    );
200}
201unsafe extern "C" {
202    pub fn reim_fft_simple(m: u32, data: *mut ::std::os::raw::c_void);
203}
204unsafe extern "C" {
205    pub fn reim_ifft_simple(m: u32, data: *mut ::std::os::raw::c_void);
206}
207unsafe extern "C" {
208    pub fn reim_fftvec_mul_simple(
209        m: u32,
210        r: *mut ::std::os::raw::c_void,
211        a: *const ::std::os::raw::c_void,
212        b: *const ::std::os::raw::c_void,
213    );
214}
215unsafe extern "C" {
216    pub fn reim_fftvec_addmul_simple(
217        m: u32,
218        r: *mut ::std::os::raw::c_void,
219        a: *const ::std::os::raw::c_void,
220        b: *const ::std::os::raw::c_void,
221    );
222}
223unsafe extern "C" {
224    pub fn reim_from_znx32_simple(
225        m: u32,
226        log2bound: u32,
227        r: *mut ::std::os::raw::c_void,
228        x: *const i32,
229    );
230}
231unsafe extern "C" {
232    pub fn reim_from_tnx32_simple(m: u32, r: *mut ::std::os::raw::c_void, x: *const i32);
233}
234unsafe extern "C" {
235    pub fn reim_to_tnx32_simple(
236        m: u32,
237        divisor: f64,
238        log2overhead: u32,
239        r: *mut i32,
240        x: *const ::std::os::raw::c_void,
241    );
242}