fpga π
FPGA operations.
FpgaMixin π
Mixin providing the FPGA operations for a Session
.
This mixin is intended to be used in combination with BaseSession
and should not be instantiated on its own.
Intended usage
class Session(BaseSession, FPGAMixin): ...
fpga_arraycopy π
Performs the matrix copying operation.
Wraps the vaccel_fpga_arraycopy()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| list[int] | The matrix A to be copied. | required |
Returns:
Type | Description |
---|---|
list[int] | A copy of the matrix A. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |
Source code in vaccel/ops/fpga.py
fpga_mmult π
Performs the matrix multiplication operation.
Wraps the vaccel_fpga_mmult()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| list[float] | A matrix A. | required |
| list[float] | A matrix B. | required |
Returns:
Type | Description |
---|---|
list[float] | The multiplication result of matrices A and B. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |
Source code in vaccel/ops/fpga.py
fpga_parallel π
Performs the parallel matrix addition and multiplication operation.
Wraps the vaccel_fpga_parallel()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| list[float] | A matrix A. | required |
| list[float] | A matrix B. | required |
Returns:
Type | Description |
---|---|
(list[float], list[float]) | A tuple containing: - The result of the addition of matrices A and B. - The result of the multiplication of matrices A and B. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |
Source code in vaccel/ops/fpga.py
fpga_vadd π
Performs the matrix addition operation.
Wraps the vaccel_fpga_vadd()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| list[float] | A matrix A. | required |
| list[float] | A matrix B. | required |
Returns:
Type | Description |
---|---|
list[float] | The addition result of matrices A and B. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |