ksharonin / kerchunkC

0 stars 0 forks source link

V2 BTree Record implementations (1-11) #8

Open ksharonin opened 7 months ago

ksharonin commented 7 months ago
This field indicates the type of B-tree: Value Description
0 This B-tree is used for testing only. This value should not be used for storing records in actual HDF5 files.
1 This B-tree is used for indexing indirectly accessed, non-filtered ‘huge’ fractal heap objects.
2 This B-tree is used for indexing indirectly accessed, filtered ‘huge’ fractal heap objects.
3 This B-tree is used for indexing directly accessed, non-filtered ‘huge’ fractal heap objects.
4 This B-tree is used for indexing directly accessed, filtered ‘huge’ fractal heap objects.
5 This B-tree is used for indexing the ‘name’ field for links in indexed groups.
6 This B-tree is used for indexing the ‘creation order’ field for links in indexed groups.
7 This B-tree is used for indexing shared object header messages.
8 This B-tree is used for indexing the ‘name’ field for indexed attributes.
9 This B-tree is used for indexing the ‘creation order’ field for indexed attributes.
10 This B-tree is used for indexing chunks of datasets with no filters and with more than one dimension of unlimited extent.
11 This B-tree is used for indexing chunks of datasets with filters and more than one dimension of unlimited extent.
ksharonin commented 7 months ago
(lldb) p *type
(const H5B2_class_t) $0 = {
  id = H5B2_GRP_DENSE_NAME_ID
  name = 0x000000010056644a "H5B2_GRP_DENSE_NAME_ID"
  nrec_size = 12
  crt_context = 0x0000000000000000
  dst_context = 0x0000000000000000
  store = 0x0000000100255c54 (libhdf5.310.dylib`H5G__dense_btree2_name_store at H5Gbtree2.c:181)
  compare = 0x0000000100255cd4 (libhdf5.310.dylib`H5G__dense_btree2_name_compare at H5Gbtree2.c:207)
  encode = 0x0000000100255e1c (libhdf5.310.dylib`H5G__dense_btree2_name_encode at H5Gbtree2.c:263)
  decode = 0x0000000100255eb8 (libhdf5.310.dylib`H5G__dense_btree2_name_decode at H5Gbtree2.c:287)
  debug = 0x0000000100255f5c (libhdf5.310.dylib`H5G__dense_btree2_name_debug at H5Gbtree2.c:312)
}
ksharonin commented 7 months ago

Confirmed: implement type 5 record aka H5G_BT2_NAME aka H5B2_GRP_DENSE_NAME_ID

const H5B2_class_t *const H5B2_client_class_g[] = {
    H5B2_TEST,                /* 0 - H5B2_TEST_ID           */
    H5HF_HUGE_BT2_INDIR,      /* 1 - H5B2_FHEAP_HUGE_INDIR_ID   */
    H5HF_HUGE_BT2_FILT_INDIR, /* 2 - H5B2_FHEAP_HUGE_FILT_INDIR_ID  */
    H5HF_HUGE_BT2_DIR,        /* 3 - H5B2_FHEAP_HUGE_DIR_ID         */
    H5HF_HUGE_BT2_FILT_DIR,   /* 4 - H5B2_FHEAP_HUGE_FILT_DIR_ID    */
    H5G_BT2_NAME,             /* 5 - H5B2_GRP_DENSE_NAME_ID         */
    H5G_BT2_CORDER,           /* 6 - H5B2_GRP_DENSE_CORDER_ID   */
    H5SM_INDEX,               /* 7 - H5B2_SOHM_INDEX_ID         */
    H5A_BT2_NAME,             /* 8 - H5B2_ATTR_DENSE_NAME_ID        */
    H5A_BT2_CORDER,           /* 9 - H5B2_ATTR_DENSE_CORDER_ID  */
    H5D_BT2,                  /* 10 - H5B2_CDSET_ID                   */
    H5D_BT2_FILT,             /* 11 - H5B2_CDSET_FILT_ID              */
    H5B2_TEST2                /* 12 - H5B2_TEST_ID          */
};
ksharonin commented 7 months ago

Associate support and callback functions

const H5B2_class_t H5G_BT2_NAME[1] = {{
    /* B-tree class information */
    H5B2_GRP_DENSE_NAME_ID,           /* Type of B-tree */
    "H5B2_GRP_DENSE_NAME_ID",         /* Name of B-tree class */
    sizeof(H5G_dense_bt2_name_rec_t), /* Size of native record */
    NULL,                             /* Create client callback context */
    NULL,                             /* Destroy client callback context */
    H5G__dense_btree2_name_store,     /* Record storage callback */
    H5G__dense_btree2_name_compare,   /* Record comparison callback */
    H5G__dense_btree2_name_encode,    /* Record encoding callback */
    H5G__dense_btree2_name_decode,    /* Record decoding callback */
    H5G__dense_btree2_name_debug      /* Record debugging callback */
}};
ksharonin commented 7 months ago