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

Function toDims

src/backend/common/ArrayInfo.cpp:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182using std::vector;
183
184dim4 toDims(const vector<af_seq> &seqs, const dim4 &parentDims) {
185 dim4 outDims(1, 1, 1, 1);
186 for (unsigned i = 0; i < seqs.size(); i++) {
187 outDims[i] = af::calcDim(seqs[i], parentDims[i]);
188 if (outDims[i] > parentDims[i]) {
189 AF_ERROR("Size mismatch between input and output", AF_ERR_SIZE);
190 }
191 }
192 return outDims;
193}
194
195dim4 toOffset(const vector<af_seq> &seqs, const dim4 &parentDims) {
196 dim4 outOffsets(0, 0, 0, 0);

Callers 10

indexFunction · 0.85
createSubArrayFunction · 0.85
indexFunction · 0.85
createSubArrayFunction · 0.85
indexFunction · 0.85
createSubArrayFunction · 0.85
indexFunction · 0.85
createSubArrayFunction · 0.85
assignFunction · 0.85
af_assign_genFunction · 0.85

Calls 1

calcDimFunction · 0.85

Tested by

no test coverage detected