pub struct CodeGen<'ctx> { /* private fields */ }Implementations§
Source§impl<'ctx> CodeGen<'ctx>
impl<'ctx> CodeGen<'ctx>
pub fn new( model: &DiscreteModel<'_>, context: &'ctx Context, diffsl_real_type: RealType, real_type: FloatType<'ctx>, int_type: IntType<'ctx>, threaded: bool, ptr_size_bits: u64, real_size_bits: u64, int_size_bits: u64, debug: bool, constants_use_jit: bool, ) -> Result<Self>
pub fn write_bitcode_to_path(&self, path: &Path)
pub fn compile_set_u0<'m>( &mut self, model: &'m DiscreteModel<'_>, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_calc_out<'m>( &mut self, model: &'m DiscreteModel<'_>, include_constants: bool, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_calc_stop<'m>( &mut self, model: &'m DiscreteModel<'_>, include_constants: bool, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_reset<'m>( &mut self, model: &'m DiscreteModel<'_>, include_constants: bool, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_rhs<'m>( &mut self, model: &'m DiscreteModel<'_>, include_constants: bool, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_mass<'m>( &mut self, model: &'m DiscreteModel<'_>, code: Option<&str>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_gradient( &mut self, original_function: FunctionValue<'ctx>, args_type: &[CompileGradientArgType], mode: CompileMode, fn_name: &str, ) -> Result<FunctionValue<'ctx>>
pub fn compile_get_dims( &mut self, model: &DiscreteModel<'_>, ) -> Result<FunctionValue<'ctx>>
pub fn compile_get_tensor( &mut self, model: &DiscreteModel<'_>, name: &str, ) -> Result<FunctionValue<'ctx>>
pub fn compile_get_constant( &mut self, model: &DiscreteModel<'_>, name: &str, ) -> Result<FunctionValue<'ctx>>
pub fn compile_inputs( &mut self, model: &DiscreteModel<'_>, is_get: bool, ) -> Result<FunctionValue<'ctx>>
pub fn compile_set_id( &mut self, model: &DiscreteModel<'_>, ) -> Result<FunctionValue<'ctx>>
pub fn module(&self) -> &Module<'ctx>
Auto Trait Implementations§
impl<'ctx> !Freeze for CodeGen<'ctx>
impl<'ctx> !RefUnwindSafe for CodeGen<'ctx>
impl<'ctx> !Send for CodeGen<'ctx>
impl<'ctx> !Sync for CodeGen<'ctx>
impl<'ctx> Unpin for CodeGen<'ctx>
impl<'ctx> UnsafeUnpin for CodeGen<'ctx>
impl<'ctx> UnwindSafe for CodeGen<'ctx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more