Expand description
Micro neural matrix library for GPU is small library that operates on matrices.
This library uses GPU by the following computing platforms:
- OpenCL
- CUDA
If this library uses CUDA, this library can use the cuBLAS library to multiplication of matrices.
A frontend-backend architecture is used by this library. The frontend of this library can use
one of two backends (OpenCL or CUDA). These backends allow to use GPU by the computing
platforms. The frontend and the backend can have many instances. This library provides a
high-level interfece to operations of matrices by the frontend and methods of a Matrix
structure.
§Examples
let a = matrix![
[1.0, 2.0],
[3.0, 4.0]
];
let x = matrix![
[5.0],
[6.0]
];
let b = matrix![
[7.0],
[8.0]
];
let c = a * x + b;
assert_eq!(vec![1.0 * 5.0 + 2.0 * 6.0 + 7.0, 3.0 * 5.0 + 4.0 * 6.0 + 8.0], c.elems());
Modules§
Macros§
- matrix
- Creates a matrix from the arguments.
Structs§
Enums§
- Backend
Array - An enumeration of backend array.
- Error
- An error enumeration.
Traits§
- Backend
- A backend trait.
Functions§
- finalize_
default_ backend - Finalizes a default backend.
- get_
default_ backend - Returns a default backend.
- initialize_
default_ backend_ for_ uninitialized - Initializes a default backend if the backend is uninitialized and returns the default backend.
- set_
default_ backend - Sets a default backend.
- set_
default_ backend_ for_ uninitialized - Sets a default backend if the default backend is uninitialized and returns the default backend.
- unset_
default_ backend - Unsets a default backend.
Type Aliases§
- Result
- A result type.