24#ifndef _R_STATTILING_HH_
25#define _R_STATTILING_HH_
189 void filter(std::vector<r_Access> &patterns)
const;
This class represents an access pattern to a certain object.
Definition stattiling.hh:50
void set_pattern(const r_Minterval &pattern)
Sets the current interval (access pattern)
bool is_near(const r_Access &other, r_ULong border_threshold) const
Checks if a certain access pattern is "close enough" of other throws exception if the domains do not ...
void print_status(std::ostream &os) const
Print object status.
r_Access(const r_Minterval &pattern, r_ULong accesses=1)
Class constructor.
bool operator==(const r_Access &other) const
Operator equal.
bool operator!=(const r_Access &other) const
Operator different.
r_ULong get_times() const
Gets the number of times the pattern was accessed.
void merge_with(const r_Access &other)
Merge this access pattern with another.
const r_Minterval & get_pattern() const
It takes as parameter the interval and the number of times that interval was accessed.
void set_times(r_ULong accesses)
Sets the number of times the pattern was accessed.
The spatial domain of an MDD is represented by an object of class r_Minterval.
Definition minterval.hh:226
Definition stattiling.hh:124
std::vector< r_Minterval > iareas
Current interest areas.
Definition stattiling.hh:201
r_Tiling * clone() const override
This method provides the core funcionality of this class.
std::vector< r_Minterval > compute_tiles(const r_Minterval &obj_domain, r_Bytes cell_size) const override
Decompose an object in tiles.
r_Double interesting_thr
The "interesting area" threshold.
Definition stattiling.hh:195
static const r_Double DEF_INTERESTING_THR
Default threshold for considering an area interesting when tiling.
Definition stattiling.hh:132
r_Area border_thr
The "same border" threshold.
Definition stattiling.hh:198
static const r_Area DEF_BORDER_THR
Default threshold for two borders being considered the same.
Definition stattiling.hh:129
virtual ~r_Stat_Tiling()=default
This is the "Statistic Tiling" class constructor.
void print_status(std::ostream &os) const override
This method gets the threshold at which an area is considered to be interesting.
r_Stat_Tiling(r_Dimension dim, const std::vector< r_Access > &stat_info, r_Bytes ts=r_Tiling::defaultTileSize, r_Area border_threshold=DEF_BORDER_THR, r_Double interesting_threshold=DEF_INTERESTING_THR)
Class constructor.
r_Double get_interesting_threshold() const
This method gets the number of points (pixels/cells) at which two intervals are considered to be the ...
std::vector< r_Access > stat_info
Statistical data.
Definition stattiling.hh:204
virtual const std::vector< r_Minterval > & get_interesting_areas() const
Gets the statistical information.
static const char * description
Definition stattiling.hh:184
void filter(std::vector< r_Access > &patterns) const
Filters and access pattern table (list) throws exception if dimensions of access patterns are not the...
r_Area get_border_threshold() const
Gets the threshold at which to intervals are considered the same.
r_Stat_Tiling(const char *encoded)
read everything from an encoded string e.g.
r_Access merge(const std::vector< r_Access > &patterns) const
Merges a list of access patterns.
r_Tiling_Scheme get_tiling_scheme() const override
This method is similar to a copy constructor, this is, is returns a copy of the current object.
The r_Tiling class is used to specify in which way the tiling is done by the system.
Definition tiling.hh:53
static const r_Bytes defaultTileSize
Definition tiling.hh:92
std::uint32_t r_Dimension
number of dimensions in r_Point and r_Minterval.
Definition mddtypes.hh:56
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition mddtypes.hh:43
std::uint64_t r_Area
number of cells in an mdd object or tile.
Definition mddtypes.hh:49
r_Tiling_Scheme
Tiling of the object:
Definition mddtypes.hh:317
std::uint32_t r_ULong
Definition odmgtypes.hh:38
double r_Double
Definition odmgtypes.hh:40
std::ostream & operator<<(std::ostream &os, const r_Access &access)
Prints the status of a Access object to a stream.