Modules
This module defines all available compute devices
Macros
Return a device that implements the trait provided thus giving access to the functions implemented by the trait.
Structs
The underlying non-growable array structure. A Buffer
may be encapsulated in other structs.
Used to perform calculations with an OpenCL capable device. To make new calculations invocable, a trait providing new operations should be implemented for CLDevice.
A CPU is used to perform calculations on the host CPU. To make new operations invocable, a trait providing new functions should be implemented for CPU.
used to reset the cache count
Used to perform calculations with a CUDA capable device. To make new calculations invocable, a trait providing new operations should be implemented for CudaDevice.
Device
is another representation of a compute device.
It stores the type of the device and a pointer to the device from which Device
originates from.
This is used instead of another “device” generic for Buffer
.
An Ident
is used to identify a cached pointer.
Internal representation of an OpenCL Device with the capability of storing pointers.
Enums
Used to determine which device type Device
is of.
Constants
Traits
This trait is for allocating memory on the implemented device.
Assignment operations
Element-wise +, -, *, / operations for matrices.
enables easy generic kernel creation
This trait is used to retrieve a cached buffer from a specific device type.
Trait for implementing the clear() operation for the compute devices.
This trait is used to clone a buffer based on a specific device type.
Matrix multiplication. Uses provided device.
Trait for reading buffers.
Trait for writing data to buffers.
Functions
Increases the cache identifier / index by 1.
Adds a Buffer
to the “cache chain”.
Following calls will return this Buffer
,
if the corresponding internal count matches with the id used in the cache.
OpenCL matrix multiplication of two buffers / matrices.
Element-wise operations. The op/operation is usually “+”, “-”, “*”, “/”. “tensor element-wise”
Element-wise “assign” operations. The op/operation is usually “+”, “-”, “*”, “/”.
OpenCL
OpenCL
Compute operations on the CPU even though the matrix was created with an OpenCL device. There were some optimizations implemented regarding unified memory architectures.
Element-wise operations. The op/operation is usually “+”, “-”, “*”, “/”.
Element-wise “assign” operations. The op/operation is usually “+”, “-”, “*”, “/”.
Returns current cache identifier / index
inclusive range used to reset the cache count in loops as every operation increases the cache count, which would break the “cache cycle” if the cache count would not be reset.