Struct ocl::builders::ProQueBuilder [] [src]

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

A builder for ProQue.

Methods

impl ProQueBuilder
[src]

Returns a new ProQueBuilder with an empty / default configuration.

The minimum amount of configuration possible before calling ::build is to simply assign some source code using ::src.

For full configuration options, separately create a Context and ProgramBuilder (do not ::build the ProgramBuilder, its device list must be set by this ProQueBuilder to assure consistency) then pass them as arguments to the ::context and ::prog_bldr methods respectively.

Sets the platform to be used and returns the builder.

Panics

If context is set, this will panic upon building. Only one or the other can be configured.

Sets the context and returns the ProQueBuilder.

Panics

If platform is set, this will panic upon building. Only one or the other can be configured.

Sets a device or devices to be used and returns a ProQueBuilder reference.

Must specify only a single device.

Adds some source code to be compiled and returns the ProQueBuilder.

Creates a ProgramBuilder if one has not already been added. Attempts to call ::program_builder after calling this method will cause a panic.

If you need a more complex build configuration or to add multiple source files. Pass an unbuilt ProgramBuilder to the ::program_builder method (described below).

Adds a pre-configured ProgramBuilder and returns the ProQueBuilder.

Panics

This ProQueBuilder may not already contain a ProgramBuilder.

program_builder must not have any device indices configured (via its ::device_idxs method). ProQueBuilder will only build programs for the device specified by ::device_idx or the default device if none has been specified.

Sets the built-in dimensions.

This is optional.

Use if you want to be able to call the ::create_kernel or ::create_buffer methods on the ProQue created by this builder. Dimensions can alternatively be set after building by using the ProQue::set_dims method.

Sets the command queue properties.

Optional.

Returns a new ProQue.

Errors

A ProgramBuilder or some source code must have been specified with ::prog_bldr or ::src before building.