Skip to content

Commit 399e499

Browse files
committed
Merge branch '3.0'
2 parents 35f8b14 + 78de894 commit 399e499

File tree

125 files changed

+5899
-13173
lines changed

Some content is hidden

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

125 files changed

+5899
-13173
lines changed

.github/workflows/ci-ext.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ jobs:
2121
strategy:
2222
matrix:
2323
image:
24-
- php:7.2-cli
25-
- php:7.2-cli-alpine
26-
- php:7.3-cli
27-
- php:7.3-cli-alpine
2824
- php:7.4-cli
2925
- php:7.4-cli-alpine
26+
- php:8.0-cli
27+
- php:8.0-cli-alpine
3028
name: Image ${{ matrix.image }}
3129
runs-on: ubuntu-latest
3230
steps:

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
operating-system: [windows-latest, ubuntu-latest, macos-latest]
12-
php-versions: ['7.2', '7.3', '7.4']
12+
php-versions: ['7.4']
1313

1414
steps:
1515
- name: Checkout
@@ -19,6 +19,8 @@ jobs:
1919
uses: shivammathur/setup-php@v2
2020
with:
2121
php-version: ${{ matrix.php-versions }}
22+
tools: pecl
23+
extensions: fileinfo
2224
ini-values: memory_limit=-1
2325

2426
- name: Validate composer.json

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
- 3.0.0-beta
2+
- Add support for PHP 8.0 in the extension
3+
- Drop extension support for PHP 7.2 and 7.3
4+
- Tensors only compute floating point operations
5+
- Remove dependency on JAMA library
6+
- Remove previously deprecated items
7+
- Matrix returns vector on row access
8+
- Added Algebraic and Special function interfaces
9+
110
- 2.2.3
211
- Remove dependency on pthreads
312

benchmarks/LinearAlgebra/SolveBench.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

benchmarks/Structural/InsertMatrixBench.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

benchmarks/Structural/SubMatrixBench.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

build-ext

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33

44
const CONFIG_M4_PATH = './ext/config.m4';
55

6-
const BUILDDIR_MATCH = "PHP_ADD_BUILD_DIR([\$ext_builddir/tensor/])\n";
7-
const BUILDDIR_PATCH = <<<'EOT'
8-
9-
PHP_ADD_BUILD_DIR([$ext_builddir/tensor/decompositions/])
10-
PHP_ADD_BUILD_DIR([$ext_builddir/tensor/exceptions/])
11-
PHP_ADD_BUILD_DIR([$ext_builddir/tensor/reductions/])
12-
13-
EOT
14-
;
156
const EXECINFO_MATCH = "PHP_SUBST(TENSOR_SHARED_LIBADD)\n";
167
const EXECINFO_PATCH = <<<'EOT'
178
@@ -26,37 +17,36 @@ EOT
2617
chdir(__DIR__);
2718

2819
echo 'Reading config.m4 file... ';
20+
2921
$configM4Contents = file_get_contents(CONFIG_M4_PATH);
22+
3023
if (!$configM4Contents) {
3124
fwrite(STDERR, "Failed to read the config.m4 file!\n");
25+
3226
exit(1);
3327
}
3428
echo "done.\n";
3529

36-
echo 'Applying build dir patch... ';
37-
if (strpos($configM4Contents, BUILDDIR_MATCH) === false) {
38-
echo "not needed.\n";
39-
} elseif (strpos($configM4Contents, trim(BUILDDIR_PATCH)) !== false) {
40-
echo "already applyed.\n";
41-
} else {
42-
$configM4Contents = str_replace(BUILDDIR_MATCH, BUILDDIR_MATCH . BUILDDIR_PATCH, $configM4Contents);
43-
echo "done.\n";
44-
}
45-
4630
echo 'Applying libexec patch...';
31+
4732
if (strpos($configM4Contents, EXECINFO_MATCH) === false) {
4833
fwrite(STDERR, "patch entrypoint not found!\n");
34+
4935
exit(1);
5036
} elseif (strpos($configM4Contents, trim(EXECINFO_PATCH)) !== false) {
51-
echo "already applyed.\n";
37+
echo "already applied.\n";
5238
} else {
5339
$configM4Contents = str_replace(EXECINFO_MATCH, EXECINFO_MATCH . EXECINFO_PATCH, $configM4Contents);
40+
5441
echo "done.\n";
5542
}
5643

5744
echo 'Saving config.m4 file... ';
45+
5846
if (!file_put_contents(CONFIG_M4_PATH, $configM4Contents)) {
5947
fwrite(STDERR, "Failed to write the config.m4 file\n");
48+
6049
exit(1);
6150
}
51+
6252
echo "done.\n";

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
}
2626
],
2727
"require": {
28-
"php": ">=7.2"
28+
"php": ">=7.4"
2929
},
3030
"require-dev": {
3131
"friendsofphp/php-cs-fixer": "2.18.*",
32-
"phalcon/zephir": "^0.12.20",
33-
"phpbench/phpbench": "0.16.*",
32+
"phalcon/zephir": "^0.13.5",
33+
"phpbench/phpbench": "^1.0",
3434
"phpstan/extension-installer": "^1.0",
3535
"phpstan/phpstan": "0.12.*",
3636
"phpstan/phpstan-phpunit": "0.12.*",
@@ -39,7 +39,6 @@
3939
"autoload": {
4040
"psr-4": {
4141
"Tensor\\": "src/",
42-
"JAMA\\": "lib/JAMA",
4342
"Zephir\\Optimizers\\FunctionCall\\": "optimizers/"
4443
},
4544
"files": [
@@ -68,8 +67,10 @@
6867
],
6968
"clean": "zephir fullclean",
7069
"compile": [
71-
"zephir build --no-dev",
72-
"@php build-ext"
70+
"zephir generate",
71+
"@php build-ext",
72+
"zephir compile --no-dev",
73+
"zephir install"
7374
],
7475
"fix": "php-cs-fixer fix --config=.php_cs.dist",
7576
"test": "phpunit"

config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
"extension-name": "tensor",
55
"description": "A library and extension that provides objects for scientific computing in PHP.",
66
"author": "Andrew DalPino",
7-
"version": "2.2.3",
7+
"version": "3.0.0-beta",
88
"verbose": true,
99
"extra-cflags": "-O3 -ffast-math",
1010
"extra-libs": "-lopenblas -llapacke -lgfortran",
1111
"extra-sources": [
12-
"include/indexing.c",
1312
"include/arithmetic.c",
1413
"include/comparison.c",
1514
"include/linear_algebra.c",

docs/linear-algebra.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)