[][src]Struct halide_build::Build

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,
}

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

impl<'a> Build<'a>[src]

pub fn new<P: AsRef<Path>, Q: AsRef<Path>>(
    halide_path: P,
    output: Q
) -> Build<'a>
[src]

Create a new build with the given halide path and output

pub fn source_file(self, src: impl AsRef<Path>) -> Self[src]

pub fn build_arg(self, src: &'a str) -> Self[src]

pub fn build_args(self, src: impl AsRef<[&'a str]>) -> Self[src]

pub fn run_arg(self, src: &'a str) -> Self[src]

pub fn run_args(self, src: impl AsRef<[&'a str]>) -> Self[src]

pub fn ldflags(self, flags: &'a str) -> Self[src]

pub fn cxxflags(self, flags: &'a str) -> Self[src]

pub fn compiler(self, name: &'a str) -> Self[src]

pub fn keep(self, x: bool) -> Self[src]

pub fn generator(self, x: bool) -> Self[src]

pub fn build(&self) -> Result<bool>[src]

Execute the build step

pub fn run(&self) -> Result<bool>[src]

Execute the run step

Trait Implementations

impl<'a> Debug for Build<'a>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.