Performs a lanewise fold on a vector type
(v: DataValue, ty: types::Type, init: DataValue, op: F)
| 1542 | |
| 1543 | /// Performs a lanewise fold on a vector type |
| 1544 | fn fold_vector<F>(v: DataValue, ty: types::Type, init: DataValue, op: F) -> ValueResult<DataValue> |
| 1545 | where |
| 1546 | F: FnMut(DataValue, DataValue) -> ValueResult<DataValue>, |
| 1547 | { |
| 1548 | extractlanes(&v, ty)?.into_iter().try_fold(init, op) |
| 1549 | } |
| 1550 | |
| 1551 | /// Performs the supplied unary arithmetic `op` on a Value, either Vector or Scalar. |
| 1552 | fn unary_arith<F>(x: DataValue, vector_type: types::Type, op: F) -> ValueResult<DataValue> |
no test coverage detected