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

Method make_meta

dali/python/nvidia/dali/_multiproc/shared_batch.py:246–250  ·  view source on GitHub ↗
(np_array)

Source from the content-addressed store, hash-verified

244 data_size = 0
245
246 def make_meta(np_array):
247 nonlocal data_size
248 offset = _align_up(data_size, self.SAMPLE_ALIGNMENT)
249 data_size = offset + np_array.nbytes
250 return SampleMeta(offset, np_array.shape, np_array.dtype, np_array.nbytes)
251
252 meta = [_apply_to_sample(make_meta, sample) for sample in samples]
253 return meta, data_size

Callers

nothing calls this directly

Calls 2

_align_upFunction · 0.85
SampleMetaClass · 0.85

Tested by

no test coverage detected