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

Function FillTensorList

dali/c_api_2/data_objects_test.cc:587–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585
586template <typename T>
587void FillTensorList(dali::TensorList<dali::CPUBackend> &tl, T start) {
588 auto view = dali::view<T>(tl);
589 T value = start;
590 for (int i = 0; i < view.num_samples(); i++) {
591 auto tv = view[i];
592 for (int64_t j = 0, n = tv.num_elements(); j < n; j++)
593 tv.data[j] = value++;
594 }
595}
596
597template <typename T>
598void FillTensorList(dali::TensorList<dali::GPUBackend> &tl, T start) {

Callers

nothing calls this directly

Calls 11

CUDA_CALLFunction · 0.85
daliTensorListResizeFunction · 0.85
num_samplesMethod · 0.45
num_elementsMethod · 0.45
ResizeMethod · 0.45
shapeMethod · 0.45
typeMethod · 0.45
CopyMethod · 0.45
sample_dimMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected