MCPcopy Create free account
hub / github.com/NVIDIA/DALI / sample_layout

Method sample_layout

include/dali/core/tensor_layout.h:253–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

TESTFunction · 0.80

Calls 1

emptyFunction · 0.85

Tested by 1

TESTFunction · 0.64