namespace dk { ///-------------------------------------------------------------------------- ///-------------------------------------------------------------------------- template Tyler::Tyler (const coords& parSize, const coords& parTileSize) : m_size(parSize), m_tilesize(parTileSize) { assert(m_size.x() > 0 and m_size.y() > 0); } ///-------------------------------------------------------------------------- ///-------------------------------------------------------------------------- template typename Tyler::coords::value_type Tyler::tiles_count() const { typename coords::value_type retval = 1; for (size_t d = 0; d < D; ++d) { retval *= m_size[d]; } return retval; } ///-------------------------------------------------------------------------- ///-------------------------------------------------------------------------- template template size_t Tyler::push_layer (typename Layer::streamer_type&& parStreamer) { const size_t retval = m_layers.size(); m_layers.push_back(LayerPtr(new Layer(m_size, m_tilesize, coords(1), std::move(parStreamer)))); return retval; } ///-------------------------------------------------------------------------- ///-------------------------------------------------------------------------- template template size_t Tyler::push_layer (typename Layer::streamer_type&& parStreamer, const coords& parSubdiv) { const size_t retval = m_layers.size(); m_layers.push_back(LayerPtr(new Layer(m_size * parSubdiv, m_tilesize / parSubdiv, m_tilesize, std::move(parStreamer)))); return retval; } } //namespace dk