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

Function calcStrides

src/backend/common/ArrayInfo.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using af::dim4;
22
23dim4 calcStrides(const dim4 &parentDim) {
24 dim4 out(1, 1, 1, 1);
25 dim_t *out_dims = out.get();
26 const dim_t *parent_dims = parentDim.get();
27
28 for (dim_t i = 1; i < 4; i++) {
29 out_dims[i] = out_dims[i - 1] * parent_dims[i - 1];
30 }
31
32 return out;
33}
34
35ArrayInfo::ArrayInfo(unsigned id, af::dim4 size, dim_t offset_, af::dim4 stride,
36 af_dtype af_type)

Callers 14

modDimsMethod · 0.70
toStrideFunction · 0.70
resetInfoMethod · 0.70
SparseArrayBaseMethod · 0.70
evalNodesFunction · 0.50
ArrayMethod · 0.50
evalNodesFunction · 0.50
ArrayMethod · 0.50
fftconvolveFunction · 0.50
ArrayMethod · 0.50
copyDataFunction · 0.50
setShapeMethod · 0.50

Calls 1

getMethod · 0.45

Tested by

no test coverage detected