pardiso_wrapper/panua/
ffi.rs1#![allow(non_camel_case_types)]
2
3use libloading::Symbol;
4use std::ffi::c_void;
5
6#[derive(Debug)]
7pub(crate) struct PanuaPardisoPointers<'a> {
8 pub pardiso: Symbol<'a, PARDISO>,
9 pub pardisoinit: Symbol<'a, PARDISOINIT>,
10 pub pardiso_chkmatrix: Symbol<'a, PARDISO_CHKMATRIX>,
11 pub pardiso_chkvec: Symbol<'a, PARDISO_CHKVEC>,
12 pub pardiso_printstats: Symbol<'a, PARDISO_PRINTSTATS>,
13}
14
15pub(crate) type PARDISO = extern "C" fn(
16 pt: *mut c_void,
17 maxfct: *const i32,
18 mnum: *const i32,
19 mtype: *const i32,
20 phase: *const i32,
21 n: *const i32,
22 a: *const f64,
23 ia: *const i32,
24 ja: *const i32,
25 perm: *mut i32,
26 nrhs: *const i32,
27 iparm: *mut i32,
28 msglvl: *const i32,
29 b: *mut f64,
30 x: *mut f64,
31 error: *mut i32,
32 dparm: *mut f64,
33);
34
35pub(crate) type PARDISOINIT = extern "C" fn(
36 pt: *mut c_void,
37 mtype: *const i32,
38 solver: *const i32,
39 iparm: *mut i32,
40 dparm: *mut f64,
41 error: *mut i32,
42);
43
44pub(crate) type PARDISO_CHKMATRIX = extern "C" fn(
45 mtype: *const i32,
46 n: *const i32,
47 a: *const f64,
48 ia: *const i32,
49 ja: *const i32,
50 error: *mut i32,
51);
52
53pub(crate) type PARDISO_CHKVEC =
54 extern "C" fn(n: *const i32, nrhs: *const i32, b: *const f64, error: *mut i32);
55
56pub(crate) type PARDISO_PRINTSTATS = extern "C" fn(
57 mtype: *const i32,
58 n: *const i32,
59 a: *const f64,
60 ia: *const i32,
61 ja: *const i32,
62 nrhs: *const i32,
63 b: *const f64,
64 error: *mut i32,
65);