Changes between Version 2 and Version 3 of Tiling


Ignore:
Timestamp:
Dec 17, 2012, 1:33:40 PM (11 years ago)
Author:
Dimitar Misev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tiling

    v2 v3  
    2323''tilingName'': '''regular'''
    2424
     25Regular tiling partitions the source array into a regular grid of fixed-domain tiles. This means that the array domain must be divisible by the tile domain, allowing to use a [#Regularcomputedindex regular computed index], which is faster then indexes for non-regular tile layouts.
     26
     27For example, consider inserting an array of domain [0:299,0:299] (size 300x300), and splitting into tiles of domain [0:99,0:49] (size 100x50):
     28{{{
     29insert into test
     30values
     31  marray x in [0:299,0:299] values 1c
     32tiling regular [0:99,0:49]
     33index rc_index
     34}}}
     35
     36The resulting layout of the array as stored in the database is shown on the below image.
     37
     38[[Image(tiling_regular_[0-99,0-49]_index_rc_index.png)]]
     39
    2540=== Aligned tiling ===
    2641''tilingName'': '''aligned'''
     42
     43Aligned tiling allows to flexibly describe the format that tiles should have. The tile configuration is expressed with a multidimensional interval of same dimensionality as the source array. Its extents along each dimension are interpreted relative to the others.
     44
     45For example, if tile configuration is [ 0:29, 0:133 ], tiles will be 2-D arrays with the first dimension of size X and second dimension of size (134 / 30) * X. The specified tile size will determine the actual domain of the result tiles. E.g. below we use tile size 10000, which produces most tiles of domain [ 0:46, 0:210 ]:
     46
     47{{{
     48insert into test
     49values
     50  marray x in [0:299,0:299] values 1c
     51tiling aligned [0:29,0:133]
     52  tile size 10000
     53}}}
     54Note that at the edge tile domain will be automatically aligned to the global array bound. No index is specified as by default the [#Rtree R+ tree index] is used, which is perfectly suitable for this tiling scheme.
     55
     56[[Image(tiling_aligned_[0-29,0-133]_tile_size_10000.png)]]
     57
     58Tile configuration with non-fixed limits indicates a preference to have tiles span along some directions, e.g. the below results in tiles as large as possible along the first dimension (tile domains [ 0:299, 0:43 ]):
     59{{{
     60insert into test
     61values
     62  marray x in [0:299,0:299] values 1c
     63tiling aligned [0:*,0:43]
     64  tile size 40000
     65}}}
     66
     67[[Image(tiling_aligned_[0-*,0-43]_tile_size_40000.png)]]
     68
     69If fixed tiles are required, regular tiling can be imitated by setting tile size to match the tile configuration. 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 144000. This will also result in more efficient computation of the tiling since the given tile configuration is used unchanged if `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.
     70{{{
     71insert into test
     72values
     73  marray x in [0:299,0:299] values 1c
     74tiling aligned [0:29,0:133]
     75  tile size 4020
     76}}}
     77The difference to regular tiling is that the tiles at the borders will be adjusted to fit in the domain in this case.
     78
     79[[Image(tiling_aligned_[0-*,0-43]_tile_size_40000.png)]]
    2780
    2881=== Directional tiling ===
    2982''tilingName'': '''directional'''
    3083
     84With directional tiling we can model the tiling scheme according to a given direction (dimension) decomposition. Along each direction we set the preference for tile sizes along that direction, either by directly listing the limits for each tile (starting from the low, ending with the high dimension limit), or by setting a preference (with a '*') so that the tile is as large as possible in that direction.
     85
     86The format of the tiling configuration for directional tiling consists of N decomposition vectors (for an N-D array): [dec1],[dec2],..,[decN]. The decX decomposition vector is a list of tile limits, e.g., 0,100,200,.. or a '*'.
     87
     88The below demonstrates how to set tile limits for both directions, 0,100,299 in the first and 0,50,80,100,200,299 in the second:
     89{{{
     90insert into test
     91values
     92  marray x in [0:299,0:299] values 1c
     93tiling directional [0,100,299],[0,50,80,100,200,299]
     94}}}
     95[[Image(tiling_directional_[0,100,299],[0,50,80,100,200,299].png)]]
     96
     97This gives a preference to the second direction, i.e. tiles will be as large as possible in this direction:
     98{{{
     99insert into test
     100values
     101  marray x in [0:299,0:299] values 1c
     102tiling directional [0,100,299],[*]
     103}}}
     104[[Image(tiling_directional_[0,100,299],[*].png)]]
     105
     106Finally, specifying a with subtiling allows to respect the tile size and break between the given limits if the tile configuration in order to match tiles to the given tile size:
     107{{{
     108insert into test
     109values
     110  marray x in [0:299,0:299] values 1c
     111tiling directional [0,100,200,299],[*]
     112  with subtiling
     113  tile size 30000
     114}}}
     115[[Image(tiling_directional_[0,100,200,299],[*]_with_subtiling_tile_size_30000.png)]]
     116
    31117=== Tiling areas of interest ===
    32118''tilingName'': '''area of interest'''
     119
     120This tiling scheme allows optimizing access when it is known that some areas of the array are accessed particularly often. These areas are listed as tile domains in the tile configuration, indicating the tiles that must be creating.
     121{{{
     122insert into test
     123values
     124  marray x in [0:299,0:299] values 1c
     125tiling area of interest [100:299,0:199],[0:49,0:49]
     126}}}
     127[[Image(tiling_area_of_interest_[100-299,0-199],[0-49,0-49].png)]]
     128
     129Without specifying a tile size, the tiles (besides those specified in the tiling configuration) will be as large as possible. Specifying a tile size will limit those other tiles, but it may also limit the tiles for the interesting areas. Several tile size limitation options allow to have a more precise control over this:
     130 * ''NO_LIMIT''
     131 * ''REGROUP''
     132 * ''SUB_TILING''
     133 * ''REGROUP_AND_SUBTILING''
    33134
    34135=== Statistic tiling ===