rindow/rindow-math-matrix
Rindow Math Matrix is a PHP library for scientific matrix operations, providing N-dimensional arrays, broadcasting, BLAS, linear algebra, and machine learning functions. It integrates C/C++ libraries like OpenBLAS and CLBlast via FFI and supports GPU acceleration through OpenCL.
Architecture fit
Rindow\Math\Matrix\MatrixOperator) that supplies N-dimensional arrays, broadcasting, BLAS bindings, linear algebra, RNG, and ML-adjacent primitives.rindow/rindow-neuralnetworks. A conventional CRUD/SaaS backend extracts no value.Integration feasibility
composer require rindow/rindow-math-matrix runs in pure-PHP "basic" mode with no extension. That makes the evaluation cheap.rindow/rindow-math-matrix-matlibffi) plus prebuilt OpenBLAS / Rindow-Matlib / CLBlast binaries. That is not a composer-only deployment — it is base-image and provisioning work.ffi.enable); this is commonly off in shared hosting and some managed runtimes, and is not something an application deploy can assume.Technical risk
rindow.github.io. Mitigant: BSD-3-Clause permits fork and vendoring.[0,4] → [0,5]), and the array() dtype default (now fixed at float32). Pin exact versions; do not assume SemVer safety.-v boot log to vendor/bin/rindow-math-matrix specifically because "service level becomes Basic" was hard to diagnose. We must build our own assertion.rindow-math-buffer-ffi issues; the maintainer states they gave up detailed Linux OpenCL testing because libclc is unreliable. GPU support is a laptop story, not a cloud story.Key questions
php.ini and the shared-library path on that host?Stack fit
MatrixOperator as a singleton in a dedicated service provider, with config/matrix.php covering driver mode (basic vs FFI vs OpenCL), device / deviceType options, and an explicit default dtype.Migration path
MathPHP, or a Python sidecar: strangler pattern behind an internal MatrixService interface, migrating function-by-function with golden-file numeric comparisons. Do not attempt a big-bang port; BLAS argument conventions and in-place output parameters are easy to get subtly wrong.Compatibility
composer.json; treat package + FFI plugin + native binaries as a single versioned artifact in the Docker image.Sequencing
MatrixService abstraction, Artisan health-check command asserting the actual service level.Maintenance
topk, gathernd) explicitly flagged as subject to change, plus interface refinements.Support
Scaling
memory_limit, cap input shapes, and reject user-supplied dimensions that could exhaust the process.Failure modes (ranked by likelihood × impact)
Ramp-up
out parameters, strides, and broadcasting are unfamiliar. Allow 1–2 weeks to productivity for one engineer, materially longer for tuning and driver troubleshooting.Bottom line: viable only if the product genuinely needs in-process scientific computing. The Composer install is trivial; the durable cost is the native toolchain, the silent-fallback failure mode, and single-maintainer risk. Proceed through the spike and abstraction layer — never as a direct dependency called from application code.
How can I help you explore Laravel packages today?