Skip to content

Commit 6b87fbc

Browse files
committedMar 20, 2024·
version 2.0
1 parent 099615e commit 6b87fbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+15680
-11438
lines changed
 

‎.github/workflows/tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on: [push]
44

55
jobs:
66
no_ext_tests:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88

99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: ['8.0','8.1','8.2']
12+
php: ['8.1','8.2','8.3']
1313

1414
steps:
1515
- name: Checkout codes
16-
uses: "actions/checkout@v2"
16+
uses: "actions/checkout@v4"
1717

1818
- name: Composer
1919
uses: php-actions/composer@v6
@@ -24,6 +24,6 @@ jobs:
2424
uses: php-actions/phpunit@v3
2525
with:
2626
configuration: tests/phpunit.xml
27-
version: 8.5
27+
version: 10.5
2828
php_version: ${{ matrix.php }}
29-
29+
memory_limit: 512M

‎README.md

+50-37
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,65 @@ Rindow Math Matrix is the fundamental package for scientific matrix operation
1010

1111
- A powerful N-dimensional array object
1212
- Sophisticated (broadcasting) functions
13-
- Tools for integrating C/C++ through the "rindow_openblas" extension
13+
- BLAS functions
14+
- Functions useful for machine learning
15+
- Tools for integrating C/C++ through the FFI (OpenBLAS,Rindow-Matlib,CLBlast etc.)
16+
- GPU support on your laptop without n-vidia (OpenCL with Intel,AMD etc.)
1417
- Useful linear algebra and random number capabilities
1518

16-
17-
18-
Please see the documents on [Rindow projects](https://rindow.github.io/) web pages.
19+
Please see the documents on [Rindow mathematics project](https://rindow.github.io/mathematics/) web pages.
1920

2021
Requirements
2122
============
2223

23-
- PHP8.0 or PHP 8.1 or PHP8.2
24-
- PHP7.2 or PHP7.3 or PHP7.4 is not supported in this release. Please use Release 1.1, which supports PHP7.2 or PHP7.3 or PHP7.4 or PHP 8.0.
25-
26-
27-
28-
### Download the rindow_openblas extension
24+
- PHP 8.1 or PHP8.2 or PHP8.3
25+
- PHP7.2, PHP7.3, PHP7.4 and PHP 8.0 are not supported in this release. Please use Release 1.1, which supports them.
2926

27+
### Strong recommend ###
3028
You can perform very fast N-dimensional array operations in conjunction
3129

32-
- [Pre-build binaries](https://github.com/rindow/rindow-openblas/releases)
33-
- [Build from source](https://github.com/rindow/rindow-openblas)
34-
35-
### Acceleration with GPU
36-
37-
You can use GPU acceleration on OpenCL.
38-
30+
- [rindow-math-matrix-matlibffi](https://github.com/rindow/rindow-math-matrix-matlibffi): plug-in drivers for OpenBLAS,Rindow-Matlib,OpenCL,CLBlast for FFI
3931
- Pre-build binaries
40-
- [rindow-opencl](https://github.com/rindow/rindow-opencl/releases)
41-
- [rindow-clblast](https://github.com/rindow/rindow-clblast/releases)
42-
- Build from source
43-
- [rindow-opencl](https://github.com/rindow/rindow-opencl)
44-
- [rindow-clblast](https://github.com/rindow/rindow-clblast)
32+
- [Rindow matlib](https://github.com/rindow/rindow-matlib/releases)
33+
- [OpenBLAS](https://github.com/xianyi/OpenBLAS/releases)
34+
- [CLBlast](https://github.com/CNugteren/CLBlast/releases)
4535

46-
*Note:*
36+
Please see the [rindow-math-matrix-matlibffi](https://github.com/rindow/rindow-math-matrix-matlibffi) to setup plug-in and pre-build binaries.
4737

48-
This OpenCL support extension works better in your environment and helps speed up your laptop environment without n-NVIDIA.
49-
50-
Tested on AMD's Bobcat architecture APU.
51-
52-
In the Windows environment, Integrated GPU usage was more effective than CPU, and it worked comfortably.
53-
54-
However, OLD AMD APU on Linux, libclc used in linux standard mesa-opencl-icd is very buggy and slow. I made a temporary fix to make it look like it would work, but gave up on careful testing.
55-
If you have testable hardware, please test using the proprietary driver.
56-
57-
On the other hand, I tested with Ivy-bridge of Intel CPU and Integrated GPU.
58-
59-
Windows 10 standard OpenCL driver worked fine, but it was very slow and occasionally crashed.
60-
61-
And it worked fine and fast in Ubuntu 20.04 + beignet-opencl-icd environment.
38+
How to Setup
39+
============
40+
Set it up using composer.
41+
42+
```shell
43+
$ composer require rindow-math-matrix
44+
```
45+
46+
You can use it as is, but you will need to speed it up to process at a practical speed.
47+
48+
And then, Set up pre-build binaries for the required high-speed calculation libraries. Click [here](https://github.com/rindow/rindow-math-matrix-matlibffi) for details.
49+
50+
```shell
51+
$ composer require rindow-math-matrix-matlibffi
52+
```
53+
54+
Sample programs
55+
===============
56+
```php
57+
<?php
58+
// sample.php
59+
include __DIR__.'/vendor/autoload.php';
60+
use Rindow\Math\Matrix\MatrixOperator;
61+
62+
$mo = new MatrixOperator();
63+
$a = $mo->array([[1,2],[3,4]]);
64+
$b = $mo->array([[2,3],[4,5]]);
65+
$c = $mo->cross($a,$b);
66+
echo $mo->toString($c,indent:true)."\n";
67+
```
68+
```shell
69+
$ php sample.php
70+
[
71+
[10,13],
72+
[22,29]
73+
]
74+
```

0 commit comments

Comments
 (0)