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

Function FromFortranOrder

dali/util/numpy.cc:276–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void FromFortranOrder(SampleView<CPUBackend> output, ConstSampleView<CPUBackend> input) {
277 int n_dims = input.shape().sample_dim();
278 SmallVector<int, 6> perm;
279 perm.resize(n_dims);
280 for (int i = 0; i < n_dims; ++i)
281 perm[i] = n_dims - i - 1;
282 TYPE_SWITCH(input.type(), type2id, T, NUMPY_ALLOWED_TYPES, (
283 kernels::TransposeGrouped(view<T>(output), view<const T>(input), make_cspan(perm));
284 ), DALI_FAIL(make_string("Unsupported input type: ", input.type()))); // NOLINT
285}
286
287DALIDataType HeaderData::type() const {
288 return type_info ? type_info->id() : DALI_NO_TYPE;

Callers 3

SlicePermuteHelperFunction · 0.85
RunDecodingFunction · 0.85
ReadTensorFunction · 0.85

Calls 7

TransposeGroupedFunction · 0.85
make_cspanFunction · 0.85
make_stringFunction · 0.50
sample_dimMethod · 0.45
shapeMethod · 0.45
resizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected