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

Function getOutDims

src/backend/common/ArrayInfo.cpp:167–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165bool ArrayInfo::isSparse() const { return is_sparse; }
166
167dim4 getOutDims(const dim4 &ldims, const dim4 &rdims, bool batchMode) {
168 if (!batchMode) {
169 DIM_ASSERT(1, ldims == rdims);
170 return ldims;
171 }
172
173 dim_t odims[] = {1, 1, 1, 1};
174 for (int i = 0; i < 4; i++) {
175 DIM_ASSERT(1, ldims[i] == rdims[i] || ldims[i] == 1 || rdims[i] == 1);
176 odims[i] = std::max(ldims[i], rdims[i]);
177 }
178
179 return dim4(4, odims);
180}
181
182using std::vector;
183

Callers 8

af_arithFunction · 0.85
af_arith_realFunction · 0.85
af_atan2Function · 0.85
af_hypotFunction · 0.85
af_logicFunction · 0.85
af_bitwiseFunction · 0.85
af_clampFunction · 0.85
af_cplx2Function · 0.85

Calls 2

maxFunction · 0.50
dim4Class · 0.50

Tested by

no test coverage detected