Compute Library
 23.05
NDCoordinate< N > Class Template Reference

NDCoordinate builds upon a range, but specifies a starting position in addition to a size which it inherits from NDRange. More...

#include <ndrange.hpp>

Collaboration diagram for NDCoordinate< N >:
[legend]

Public Member Functions

NDCoordinateoperator= (const NDCoordinate &rhs)=default
 
 NDCoordinate (const NDCoordinate &rhs)=default
 
 NDCoordinate (const std::initializer_list< std::pair< int_t, int_t >> &list)
 
int_t get_position (int_t d) const
 
void set_position (int_t d, int_t v)
 
int_t get_position_end (int_t d) const
 
- Public Member Functions inherited from NDRange< N >
NDRangeoperator= (const NDRange &rhs)=default
 
 NDRange (const NDRange &rhs)=default
 
 NDRange (T... ts)
 
 NDRange (const std::array< unsigned int, D > &n)
 
NDRangeIterator iterator (unsigned int start, unsigned int end) const
 
unsigned int total_size () const
 
unsigned int get_size (unsigned int v) const
 

Detailed Description

template<unsigned int N>
class arm_gemm::NDCoordinate< N >

NDCoordinate builds upon a range, but specifies a starting position in addition to a size which it inherits from NDRange.

Definition at line 151 of file ndrange.hpp.

Constructor & Destructor Documentation

◆ NDCoordinate() [1/2]

NDCoordinate ( const NDCoordinate< N > &  rhs)
default

◆ NDCoordinate() [2/2]

NDCoordinate ( const std::initializer_list< std::pair< int_t, int_t >> &  list)
inline

Definition at line 161 of file ndrange.hpp.

162  {
163  std::array<int_t, N> sizes{};
164 
165  std::size_t i = 0;
166  for(auto &p : list)
167  {
168  m_positions[i] = p.first;
169  sizes[i++] = p.second;
170  }
171 
172  //update the parents sizes
173  static_cast<ndrange_t &>(*this) = ndrange_t(sizes);
174  }

Member Function Documentation

◆ get_position()

◆ get_position_end()

◆ operator=()

NDCoordinate& operator= ( const NDCoordinate< N > &  rhs)
default

◆ set_position()

void set_position ( int_t  d,
int_t  v 
)
inline

Definition at line 183 of file ndrange.hpp.

References N.

184  {
185  assert(d < N);
186 
187  m_positions[d] = v;
188  }
unsigned int N

The documentation for this class was generated from the following file: