![]() |
rasdaman client API
10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
|
The r_Aligned_Tiling class is used to express the options for aligned tiling of r_Marray objects. More...
#include <alignedtiling.hh>
Public Member Functions | |
| r_Aligned_Tiling (const char *encoded) | |
| read everything from encoded string (e.g. More... | |
| r_Aligned_Tiling (r_Dimension dim, r_Bytes ts=r_Tiling::defaultTileSize) | |
| dimension and tile size. More... | |
| r_Aligned_Tiling (const r_Minterval &tc, r_Bytes ts=r_Tiling::defaultTileSize) | |
| tile configuration and tile size. More... | |
| virtual r_Tiling * | clone () const |
| This method provides the core funcionality of this class. More... | |
| virtual | ~r_Aligned_Tiling ()=default |
| std::vector< r_Minterval > | compute_tiles (const r_Minterval &obj_domain, r_Bytes cell_size) const |
| Decompose an object in tiles. More... | |
| std::string | get_string_representation () const |
| void | print_status (std::ostream &s) const |
The string representation delivered by this method is allocated using malloc() and has to be freed using free() in the end. More... | |
| const r_Minterval & | get_tile_config () const |
| returns the current value for the tile configuration option More... | |
| virtual r_Tiling_Scheme | get_tiling_scheme () const |
| This method is similar to a copy constructor, this is, is returns a copy of the current object. More... | |
| r_Minterval | compute_tile_domain (const r_Minterval &dom, r_Bytes cell_size) const |
| determines the individual tiles domains More... | |
Public Member Functions inherited from r_Dimension_Tiling | |
| r_Dimension_Tiling (r_Dimension dim, r_Bytes ts=r_Tiling::defaultTileSize) | |
| Constructor for this object (Takes dim (no of dimension) and tile size as parameter) More... | |
| virtual | ~r_Dimension_Tiling ()=default |
| void | print_status (std::ostream &os) const override |
| Prints the current status of the object. More... | |
| bool | is_compatible (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const override |
| returns true if the cellTypeSize is smaller or equal to the tile size and the dimension fits the obj_domain More... | |
| r_Dimension | get_dimension () const |
Public Member Functions inherited from r_Size_Tiling | |
| r_Size_Tiling (const char *encoded) | |
| Constructor that reads everything from a string e.g."100". More... | |
| r_Size_Tiling (r_Bytes ts=r_Tiling::defaultTileSize) | |
| virtual | ~r_Size_Tiling ()=default |
| r_Bytes | get_tile_size () const |
| 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. More... | |
Public Member Functions inherited from r_Tiling | |
| virtual | ~r_Tiling ()=default |
Static Public Attributes | |
| static const char * | description |
Static Public Attributes inherited from r_Size_Tiling | |
| static const char * | description |
Static Public Attributes inherited from r_Tiling | |
| static const char * | ASTERIX |
| return the type of tiling scheme More... | |
| static const char * | TCOLON |
| static const char * | TCOMMA |
| static const char * | LSQRBRA |
| static const char * | RSQRBRA |
| static const int | DefaultBase |
| static const r_Bytes | defaultTileSize |
Protected Member Functions | |
| r_Bytes | get_min_opt_tile_size () const |
| r_Minterval | get_opt_size (const r_Minterval &tile_domain, r_Bytes cell_size) const |
Protected Member Functions inherited from r_Tiling | |
| void | check_nonempty_tiling (const char *encoded) const |
| void | check_premature_stream_end (const char *currPos, const char *endPos) const |
| r_Minterval | parse_minterval (const char *encoded) const |
| unsigned int | parse_unsigned (const char *encoded) const |
| unsigned long | parse_unsigned_long (const char *encoded) const |
| long | parse_long (const char *encoded) const |
| double | parse_double (const char *encoded) const |
| std::unique_ptr< char[]> | copy_buffer (const char *buf, size_t len) const |
| const char * | advance_to_next_char (const char *p, const char *search) const |
Protected Attributes | |
| r_Minterval | tile_config |
| Determines the individual tiles domains for aligned tiling, using the options expressed in this object. More... | |
Protected Attributes inherited from r_Dimension_Tiling | |
| r_Dimension | dimension {} |
| dimension the mdd must have More... | |
Protected Attributes inherited from r_Size_Tiling | |
| r_Bytes | tile_size {} |
| Tile size. More... | |
The r_Aligned_Tiling class is used to express the options for aligned tiling of r_Marray objects.
The following options may be set:
Tile configuration: describes which format tiles should have. The tile configuration is expressed using a multidimensional interval r_Minterval. This interval should have null lower limits and must have the same dimensionality as that of the objects to which it is to be applied. Its lengths along each direction are interpreted relative to the others.
For example, if tile configuration is [ 0:9, 0:9, 0:19], tiles will be three dimensional arrays with two sides of equal length and double that length along the third direction.
If a fixed tile is required, tile configuration and tile size should be set in such a way that the size of a tile with the given configuration is equal to the specified tile size. For example, if the tile configuration is [ 0:29, 0:39, 0:59] and cell size is 2, then the tile size should be set to
90% * tile_size < size of tile_config < tile_size
(i.e., no computation is necessary). This applies equally to tile configurations with non-fixed limits.
Tiles with non-fixed limits are used to express preferential directions for tiling. For example, [ 0:9 , 0:* ] expresses that tiles should be done along the first direction, i.e., they should have domains :
assuming this results in a tile with the given tile size. If not, the limits in the first direction are changed. The higher dimensions are given preference in that tiles will be preferably extended along a higher dimension than a lower one if two or more limits are open.
The default configuration corresponds to an interval with equal lengths along all directions.
Notice: the tiling options are invalid if the rasdaman client is running with the option notiling. In that case, no tiling is done, independently of the storage layout chosen.
|
explicit |
read everything from encoded string (e.g.
"[0:9,0:9];100" or "2;100")
|
explicit |
dimension and tile size.
|
explicit |
tile configuration and tile size.
|
virtualdefault |
|
virtual |
This method provides the core funcionality of this class.
All derived classes must implement it. As input parameters it takes the big object to be decomposed and returns a set of tiles that compose the big object. This method throws an exeception when the dimension specified, extend or the cell_size are incompatible with the current tiling. You can check compatibility by invoking is_compatible. Clones this object
Implements r_Dimension_Tiling.
| r_Minterval r_Aligned_Tiling::compute_tile_domain | ( | const r_Minterval & | dom, |
| r_Bytes | cell_size | ||
| ) | const |
determines the individual tiles domains
|
virtual |
Decompose an object in tiles.
Implements r_Dimension_Tiling.
|
protected |
|
protected |
| std::string r_Aligned_Tiling::get_string_representation | ( | ) | const |
| const r_Minterval& r_Aligned_Tiling::get_tile_config | ( | ) | const |
returns the current value for the tile configuration option
|
virtual |
This method is similar to a copy constructor, this is, is returns a copy of the current object.
Derived classes must explicitly implement this method.
Implements r_Tiling.
|
virtual |
The string representation delivered by this method is allocated using malloc() and has to be freed using free() in the end.
writes the state of the object to the specified stream
Implements r_Tiling.
|
static |
|
protected |
Determines the individual tiles domains for aligned tiling, using the options expressed in this object.
Takes into account the tile size and the tile configuration, as well as the cell size given by cell_size.
Returns the domain for tiles in such a way that the tile configuration is as close to tile_config set in this object and the size is lower than tile_size.
The origin of the returned interval is the same as that from this->tile_config.
The data to partition has domain dom and cells with size cell_size. To be used before splitting a tile with domain dom (typically, containing all the cells belonging to an r_Marray object). tile configuration
1.8.17