pub struct Build<'a> {
pub halide_path: PathBuf,
pub src: Vec<PathBuf>,
pub output: PathBuf,
pub cxx: Option<&'a str>,
pub cxxflags: Option<&'a str>,
pub ldflags: Option<&'a str>,
pub build_args: Vec<&'a str>,
pub run_args: Vec<&'a str>,
pub keep: bool,
pub generator: bool,
}
Expand description
Build stores the required context for building a Halide kernel
Fields§
§halide_path: PathBuf
Path to halide source
src: Vec<PathBuf>
Input files
output: PathBuf
Output file
cxx: Option<&'a str>
C++ compiler
cxxflags: Option<&'a str>
C++ compile time flags
ldflags: Option<&'a str>
C++ link time flags
build_args: Vec<&'a str>
Extra arguments to build step
run_args: Vec<&'a str>
Extra arguments to run step
keep: bool
Keep executable when finished running
generator: bool
Include Halide generator header
Implementations§
Source§impl<'a> Build<'a>
impl<'a> Build<'a>
Sourcepub fn new<P: AsRef<Path>, Q: AsRef<Path>>(
halide_path: P,
output: Q,
) -> Build<'a>
pub fn new<P: AsRef<Path>, Q: AsRef<Path>>( halide_path: P, output: Q, ) -> Build<'a>
Create a new build with the given halide path and output
pub fn source_file(self, src: impl AsRef<Path>) -> Self
pub fn build_arg(self, src: &'a str) -> Self
pub fn build_args(self, src: impl AsRef<[&'a str]>) -> Self
pub fn run_arg(self, src: &'a str) -> Self
pub fn run_args(self, src: impl AsRef<[&'a str]>) -> Self
pub fn ldflags(self, flags: &'a str) -> Self
pub fn cxxflags(self, flags: &'a str) -> Self
pub fn compiler(self, name: &'a str) -> Self
pub fn keep(self, x: bool) -> Self
pub fn generator(self, x: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Build<'a>
impl<'a> RefUnwindSafe for Build<'a>
impl<'a> Send for Build<'a>
impl<'a> Sync for Build<'a>
impl<'a> Unpin for Build<'a>
impl<'a> UnwindSafe for Build<'a>
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