# Module clu

- Data Types
- Function Index
- Function Details

## Data Types

### clu_state()

`clu_state() = #cl{} | undefined`

## Function Index

apply_kernel_args/2 |
build_binary/2 |
build_binary/3 |
build_source/2 | Create and build a OpenCL program from a string.
build_source/3 |
build_source_file/2 |
build_source_file/3 |
compile_file/1 |
compile_file/2 |
context/1 |
device/1 |
device_has_extension/2 |
device_list/1 |
devices_has_extension/2 |
get_program_binaries/1 | Retrieve the binaries associated with a program build.
setup/0 | setup a clu context with all devices.
setup/1 | setup the platform and an initial context using devices of type DevType.
teardown/1 | Release the context setup by clu:setup().
wait_complete/1 |

## Function Details

### apply_kernel_args/2

`apply_kernel_args(Kernel, Args) -> any()`

### build_binary/2

`build_binary(E, X2) -> any()`

### build_binary/3

`build_binary(E, X2, Options) -> any()`

### build_source/2

`build_source(E::clu_state(), Source::iodata()) -> {ok, cl_program()} | {error, {cl_error(), Logs::term}}`

Create and build a OpenCL program from a string.

### build_source/3

`build_source(E::clu_state(), Source::iodata(), Options::string()) -> {ok, cl_program()} | {error, {cl_error(), Logs::term}}`

### build_source_file/2

`build_source_file(E::clu_state(), File::string()) -> {ok, cl_program()} | {error, {cl_error(), Logs::term}}`

### build_source_file/3

`build_source_file(E::clu_state(), File::string(), Options::string()) -> {ok, cl_program()} | {error, {cl_error(), Logs::term}}`

### compile_file/1

`compile_file(File::string()) -> {ok, {[cl_device_id()], [binary()]}} | {error, {cl_error(), Logs::term}}`

### compile_file/2

`compile_file(File::string(), Options::string()) -> {ok, {[cl_device_id()], [binary()]}} | {error, {cl_error(), Logs::term}}`

### context/1

`context(E) -> any()`

### device/1

`device(E) -> any()`

### device_has_extension/2

`device_has_extension(Device, Extension) -> any()`

### device_list/1

`device_list(E) -> any()`

### devices_has_extension/2

`devices_has_extension(Clu, Extension) -> any()`

### get_program_binaries/1

`get_program_binaries(Program::cl_program()) -> {ok, {[cl_device_id()], [binary()]}}`

Retrieve the binaries associated with a program build. the binaries may be cached for later use with build_binary/2.

### setup/0

`setup() -> clu_state()`

setup a clu context with all devices.

### setup/1

`setup(DevType::cl_device_type()) -> clu_state()`

setup the platform and an initial context using devices of type DevType. Setup currently use the first platform found only.

### teardown/1

`teardown(E::clu_state()) -> ok | {error, cl_error()}`

Release the context setup by clu:setup().

### wait_complete/1

`wait_complete(Event) -> any()`

Generated by EDoc