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

Function seqElements

src/backend/common/dim4.cpp:115–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115size_t seqElements(const af_seq& seq) {
116 size_t out = 0;
117 if (seq.step > DBL_MIN) {
118 out = ((seq.end - seq.begin) / abs(seq.step)) + 1;
119 } else if (seq.step < -DBL_MIN) {
120 out = ((seq.begin - seq.end) / abs(seq.step)) + 1;
121 } else {
122 out = numeric_limits<size_t>::max();
123 }
124
125 return out;
126}
127
128dim_t calcDim(const af_seq& seq, const dim_t& parentDim) {
129 dim_t outDim = 1;

Callers 1

calcDimFunction · 0.85

Calls 2

absFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected