Returns the rank of a variable. Returns a 0-D int32 variable representing the rank of input. Note: The rank of a variable is not the same as the rank of a matrix. It's the number of indices required to uniquely select each element of the variable. It's also known as "order", "degree", or "ndims." Args: input: A variable. Returns: A 0-D variable of type Halide_Type_Int */
| 1303 | A 0-D variable of type Halide_Type_Int |
| 1304 | */ |
| 1305 | VARP _Rank(VARP input) { |
| 1306 | std::unique_ptr<OpT> op(new OpT); |
| 1307 | op->type = OpType_Rank; |
| 1308 | op->main.type = OpParameter_NONE; |
| 1309 | op->main.value = nullptr; |
| 1310 | return Variable::create(Expr::create(std::move(op), {input})); |
| 1311 | } |
| 1312 | /*Creates a sequence of numbers. |
| 1313 | Args: |
| 1314 | start: A 0-D variable (scalar). |