diff --git a/README_CATERVA_METALAYER.rst b/README_CATERVA_METALAYER.rst index 745aaf76..40160733 100644 --- a/README_CATERVA_METALAYER.rst +++ b/README_CATERVA_METALAYER.rst @@ -5,15 +5,16 @@ Caterva is storing persistently its information about shapes and partition shape Caterva metalayer follows the msgpack format:: - |-0-|-1-|-2-|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~| - | 9X| nd| 9X| shape | 9X| partshape | - |---|---|---|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~| - ^ ^ ^ ^ - | | | | - | | | +--[msgpack] positive fixnum for the number of dimensions (nd, up to 127) - | | +---[msgpack] fixarray with X=nd elements - | +------[msgpack] positive fixnum for the number of dimensions (nd, up to 127) - +---[msgpack] fixarray with X=3 elements + |-0-|-1-|-2-|-3-|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~| + | 9X| nd| nd| 9X| shape | 9X| partshape | 9X| blockshape | + |---|---|---|---|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~|---|~~~~~~~~~~~~~~~~| + ^ ^ ^ ^ ^ ^ + | | | | | +--[msgpack] positive fixnum for nd + | | | | +--[msgpack] positive fixnum for nd + | | | +--[msgpack] fixarray with X=nd elements + | | +--[msgpack] positive fixnum for the number of dimensions (nd, up to 127) + | +--[msgpack] positive fixnum for the metalayer format version (up to 127) + +---[msgpack] fixarray with X=5 elements The shape section ----------------- @@ -26,8 +27,8 @@ This section is meant to store the actual shape info. There are as many fields ^ ^ ^ | | | | | +--[msgpack] int64 - | +------[msgpack] int64 - +---[msgpack] int64 + | +--[msgpack] int64 + +--[msgpack] int64 The partshape section --------------------- @@ -40,5 +41,19 @@ This section is meant to store the actual partition shape info. There are as ma ^ ^ ^ | | | | | +--[msgpack] int32 - | +------[msgpack] int32 - +---[msgpack] int32 + | +--[msgpack] int32 + +--[msgpack] int32 + +The blockshape section +--------------------- + +This section is meant to store the block shape info inside the partition. There are as many fields as `nd` dimensions:: + + |---|--4 bytes---|---|--4 bytes---|~~~~~|---|--4 bytes---| + | d2| first_dim | d2| second_dim | ... | d2| last_dim | + |---|------------|---|------------|~~~~~|---|------------| + ^ ^ ^ + | | | + | | +--[msgpack] int32 + | +--[msgpack] int32 + +--[msgpack] int32