| 251 | |
| 252 | DALI_HOST_DEV |
| 253 | TensorLayout sample_layout() const { |
| 254 | if (empty()) |
| 255 | return {}; |
| 256 | #ifdef __CUDA_ARCH__ |
| 257 | assert(data_[0] == 'N'); |
| 258 | #else |
| 259 | if (data_[0] != 'N') |
| 260 | throw std::logic_error("This is not a multi-sample layout: \"" + str() + "\""); |
| 261 | #endif |
| 262 | return sub(1); |
| 263 | } |
| 264 | |
| 265 | DALI_HOST_DEV |
| 266 | constexpr TensorLayout sub(int start, int n = -1) const noexcept { |