[][src]Struct ispc::Config

pub struct Config { /* fields omitted */ }

Extra configuration to be passed to ISPC


impl Config[src]

pub fn new() -> Config[src]

pub fn file<P>(&mut self, file: P) -> &mut Config where
    P: AsRef<Path>, 

Add an ISPC file to be compiled

pub fn out_dir<P>(&mut self, dir: P) -> &mut Config where
    P: AsRef<Path>, 

Set the output directory to override the default of env!("OUT_DIR")

pub fn debug(&mut self, debug: bool) -> &mut Config[src]

Set whether debug symbols should be generated, symbols are generated by default if env!("DEBUG") == "true"

pub fn opt_level(&mut self, opt_level: u32) -> &mut Config[src]

Set the optimization level to override the default of env!("OPT_LEVEL")

pub fn target(&mut self, target: &str) -> &mut Config[src]

Set the target triple to compile for, overriding the default of env!("TARGET")

pub fn add_define(&mut self, define: &str, value: Option<&str>) -> &mut Config[src]

Add a define to be passed to the ISPC compiler, e.g. -DFOO or -DBAR=FOO if a value should also be set.

pub fn addressing(&mut self, addressing: Addressing) -> &mut Config[src]

Select the 32 or 64 bit addressing calculations for addressing calculations in ISPC.

pub fn math_lib(&mut self, math_lib: MathLib) -> &mut Config[src]

Set the math library used by ISPC code, defaults to the ISPC math library.

pub fn optimization_opt(&mut self, opt: OptimizationOpt) -> &mut Config[src]

Set an optimization option.

pub fn cpu(&mut self, cpu: CPU) -> &mut Config[src]

Set the cpu target. This overrides the default choice of ISPC which is to target the host CPU.

pub fn force_alignment(&mut self, alignment: u32) -> &mut Config[src]

Force ISPC memory allocations to be aligned to alignment.

pub fn include_path<P>(&mut self, path: P) -> &mut Config where
    P: AsRef<Path>, 

Add an extra include path for the ispc compiler to search for files.

pub fn no_omit_frame_pointer(&mut self) -> &mut Config[src]

Disable frame pointer omission. It may be useful for profiling to disable omission.

pub fn no_stdlib(&mut self) -> &mut Config[src]

Don't make the ispc standard library available.

pub fn no_cpp(&mut self) -> &mut Config[src]

Don't run the C preprocessor

pub fn quiet(&mut self) -> &mut Config[src]

Enable suppression of all ispc compiler output.

pub fn werror(&mut self) -> &mut Config[src]

Enable treating warnings as errors.

pub fn woff(&mut self) -> &mut Config[src]

Disable all warnings.

pub fn wno_perf(&mut self) -> &mut Config[src]

Don't issue warnings related to performance issues

pub fn instrument(&mut self) -> &mut Config[src]

Emit instrumentation code for ISPC to gather performance data such as vector utilization.

pub fn target_isa(&mut self, target: TargetISA) -> &mut Config[src]

Select the target ISA and vector width. If none is specified ispc will choose the host CPU ISA and vector width.

pub fn target_isas(&mut self, targets: Vec<TargetISA>) -> &mut Config[src]

Select multiple target ISAs and vector widths. If none is specified ispc will choose the host CPU ISA and vector width. Note that certain options are not compatible with this use case, e.g. AVX1.1 will replace AVX1, Host should not be passed (just use the default)

pub fn cargo_metadata(&mut self, metadata: bool) -> &mut Config[src]

Set whether Cargo metadata should be emitted to link to the compiled library

pub fn compile(&mut self, lib: &str)[src]

The library name should not have any prefix or suffix, e.g. instead of libexample.a or example.lib simply pass example

pub fn ispc_version(&self) -> &Version[src]

Get the ISPC compiler version.

Trait Implementations

impl Default for Config[src]

Auto Trait Implementations

impl Send for Config

impl Sync for Config

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

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