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]

[src]

Returns a new, empty, build configuration object.

[src]

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

Example

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

[src]

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

Example

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

[src]

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.

[src]

Adds the contents of a file to the program.

[src]

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

[src]

Adds raw text to the program source.

[src]

Adds raw text to the program source.

[src]

Adds a binary to be loaded.

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

[src]

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.

[src]

Returns the devices specified to be associated the program.

[src]

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

[src]

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

[src]

Returns a newly built Program.

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter. Read more