| 46 | dim_t dim4::elements() { return static_cast<const dim4&>(*this).elements(); } |
| 47 | |
| 48 | dim_t dim4::ndims() const { |
| 49 | dim_t num = elements(); |
| 50 | if (num == 0) { return 0; } |
| 51 | if (num == 1) { return 1; } |
| 52 | |
| 53 | if (dims[3] != 1) { return 4; } |
| 54 | if (dims[2] != 1) { return 3; } |
| 55 | if (dims[1] != 1) { return 2; } |
| 56 | |
| 57 | return 1; |
| 58 | } |
| 59 | |
| 60 | dim_t dim4::ndims() { return static_cast<const dim4&>(*this).ndims(); } |
| 61 |
no outgoing calls