MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / ndims

Method ndims

src/backend/common/dim4.cpp:48–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46dim_t dim4::elements() { return static_cast<const dim4&>(*this).elements(); }
47
48dim_t dim4::ndims() const {
49 dim_t num = elements();
50 if (num == 0) { return 0; }
51 if (num == 1) { return 1; }
52
53 if (dims[3] != 1) { return 4; }
54 if (dims[2] != 1) { return 3; }
55 if (dims[1] != 1) { return 2; }
56
57 return 1;
58}
59
60dim_t dim4::ndims() { return static_cast<const dim4&>(*this).ndims(); }
61

Callers 15

approx1TestFunction · 0.45
approx1CubicTestFunction · 0.45
approx1ArgsTestFunction · 0.45
approx1ArgsTestPrecisionFunction · 0.45
setTestDataMethod · 0.45
testSpclOutArrayMethod · 0.45
SetUpMethod · 0.45
hammingMatcherTestFunction · 0.45
transformCoordinatesTestFunction · 0.45
reorderTestFunction · 0.45
TYPED_TESTFunction · 0.45

Calls

no outgoing calls

Tested by 1

conv_imageFunction · 0.36