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

Function ravelIdx

test/arrayfire_test.cpp:524–527  ·  view source on GitHub ↗

Calculate a multi-dimensional coordinates' linearized index

Source from the content-addressed store, hash-verified

522
523// Calculate a multi-dimensional coordinates' linearized index
524dim_t ravelIdx(af::dim4 coords, af::dim4 strides) {
525 return std::inner_product(coords.get(), coords.get() + 4, strides.get(),
526 0LL);
527}
528
529// Calculate a linearized index's multi-dimensonal coordinates in an
530// af::array,

Callers 1

printContextFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected