MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / NDRange

Class NDRange

src/cpu/kernels/assembly/arm_gemm/ndrange.hpp:34–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32{
33template <unsigned int D>
34class NDRange
35{
36private:
37 std::array<unsigned int, D> m_sizes{};
38 std::array<unsigned int, D> m_totalsizes{};
39
40 class NDRangeIterator
41 {
42 private:
43 const NDRange &m_parent;
44 unsigned int m_pos = 0;
45 unsigned int m_end = 0;
46
47 public:
48 NDRangeIterator(const NDRange &p, unsigned int s, unsigned int e)
49 : m_parent(p), m_pos(s), m_end(e)
50 {
51 }
52
53 bool done() const
54 {
55 return (m_pos >= m_end);
56 }
57
58 unsigned int dim(unsigned int d) const
59 {
60 unsigned int r = m_pos;
61
62 if(d < (D - 1))
63 {
64 r %= m_parent.m_totalsizes[d];
65 }
66
67 if(d > 0)
68 {
69 r /= m_parent.m_totalsizes[d - 1];
70 }
71
72 return r;
73 }
74
75 bool next_dim0()
76 {
77 m_pos++;
78
79 return !done();
80 }
81
82 bool next_dim1()
83 {
84 m_pos += m_parent.m_sizes[0] - dim(0);
85
86 return !done();
87 }
88
89 unsigned int dim0_max() const
90 {
91 unsigned int offset = std::min(m_end - m_pos, m_parent.m_sizes[0] - dim(0));

Callers 11

configureMethod · 0.50
run_opMethod · 0.50
run_opMethod · 0.50
run_opMethod · 0.50
run_opMethod · 0.50
default_ndrangeMethod · 0.50
get_gemm_lwsFunction · 0.50
get_winograd_lwsFunction · 0.50
get_direct_lwsFunction · 0.50
get_dwc_lwsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected