add autodiff batching backend
This commit is contained in:
parent
e0c8ead880
commit
b7c63a973f
6 changed files with 196 additions and 44 deletions
|
@ -4,7 +4,7 @@
|
|||
use libc::{c_char, c_uint};
|
||||
|
||||
use super::MetadataKindId;
|
||||
use super::ffi::{BasicBlock, Metadata, Module, Type, Value};
|
||||
use super::ffi::{AttributeKind, BasicBlock, Metadata, Module, Type, Value};
|
||||
use crate::llvm::Bool;
|
||||
|
||||
#[link(name = "llvm-wrapper", kind = "static")]
|
||||
|
@ -17,6 +17,8 @@ unsafe extern "C" {
|
|||
pub(crate) fn LLVMRustEraseInstFromParent(V: &Value);
|
||||
pub(crate) fn LLVMRustGetTerminator<'a>(B: &BasicBlock) -> &'a Value;
|
||||
pub(crate) fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool;
|
||||
pub(crate) fn LLVMRustHasAttributeAtIndex(V: &Value, i: c_uint, Kind: AttributeKind) -> bool;
|
||||
pub(crate) fn LLVMRustGetArrayNumElements(Ty: &Type) -> u64;
|
||||
}
|
||||
|
||||
unsafe extern "C" {
|
||||
|
|
|
@ -1172,7 +1172,7 @@ unsafe extern "C" {
|
|||
|
||||
// Operations on parameters
|
||||
pub(crate) fn LLVMIsAArgument(Val: &Value) -> Option<&Value>;
|
||||
pub(crate) fn LLVMCountParams(Fn: &Value) -> c_uint;
|
||||
pub(crate) safe fn LLVMCountParams(Fn: &Value) -> c_uint;
|
||||
pub(crate) fn LLVMGetParam(Fn: &Value, Index: c_uint) -> &Value;
|
||||
|
||||
// Operations on basic blocks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue