File tree 2 files changed +15
-6
lines changed
2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ KERNEL_FLOAT_TYPE_ALIAS(f64x, double)
61
61
KERNEL_FLOAT_TYPE_ALIAS (float64x, double )
62
62
63
63
#if KERNEL_FLOAT_FP16_AVAILABLE
64
- KERNEL_FLOAT_TYPE_ALIAS (half, __half )
65
- KERNEL_FLOAT_TYPE_ALIAS(f16x, __half )
66
- KERNEL_FLOAT_TYPE_ALIAS(float16x, __half )
64
+ KERNEL_FLOAT_TYPE_ALIAS (half, half_t )
65
+ KERNEL_FLOAT_TYPE_ALIAS(f16x, half_t )
66
+ KERNEL_FLOAT_TYPE_ALIAS(float16x, half_t )
67
67
#endif
68
68
69
69
#if KERNEL_FLOAT_BF16_AVAILABLE
70
- KERNEL_FLOAT_TYPE_ALIAS (bfloat16x, __bfloat16 )
71
- KERNEL_FLOAT_TYPE_ALIAS(bf16x, __bfloat16 )
70
+ KERNEL_FLOAT_TYPE_ALIAS (bfloat16x, bfloat16_t )
71
+ KERNEL_FLOAT_TYPE_ALIAS(bf16x, bfloat16_t )
72
72
#endif
73
73
74
74
#if KERNEL_FLOAT_BF8_AVAILABLE
Original file line number Diff line number Diff line change @@ -287,11 +287,20 @@ struct vector: public S {
287
287
}
288
288
289
289
/* *
290
- * Returns the result of `* this + lhs * rhs`.
290
+ * Returns the result of `this + lhs * rhs`.
291
291
*
292
292
* The operation is performed using a single `kernel_float::fma` call, which may be faster then perform
293
293
* the addition and multiplication separately.
294
294
*/
295
+ template <
296
+ typename L,
297
+ typename R,
298
+ typename T2 = promote_t <T, vector_value_type<L>, vector_value_type<R>>,
299
+ typename E2 = broadcast_extent<E, vector_extent_type<L>, vector_extent_type<R>>>
300
+ KERNEL_FLOAT_INLINE vector<T2, E2 > add_mul (const L& lhs, const R& rhs) const {
301
+ return ::kernel_float::fma (lhs, rhs, *this );
302
+ }
303
+
295
304
template <
296
305
typename L,
297
306
typename R,
You can’t perform that action at this time.
0 commit comments