#![doc = include_str!("../README.md")]
#[cfg(feature = "serde")]
#[cfg_attr(feature = "serde", macro_use)]
extern crate serde;
pub mod common;
pub mod config;
pub mod ctypes;
mod predictor;
mod tensor;
pub mod utils;
use libloading::{library_filename, Library};
use once_cell::sync::Lazy;
pub use predictor::Predictor;
pub use tensor::Tensor;
static LIBRARY: Lazy<Library> = Lazy::new(|| unsafe {
Library::new(library_filename("paddle_inference_c")).expect("can't not load paddle_inference_c")
});
#[macro_export]
macro_rules! call {
($name: ident ( $( $args: expr ),* )) => {
unsafe {
<$name as $crate::ctypes::Function>::get()( $($args),* )
}
};
}