cubecl_core/frontend/operation/
fma.rs1use crate::{
2 ir::{Arithmetic, ExpandElement, FmaOperator, Instruction, Scope},
3 prelude::CubePrimitive,
4 unexpanded,
5};
6
7#[allow(unused_variables)]
9pub fn fma<C: CubePrimitive>(a: C, b: C, c: C) -> C {
10 unexpanded!()
11}
12
13#[allow(unused_variables)]
15pub fn fma_expand<C: CubePrimitive>(
16 scope: &mut Scope,
17 a: ExpandElement,
18 b: ExpandElement,
19 c: ExpandElement,
20) -> ExpandElement {
21 let output = scope.create_local(a.item);
22
23 let out = *output;
24 let a = *a;
25 let b = *b;
26 let c = *c;
27
28 scope.register(Instruction::new(
29 Arithmetic::Fma(FmaOperator { a, b, c }),
30 out,
31 ));
32
33 output
34}