@@ -8253,3 +8253,152 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of
8253
8253
done :
8254
8254
FUNC_LEAVE_NOAPI (ret_value )
8255
8255
} /* end H5D__chunk_get_offset_copy() */
8256
+
8257
+ /*-------------------------------------------------------------------------
8258
+ * Function: H5D__write_struct_chunk_direct
8259
+ *
8260
+ * Purpose: Internal routine to write a structured chunk directly into the file.
8261
+ *
8262
+ * Return: Non-negative on success/Negative on failure
8263
+ *
8264
+ *-------------------------------------------------------------------------
8265
+ */
8266
+ herr_t
8267
+ H5D__write_struct_chunk_direct (H5D_t H5_ATTR_UNUSED * dset , hsize_t H5_ATTR_UNUSED * offset ,
8268
+ H5D_struct_chunk_info_t H5_ATTR_UNUSED * chunk_info , void H5_ATTR_UNUSED * buf [])
8269
+ {
8270
+ herr_t ret_value = SUCCEED ; /* Return value */
8271
+
8272
+ FUNC_ENTER_PACKAGE_NOERR
8273
+
8274
+ /* Sanity checks */
8275
+ /* TBD: check for H5D_SPARSE_CHUNK */
8276
+ /* assert(layout->type == H5D_SPARSE_CHUNK); */
8277
+
8278
+ /* TBD: set up and call routine to write the structured chunk */
8279
+ /* FOR NOW: just return success */
8280
+
8281
+ FUNC_LEAVE_NOAPI (ret_value )
8282
+ } /* end H5D__write_struct_chunk_direct() */
8283
+
8284
+ /*-------------------------------------------------------------------------
8285
+ * Function: H5D__read_struct_chunk_direct
8286
+ *
8287
+ * Purpose: Internal routine to read a structured chunk directly from the file.
8288
+ *
8289
+ * Return: Non-negative on success/Negative on failure
8290
+ *
8291
+ *-------------------------------------------------------------------------
8292
+ */
8293
+ herr_t
8294
+ H5D__read_struct_chunk_direct (const H5D_t H5_ATTR_UNUSED * dset , hsize_t H5_ATTR_UNUSED * offset ,
8295
+ H5D_struct_chunk_info_t H5_ATTR_UNUSED * chunk_info , void H5_ATTR_UNUSED * buf [])
8296
+ {
8297
+ herr_t ret_value = SUCCEED ; /* Return value */
8298
+
8299
+ FUNC_ENTER_PACKAGE_NOERR
8300
+
8301
+ /* Check args */
8302
+ /* TBD: check for H5D_SPARSE_CHUNK */
8303
+ /* assert(dset && H5D_SPARSE_CHUNK == layout->type); */
8304
+ assert (offset );
8305
+ assert (chunk_info );
8306
+ assert (buf );
8307
+
8308
+ /* TBD: set up and call routine to read the structured chunk */
8309
+ /* FOR NOW: just return success */
8310
+
8311
+ FUNC_LEAVE_NOAPI (ret_value )
8312
+ } /* end H5D__read_struct_chunk_direct() */
8313
+
8314
+ /*-------------------------------------------------------------------------
8315
+ * Function: H5D__get_struct_chunk_info
8316
+ *
8317
+ * Purpose: Iterate over the chunks in the dataset to get the info
8318
+ * of the desired chunk.
8319
+ *
8320
+ * TBD: Is the following also true for structured chunk?
8321
+ * Note: Currently, the domain of the index in this function is of all
8322
+ * the written chunks, regardless the dataspace.
8323
+ *
8324
+ * Return: SUCCEED/FAIL
8325
+ *-------------------------------------------------------------------------
8326
+ */
8327
+ herr_t
8328
+ H5D__get_struct_chunk_info (const H5D_t H5_ATTR_UNUSED * dset , const H5S_t H5_ATTR_UNUSED * space ,
8329
+ hsize_t H5_ATTR_UNUSED chunk_idx , hsize_t H5_ATTR_UNUSED * offset ,
8330
+ H5D_struct_chunk_info_t H5_ATTR_UNUSED * chunk_info , haddr_t H5_ATTR_UNUSED * addr ,
8331
+ hsize_t H5_ATTR_UNUSED * chunk_size )
8332
+ {
8333
+ herr_t ret_value = SUCCEED ; /* Return value */
8334
+
8335
+ FUNC_ENTER_PACKAGE_NOERR
8336
+
8337
+ assert (dset );
8338
+ assert (dset -> shared );
8339
+ assert (space );
8340
+
8341
+ /* TBD: go get structured chunk information using chunk index */
8342
+ /* FOR NOW: just return success */
8343
+
8344
+ FUNC_LEAVE_NOAPI (ret_value )
8345
+ } /* end H5D__get_struct_chunk_info() */
8346
+
8347
+ /*-------------------------------------------------------------------------
8348
+ * Function: H5D__get_struct_chunk_info_by_coord
8349
+ *
8350
+ * Purpose: Iterate over the structured chunks in the dataset to get the info
8351
+ * of the desired chunk, given by its offset coordinates.
8352
+ *
8353
+ * Return: Success: Non-negative
8354
+ * Failure: Negative
8355
+ *
8356
+ *-------------------------------------------------------------------------
8357
+ */
8358
+ herr_t
8359
+ H5D__get_struct_chunk_info_by_coord (const H5D_t H5_ATTR_UNUSED * dset , const hsize_t H5_ATTR_UNUSED * offset ,
8360
+ H5D_struct_chunk_info_t H5_ATTR_UNUSED * chunk_info , haddr_t H5_ATTR_UNUSED * addr ,
8361
+ hsize_t H5_ATTR_UNUSED * chunk_size )
8362
+ {
8363
+ herr_t ret_value = SUCCEED ; /* Return value */
8364
+
8365
+ FUNC_ENTER_PACKAGE_NOERR
8366
+
8367
+ /* Check args */
8368
+ assert (dset );
8369
+ assert (dset -> shared );
8370
+ assert (offset );
8371
+
8372
+ /* TBD: go get structured chunk information using chunk coordinates */
8373
+ /* FOR NOW: just return success */
8374
+
8375
+ FUNC_LEAVE_NOAPI (ret_value )
8376
+ } /* end H5D__get_struct_chunk_info_by_coord() */
8377
+
8378
+ /*-------------------------------------------------------------------------
8379
+ * Function: H5D__struct_chunk_iter
8380
+ *
8381
+ * Purpose: Iterate over all the structured chunks in the dataset
8382
+ * with given callback and the callback's required data.
8383
+ *
8384
+ * Return: SUCCEED/FAIL
8385
+ *-------------------------------------------------------------------------
8386
+ */
8387
+ herr_t
8388
+ H5D__struct_chunk_iter (H5D_t H5_ATTR_UNUSED * dset , H5D_struct_chunk_iter_op_t H5_ATTR_UNUSED op ,
8389
+ void H5_ATTR_UNUSED * op_data )
8390
+ {
8391
+ herr_t ret_value = SUCCEED ; /* Return value */
8392
+
8393
+ FUNC_ENTER_PACKAGE_NOERR
8394
+
8395
+ /* Check args */
8396
+ assert (dset );
8397
+ assert (dset -> shared ) ;
8398
+
8399
+ /* TBD: iterate over all the structured chunks in the dataset */
8400
+ /* FOR NOW: just return success */
8401
+
8402
+ FUNC_LEAVE_NOAPI (ret_value )
8403
+ } /* end H5D__chunk_iter() */
8404
+
0 commit comments