MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / index

Method index

src/shape.cpp:441–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441std::size_t shape::index(std::initializer_list<std::size_t> l) const
442{
443 if(this->dynamic())
444 {
445 MIGRAPHX_THROW("SHAPE: index() called on dynamic shape");
446 }
447 assert(l.size() <= this->lens().size());
448 assert(this->lens().size() == this->strides().size());
449 return std::inner_product(l.begin(), l.end(), this->strides().begin(), std::size_t{0});
450}
451
452std::size_t shape::index(const std::vector<std::size_t>& l) const
453{

Callers 8

parseFunction · 0.45
read_outputsFunction · 0.45
preprocessMethod · 0.45
verify_shapeFunction · 0.45
TEST_CASEFunction · 0.45
applyMethod · 0.45
elementMethod · 0.45

Calls 8

dynamicMethod · 0.95
standardMethod · 0.95
inner_productFunction · 0.85
lensMethod · 0.80
get_indexMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 2

read_outputsFunction · 0.36
TEST_CASEFunction · 0.36