rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
r_Aligned_Tiling Class Reference

The r_Aligned_Tiling class is used to express the options for aligned tiling of r_Marray objects. More...

#include <alignedtiling.hh>

Inheritance diagram for r_Aligned_Tiling:
r_Dimension_Tiling r_Size_Tiling r_Tiling

Public Member Functions

 r_Aligned_Tiling (const char *encoded)
 read everything from encoded string (e.g.
 
 r_Aligned_Tiling (r_Dimension dim, r_Bytes ts=r_Tiling::defaultTileSize)
 dimension and tile size.
 
 r_Aligned_Tiling (const r_Minterval &tc, r_Bytes ts=r_Tiling::defaultTileSize)
 tile configuration and tile size.
 
virtual r_Tilingclone () const
 This method provides the core funcionality of this class.
 
virtual ~r_Aligned_Tiling ()=default
 
std::vector< r_Mintervalcompute_tiles (const r_Minterval &obj_domain, r_Bytes cell_size) const
 Decompose an object in tiles.
 
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.
 
const r_Mintervalget_tile_config () const
 returns the current value for the tile configuration option
 
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.
 
r_Minterval compute_tile_domain (const r_Minterval &dom, r_Bytes cell_size) const
 determines the individual tiles domains
 
- 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)
 
virtual ~r_Dimension_Tiling ()=default
 
void print_status (std::ostream &os) const override
 Prints the current status of the object.
 
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
 
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".
 
 r_Size_Tiling (r_Bytes ts=r_Tiling::defaultTileSize)
 
virtual ~r_Size_Tiling ()=default
 
void print_status (std::ostream &os) const override
 Prints the current status of the object.
 
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 obj_domain has more than 0 dimensions
 
std::vector< r_Mintervalcompute_tiles (const r_Minterval &obj_domain, r_Bytes cellTypeSize) const override
 Decompose an object in tiles.
 
r_Bytes get_tile_size () const
 
r_Tilingclone () const override
 This method provides the core funcionality of this class.
 
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.
 
- 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
 
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.
 
- Protected Attributes inherited from r_Dimension_Tiling
r_Dimension dimension {}
 dimension the mdd must have
 
- Protected Attributes inherited from r_Size_Tiling
r_Bytes tile_size {}
 Tile size.
 

Detailed Description

The r_Aligned_Tiling class is used to express the options for aligned tiling of r_Marray objects.

The following options may be set:

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.

Constructor & Destructor Documentation

◆ r_Aligned_Tiling() [1/3]

r_Aligned_Tiling::r_Aligned_Tiling ( const char *  encoded)
explicit

read everything from encoded string (e.g.

"[0:9,0:9];100" or "2;100")

◆ r_Aligned_Tiling() [2/3]

r_Aligned_Tiling::r_Aligned_Tiling ( r_Dimension  dim,
r_Bytes  ts = r_Tiling::defaultTileSize 
)
explicit

dimension and tile size.

◆ r_Aligned_Tiling() [3/3]

r_Aligned_Tiling::r_Aligned_Tiling ( const r_Minterval tc,
r_Bytes  ts = r_Tiling::defaultTileSize 
)
explicit

tile configuration and tile size.

◆ ~r_Aligned_Tiling()

virtual r_Aligned_Tiling::~r_Aligned_Tiling ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual r_Tiling * r_Aligned_Tiling::clone ( ) const
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.

◆ compute_tile_domain()

r_Minterval r_Aligned_Tiling::compute_tile_domain ( const r_Minterval dom,
r_Bytes  cell_size 
) const

determines the individual tiles domains

◆ compute_tiles()

std::vector< r_Minterval > r_Aligned_Tiling::compute_tiles ( const r_Minterval obj_domain,
r_Bytes  cell_size 
) const
virtual

Decompose an object in tiles.

Implements r_Dimension_Tiling.

◆ get_min_opt_tile_size()

r_Bytes r_Aligned_Tiling::get_min_opt_tile_size ( ) const
protected

◆ get_opt_size()

r_Minterval r_Aligned_Tiling::get_opt_size ( const r_Minterval tile_domain,
r_Bytes  cell_size 
) const
protected

◆ get_string_representation()

std::string r_Aligned_Tiling::get_string_representation ( ) const

◆ get_tile_config()

const r_Minterval & r_Aligned_Tiling::get_tile_config ( ) const

returns the current value for the tile configuration option

◆ get_tiling_scheme()

virtual r_Tiling_Scheme r_Aligned_Tiling::get_tiling_scheme ( ) const
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.

◆ print_status()

void r_Aligned_Tiling::print_status ( std::ostream &  s) const
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.

Member Data Documentation

◆ description

const char* r_Aligned_Tiling::description
static

◆ tile_config

r_Minterval r_Aligned_Tiling::tile_config
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


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