Creates a variable filled with a scalar value. Args: dims: A variable. Must be 1-D Halide_Type_Int. Represents the shape of the output variable. value: A variable. 0-D (scalar). Value to fill the returned variable. Returns: A variable. Has the same type as value. */
| 856 | A variable. Has the same type as value. |
| 857 | */ |
| 858 | VARP _Fill(VARP dims, VARP value) { |
| 859 | std::unique_ptr<OpT> fill(new OpT); |
| 860 | fill->type = OpType_Fill; |
| 861 | fill->main.type = OpParameter_Fill; |
| 862 | fill->main.value = new FillT; |
| 863 | return (Variable::create(Expr::create(std::move(fill), {dims, value}))); |
| 864 | } |
| 865 | /*Constructs a variable by tiling a given variable. |
| 866 | Args: |
| 867 | input: A variable. 1-D or higher. |