numbl 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ npm install -g numbl
17
17
  To enable fast linear algebra (matrix inverse, SVD, eigenvalues, etc.), build the native LAPACK addon:
18
18
 
19
19
  ```bash
20
- # Prerequisites: C++ compiler, libopenblas-dev (or equivalent for your OS)
20
+ # Prerequisites: C++ compiler, libopenblas-dev, libfftw3-dev (or equivalents for your OS)
21
21
  numbl build-addon
22
22
  ```
23
23
 
@@ -49,13 +49,13 @@ docker run -it -p 8234:8234 node:22 npx numbl --plot-port 8234
49
49
  With native LAPACK support for fast linear algebra:
50
50
 
51
51
  ```bash
52
- docker run -it node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev && npx numbl build-addon && npx numbl"
52
+ docker run -it node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev libfftw3-dev && npx numbl build-addon && npx numbl"
53
53
  ```
54
54
 
55
55
  With both LAPACK and plotting:
56
56
 
57
57
  ```bash
58
- docker run -it -p 8234:8234 node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev && npx numbl build-addon && npx numbl --plot-port 8234"
58
+ docker run -it -p 8234:8234 node:22 bash -c "apt-get update && apt-get install -y libopenblas-dev libfftw3-dev && npx numbl build-addon && npx numbl --plot-port 8234"
59
59
  ```
60
60
 
61
61
  ## Upgrading
package/binding.gyp CHANGED
@@ -11,16 +11,23 @@
11
11
  "native/lapack_matmul.cpp",
12
12
  "native/lapack_linsolve.cpp",
13
13
  "native/lapack_eig.cpp",
14
- "native/lapack_chol.cpp"
14
+ "native/lapack_chol.cpp",
15
+ "native/lapack_qz.cpp",
16
+ "native/lapack_fft.cpp"
15
17
  ],
16
18
  "include_dirs": [
17
- "<!@(node -p \"require('node-addon-api').include\")"
19
+ "<!@(node -p \"require('node-addon-api').include\")",
20
+ "<!@(pkg-config --cflags-only-I fftw3 2>/dev/null | sed 's/-I//g' || true)"
18
21
  ],
19
22
  "dependencies": [
20
23
  "<!(node -p \"require('node-addon-api').gyp\")"
21
24
  ],
22
25
  "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
23
- "libraries": [ "-lopenblas" ],
26
+ "libraries": [
27
+ "-lopenblas",
28
+ "<!@(pkg-config --libs fftw3 2>/dev/null || echo '-lfftw3')",
29
+ "<!@(pkg-config --libs-only-L fftw3 2>/dev/null | sed 's/-L/-Wl,-rpath,/g' || true)"
30
+ ],
24
31
  "cflags_cc": [ "-std=c++17", "-O2" ]
25
32
  }
26
33
  ]