weld
weld copied to clipboard
Pow on types other than float
There's a comment in the source saying pow is only supported for 'floats'. I presume support for integers would also be possible?
EDIT: The following is actually incorrect Weld code.
Could not compile function |_inp0: vec[f64]|
result(
for(_inp0,
appender[f64],
|b: appender[f64], i: i64, n: f64|
merge(b, pow(n, 2))
)
): b'Type mismatch: expected i32 but got f64'
The following clearly work:
|_inp0: vec[f64]|
result(
for(_inp0,
appender[f64],
|b: appender[f64], i: i64, n: f64|
merge(b, pow(n, 2.0))
)
)
or:
|_inp0: vec[f32]|
result(
for(_inp0,
appender[f32],
|b: appender[f32], i: i64, n: f32|
merge(b, pow(n, 2f))
)
)