Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18c6085

Browse files
committed
SIMD: Fix compile error by using MaxLanes instead of Lanes for array size
Replace hn::Lanes(f64) with hn::MaxLanes(f64) when defining the index array size to fix error C2131: "expression did not evaluate to a constant". This error occurs because Lanes() isn't always constexpr compatible, especially with scalable vector extensions. MaxLanes() provides a compile-time constant value suitable for static array allocation.
1 parente494878 commit18c6085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎numpy/_core/src/umath/loops_hyperbolic.dispatch.cpp.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ simd_tanh_f64(const double *src, npy_intp ssrc, double *dst, npy_intp sdst, npy_
393393
vec_f64 b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16;
394394
if constexpr(hn::MaxLanes(f64) == 2){
395395
vec_f64 e0e1_0, e0e1_1;
396-
uint64_t index[hn::Lanes(f64)];
396+
uint64_t index[hn::MaxLanes(f64)];
397397
hn::StoreU(idx, u64, index);
398398

399399
/**begin repeat

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp