Skip to content

Commit 1f0e042

Browse files
committed
Use latest miniexpr and _global_linear_idx -> _flat_idx
1 parent 0ef157b commit 1f0e042

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ endif()
6363

6464
FetchContent_Declare(miniexpr
6565
GIT_REPOSITORY https://github.com/Blosc/miniexpr.git
66-
GIT_TAG 06ee29cdc9c5cfbf22f9a6fedcdaf46af1fec373
66+
GIT_TAG 320240a849e185c84114501200052bfeb8d66f2b
6767
# SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../miniexpr
6868
)
6969
FetchContent_MakeAvailable(miniexpr)

bench/ndarray/linear-constructor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@blosc2.dsl_kernel
1919
def kernel_ramp(start):
20-
return start + _global_linear_idx # noqa: F821 # DSL index/shape symbols resolved by miniexpr
20+
return start + _flat_idx # noqa: F821 # DSL index/shape symbols resolved by miniexpr
2121

2222
t0 = time()
2323
npa = np.arange(np.prod(shape), dtype=dtype).reshape(shape)

bench/ndarray/sum-linear-idx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#######################################################################
77

88
# Compare reduction performance on DSL kernels.
9-
# This uses the special _global_linear_idx var.
9+
# This uses the special _flat_idx var.
1010

1111
from time import time
1212
import numpy as np
@@ -19,7 +19,7 @@
1919
@blosc2.dsl_kernel
2020
def kernel_ramp():
2121
# return _i0 * _n1 + _i1 # noqa: F821 # DSL index/shape symbols resolved by miniexpr
22-
return _global_linear_idx # noqa: F821 # DSL index/shape symbols resolved by miniexpr
22+
return _flat_idx # noqa: F821 # DSL index/shape symbols resolved by miniexpr
2323

2424
print(kernel_ramp.dsl_source)
2525
a = blosc2.lazyudf(kernel_ramp, (), dtype=dtype, shape=shape)

0 commit comments

Comments
 (0)