Skip to content

Commit 8933581

Browse files
committed
Add README
1 parent 2c4cb0f commit 8933581

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
uses: actions/checkout@v4
1515
- name: Lint
1616
run: swift-format lint --recursive --strict --parallel .
17+
- name: Install BLAS & LAPACK
18+
run: apt-get update && apt-get install -y libblas-dev liblapack-dev
1719
- name: Build
1820
run: swift build
1921
- name: Test

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import PackageDescription
33

44
let package = Package(
5-
name: "AccelerateLinux",
5+
name: "accelerate-linux",
66
products: [
77
.library(
88
name: "AccelerateLinux",

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Accelerate Linux
2+
3+
This package is a collection of functions from Apple's Accelerate framework made available on Linux. It implements vDSP functions natively and bridges to LAPACK and BLAS when available.
4+
5+
## Installation
6+
7+
```swift
8+
.package(url: "[email protected]:brokenhandsio/accelerate-linux.git", from: "main")
9+
```
10+
11+
```swift
12+
.product(name: "AccelerateLinux", package: "accelerate-linux")
13+
```
14+
15+
## Usage
16+
17+
Simply use
18+
19+
```swift
20+
import AccelerateLinux
21+
```
22+
23+
and then call through to normal Accelerate functions.
24+
25+
## Structure
26+
27+
The package is structured as follows:
28+
29+
- `Sources/AccelerateLinux/MatrixOps`: Contains matrix operations:
30+
- `BasicOps` - Basic matrix operations:
31+
- [x] `vDSP_mtransD` - Transpose a matrix
32+
- [ ] `vDSP_mmulD` - Matrix multiplication
33+
- `LAPACK` - LAPACK functions:
34+
- [ ] `dgesv_` - Solve a system of linear equations
35+
- [x] `dgesvd_` - Singular Value Decomposition
36+
- [ ] `dgetrf_` - LU Decomposition
37+
- [ ] `dgetri_` - Inverse of a matrix
38+
- [ ] `dgeev_` - Eigenvalues and eigenvectors
39+
- [ ] `dpotrf_` - Cholesky decomposition
40+
- [ ] `dtrtrs_` - Solve a triangular system of linear equations
41+
- `CBLAS` - BLAS functions:
42+
- [ ] `cblas_dgemm` - Matrix multiplication
43+
- `Sources/AccelerateLinux/VectorOps`: Contains vector operations
44+
- `BasicOps` - Basic vector operations:
45+
- [x] `vDSP_maxvD` - Find the maximum value in a vector
46+
- [x] `vDSP_minvD` - Find the minimum value in a vector
47+
- [ ] `vDSP_vaddD` - Add two vectors
48+
- [ ] `vDSP_vsubD` - Subtract two vectors
49+
- [ ] `vDSP_vmulD` - Multiply two vectors
50+
- [ ] `vvpow` - Raise a vector to a power
51+
- [ ] `vDSP_vclrD` - Clear a vector
52+
- [ ] `vDSP_vfillD` - Fill a vector with a value
53+
- [ ] `vDSP_vabsD` - Absolute value of a vector
54+
- [ ] `vDSP_vnegD` - Negate a vector
55+
- [ ] `vDSP_vsqD` - Square a vector
56+
- [ ] `vDSP_dotprD` - Dot product of two vectors
57+
- [ ] `vDSP_vlimD` - Limit a vector to a range
58+
- [ ] `vDSP_vclipcD` - Clip a vector to a range
59+
- [ ] `vDSP_vrsumD` - Recursive sum of a vector
60+
- [ ] `vDSP_vsortD` - Sort a vector
61+
- [ ] `vDSP_vrampD` - Ramp a vector
62+
63+
- [ ] `vDSP.sum` - Sum of a vector
64+
- [ ] `vDSP.add` - Add two vectors
65+
- [ ] `vDSP.subtract` - Subtract two vectors
66+
- [ ] `vDSP.multiply` - Multiply two vectors
67+
- `Statistical` - Statistical operations:
68+
- [ ] `vDSP.mean` - Mean of a vector
69+
- `Transforms`:
70+
- [ ] `vDSP_vdpsp` - Convert a double vector to a single precision vector

0 commit comments

Comments
 (0)