Struct ocl::builders::ProgramBuilder[][src]

#[must_use = "builders do nothing unless \'::build\' is called"]
pub struct ProgramBuilder<'b> { /* fields omitted */ }

A builder for Program.

Methods

impl<'b> ProgramBuilder<'b>
[src]

Returns a new, empty, build configuration object.

Adds a build option containing a compiler command line definition. Formatted as -D {name}={val}.

Example

...cmplr_def("MAX_ITERS", 500)...

Adds a build option containing a raw compiler command line parameter. Formatted as {} (exact text).

Example

...cmplr_opt("-g")...

Pushes pre-created build option to the list of options.

If either ::il or ::binaries are used and raw source is added, it will be ignored.

Adds the contents of a file to the program.

Opens a file and adds its contents to the program source.

Adds raw text to the program source.

Adds raw text to the program source.

Adds a binary to be loaded.

There must be one binary for each device listed in ::devices.

Specifies a list of devices to build this program on. The devices must be associated with the context passed to ::build later on.

Devices may be specified in any number of ways including simply passing a device or slice of devices. See the impl From section of DeviceSpecifier for more information.

Panics

Devices must not have already been specified.

Returns the devices specified to be associated the program.

Returns a concatenated string of command line options to be passed to the compiler when building this program.

Returns the final program source code as a list of strings.

Order of Inclusion

  1. Macro definitions and code strings specified by a BuildOpt::IncludeDefine or BuildOpt::IncludeRaw via ::bo
  2. Contents of files specified via ::src_file
  3. Contents of strings specified via ::src or a BuildOpt::IncludeRawEof via ::bo

Returns a newly built Program.

Trait Implementations

impl<'b> Clone for ProgramBuilder<'b>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'b> Debug for ProgramBuilder<'b>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'b> Send for ProgramBuilder<'b>

impl<'b> Sync for ProgramBuilder<'b>