|
16 | 16 |
|
17 | 17 | //================================================================================ |
18 | 18 | // this file has been auto-generated, do not modify its contents! |
19 | | -// date: 2026-06-08 12:00:54.978716 |
20 | | -// git hash: d47bafcb5d8554b5eb1a4618a883f85d6411b24e |
| 19 | +// date: 2026-06-18 10:19:56.606511 |
| 20 | +// git hash: 3810ae656e2763c17aa31fa5d86fb24b7c3200ef |
21 | 21 | //================================================================================ |
22 | 22 |
|
23 | 23 | #ifndef KERNEL_FLOAT_MACROS_H |
@@ -1355,17 +1355,26 @@ KERNEL_FLOAT_DEFINE_UNARY_OP(logical_not, !, (ops::cast<bool, T> {}(!ops::cast<T |
1355 | 1355 | }; \ |
1356 | 1356 | \ |
1357 | 1357 | template<> \ |
| 1358 | + struct NAME<float> { \ |
| 1359 | + KERNEL_FLOAT_INLINE float operator()(float input) { \ |
| 1360 | + return ops::cast<decltype(EXPR_F32), float> {}(EXPR_F32); \ |
| 1361 | + } \ |
| 1362 | + }; \ |
| 1363 | + \ |
| 1364 | + template<> \ |
1358 | 1365 | struct NAME<double> { \ |
1359 | 1366 | KERNEL_FLOAT_INLINE double operator()(double input) { \ |
1360 | 1367 | return double(EXPR_F64); \ |
1361 | 1368 | } \ |
1362 | 1369 | }; \ |
1363 | 1370 | } |
1364 | 1371 |
|
1365 | | -#define KERNEL_FLOAT_DEFINE_UNARY_MATH(NAME) \ |
| 1372 | +#define KERNEL_FLOAT_DEFINE_UNARY_MATH_FUN(NAME, FUN_F64, FUN_F32) \ |
1366 | 1373 | KERNEL_FLOAT_DEFINE_UNARY_STRUCT(NAME, ::NAME(input), ::NAME(input)) \ |
1367 | 1374 | KERNEL_FLOAT_DEFINE_UNARY_FUN(NAME) |
1368 | 1375 |
|
| 1376 | +#define KERNEL_FLOAT_DEFINE_UNARY_MATH(NAME) KERNEL_FLOAT_DEFINE_UNARY_MATH_FUN(NAME, NAME, NAME##f) |
| 1377 | + |
1369 | 1378 | KERNEL_FLOAT_DEFINE_UNARY_MATH(sin) |
1370 | 1379 | KERNEL_FLOAT_DEFINE_UNARY_MATH(cos) |
1371 | 1380 | KERNEL_FLOAT_DEFINE_UNARY_MATH(tan) |
@@ -3427,7 +3436,26 @@ struct is_vector_impl<vector_ref<T, N, Policy>> { |
3427 | 3436 | }; |
3428 | 3437 |
|
3429 | 3438 | /** |
3430 | | - * Creates a `vector_ptr<T, N, U>` from a raw pointer `U*`. |
| 3439 | + * Creates a `vector_ptr` from a raw pointer `U*`. |
| 3440 | + * |
| 3441 | + * This name resolves to one of four overloads depending on how it is called: |
| 3442 | + * |
| 3443 | + * 1. No template arguments: `make_vec_ptr(ptr)`. |
| 3444 | + * Returns `vec_ptr<U, 1, U, KERNEL_FLOAT_MAX_ALIGNMENT>`. |
| 3445 | + * The pointer is assumed to be aligned to `KERNEL_FLOAT_MAX_ALIGNMENT`. |
| 3446 | + * |
| 3447 | + * 2. Integer template argument: `make_vec_ptr<N>(ptr)`. |
| 3448 | + * Returns `vec_ptr<U, N, U, N>`. |
| 3449 | + * The pointer is assumed to be aligned for `N` consecutive elements. |
| 3450 | + * |
| 3451 | + * 3. Type template argument: `make_vec_ptr<T>(ptr)`. |
| 3452 | + * Returns `vector_ptr<T, 1, U, 1>`. |
| 3453 | + * Elements are stored as `U` but viewed as `T`, with element-aligned access. |
| 3454 | + * |
| 3455 | + * 4. Type and size template arguments: `make_vec_ptr<T, N>(ptr)`. |
| 3456 | + * Returns `vector_ptr<T, N, U, N>`. |
| 3457 | + * Elements are stored as `U` but viewed as `T`, assuming alignment for `N` elements. |
| 3458 | + * |
3431 | 3459 | * |
3432 | 3460 | * @tparam T The type of the elements as viewed by the user. |
3433 | 3461 | * @tparam N The vector size in number of elements. |
|
0 commit comments