DASH
0.3.0
|
Take a generic pattern instance and visualize it as an SVG image. More...
#include <PatternVisualizer.h>
Public Member Functions | |
PatternVisualizer (const PatternT &pat, std::string title="", std::string descr="") | |
Constructs the Pattern Visualizer with a pattern instance. More... | |
PatternVisualizer (const self_t &other)=delete | |
void | set_description (const std::string &str) |
Sets a description for the pattern. More... | |
void | set_title (const std::string &str) |
Sets the title displayed above the pattern. More... | |
void | draw_pattern (std::ostream &os, bool blocked_display=false, std::array< index_t, PatternT::ndim()> coords={}, int dimx=1, int dimy=0) |
Outputs the pattern as a svg over the given output stream. More... | |
void | draw_pane (std::ostream &os, bool blocked_display, const sizes &sz, std::array< index_t, PatternT::ndim()> coords, int dimx, int dimy) |
Draws a pane (svg group) containing axes, key, tiles/blocks For the non blocked display (tiles) the local blocks and the memory layout gets drawn, too. More... | |
void | draw_axes (std::ostream &os, const sizes &sz, int dimx, int dimy, int offsx=0, int offsy=0) |
Draws the axes labeled with their dedicated dimension. More... | |
void | draw_key (std::ostream &os, const sizes &sz, int offsx=0, int offsy=0) |
Draws a list of units with their matching color. More... | |
void | draw_tiles (std::ostream &os, const sizes &sz, std::array< index_t, PatternT::ndim()> coords, int dimx, int dimy) |
Draws the seperate tiles of the pattern. More... | |
void | draw_blocks (std::ostream &os, const sizes &sz, int dimx, int dimy) |
Draws the blocks of the pattern. More... | |
void | draw_local_blocks (std::ostream &os, const sizes &sz, std::array< index_t, PatternT::ndim()> coords, int dimx, int dimy) |
Draws the local blocks of the current unit (usually unit 0) More... | |
void | draw_local_memlayout (std::ostream &os, const sizes &sz, int dimx, int dimy) |
Draws the memory layout for the current unit (usually unit 0) More... | |
Take a generic pattern instance and visualize it as an SVG image.
The visualization is limited to two dimensions at the moment, but for higher-dimensional patterns any two dimensions can be specified for visualization.
Definition at line 30 of file PatternVisualizer.h.
|
inline |
Constructs the Pattern Visualizer with a pattern instance.
The pattern instance is constant. For a different pattern a new PatternVisualizer has to be constructed.
title | An optional title |
descr | An optional describtion, currently not used |
Definition at line 83 of file PatternVisualizer.h.
|
inline |
Draws the axes labeled with their dedicated dimension.
Definition at line 208 of file PatternVisualizer.h.
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws the blocks of the pattern.
Definition at line 326 of file PatternVisualizer.h.
References dash::block().
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws a list of units with their matching color.
Definition at line 266 of file PatternVisualizer.h.
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws the local blocks of the current unit (usually unit 0)
Definition at line 358 of file PatternVisualizer.h.
References dash::block().
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws the memory layout for the current unit (usually unit 0)
Definition at line 399 of file PatternVisualizer.h.
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws a pane (svg group) containing axes, key, tiles/blocks For the non blocked display (tiles) the local blocks and the memory layout gets drawn, too.
Definition at line 184 of file PatternVisualizer.h.
References dash::tools::PatternVisualizer< PatternT >::draw_axes(), dash::tools::PatternVisualizer< PatternT >::draw_blocks(), dash::tools::PatternVisualizer< PatternT >::draw_key(), dash::tools::PatternVisualizer< PatternT >::draw_local_blocks(), dash::tools::PatternVisualizer< PatternT >::draw_local_memlayout(), and dash::tools::PatternVisualizer< PatternT >::draw_tiles().
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pattern().
|
inline |
Outputs the pattern as a svg over the given output stream.
This method should only be called by a single unit.
blocked_display | If this option is false every tile of the pattern is displayed seperate. If this option is true only the blocks (group of elements) get displayed. |
coords | For higher dimensional patterns, defines which slice gets displayed |
dimx | Defines which dimension gets displayed in x-direction |
dimy | Defines which dimension gets displayed in y-direction |
Definition at line 121 of file PatternVisualizer.h.
References dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Draws the seperate tiles of the pattern.
Definition at line 294 of file PatternVisualizer.h.
Referenced by dash::tools::PatternVisualizer< PatternT >::draw_pane().
|
inline |
Sets a description for the pattern.
Currently not used.
Definition at line 107 of file PatternVisualizer.h.
|
inline |
Sets the title displayed above the pattern.
Definition at line 113 of file PatternVisualizer.h.