diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2011-09-27 05:02:38 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2011-09-27 05:02:38 (GMT) |
commit | 4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc (patch) | |
tree | 01f90619962c447280074bb8d10ae5c7b2b9acbc /fortran/src/H5Sf.c | |
parent | a07004c825e3a4e4b61269fd3e5f2b57092f073c (diff) | |
download | hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.zip hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.tar.gz hdf5-4af3cd2b7a89b2eeed05d5ec0b0641ca7c2545bc.tar.bz2 |
[svn-r21421] Merged the Fortran 2003 changes from the trunk into the 1.8 branch, used:
svn merge -r 20506:21414 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
Tested: jam (gnu, intel, pgi compilers)
Also merged effected non-Fortran files:
svn merge -r21247:r21248 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/src/libhdf5.settings.in
Diffstat (limited to 'fortran/src/H5Sf.c')
-rw-r--r-- | fortran/src/H5Sf.c | 824 |
1 files changed, 550 insertions, 274 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index e161618..2cfb1eb 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -1,4 +1,9 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +/****h* H5Sf/H5Sf + * PURPOSE + * This file contains C stubs for H5S Fortran APIs + * + * COPYRIGHT + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * @@ -11,26 +16,38 @@ * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from help@hdfgroup.org. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + ****** +*/ #include "H5f90.h" #include "H5Eprivate.h" -/*---------------------------------------------------------------------------- - * Name: h5screate_simple_c - * Purpose: Call H5Screate_simple to create a dataspace - * Inputs: rank - number of dimensions of dataspace +/****if* H5Sf/h5screate_simple_c + * NAME + * h5screate_simple_c + * PURPOSE + * Call H5Screate_simple to create a dataspace + * INPUTS + * rank - number of dimensions of dataspace * dims - array of the size of each dimension maxdims - an array of the maximum size of each dimension - * Outputs: space_id - identifier of the created dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * OUTPUTS + * space_id - identifier of the created dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 4, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id ) +/******/ { hsize_t c_dims[H5S_MAX_RANK]; hsize_t c_maxdims[H5S_MAX_RANK]; @@ -56,18 +73,26 @@ done: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sclose_c - * Purpose: Call H5Sclose to close the dataspace - * Inputs: space_id - identifier of the dataspace to be closed - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5sclose_c + * NAME + * h5sclose_c + * PURPOSE + * Call H5Sclose to close the dataspace + * INPUTS + * space_id - identifier of the dataspace to be closed + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 4, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sclose_c ( hid_t_f *space_id ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -77,20 +102,28 @@ nh5sclose_c ( hid_t_f *space_id ) return ret_value; } - -/*---------------------------------------------------------------------------- - * Name: h5screate_c - * Purpose: Call H5Screate to create a dataspace - * Inputs: classtype - type of the dataspace class - * Outputs: space_id - identifier of the created dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5screate_c + * NAME + * h5screate_c + * PURPOSE + * Call H5Screate to create a dataspace + * INPUTS + * classtype - type of the dataspace class + * OUTPUTS + * space_id - identifier of the created dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Tuesday, August 10, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5screate_c ( int_f *classtype, hid_t_f *space_id ) +/******/ { H5S_class_t c_classtype; int ret_value = 0; @@ -103,19 +136,28 @@ nh5screate_c ( int_f *classtype, hid_t_f *space_id ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5scopy_c - * Purpose: Call H5Scopy to copy dataspace - * Inputs: space_id - identifier of the dataspace to be copied - * Outputs: new_space_id - identifier of the new datspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5scopy_c + * NAME + * h5scopy_c + * PURPOSE + * Call H5Scopy to copy dataspace + * INPUTS + * space_id - identifier of the dataspace to be copied + * OUTPUTS + * new_space_id - identifier of the new datspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Tuesday, August 10, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) +/******/ { int ret_value = 0; hid_t c_new_space_id; @@ -129,22 +171,31 @@ nh5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_hyper_nblocks_c - * Purpose: Call H5SH5Sget_select_hyper_nblocks to +/****if* H5Sf/h5sget_select_hyper_nblocks_c + * NAME + * h5sget_select_hyper_nblocks_c + * PURPOSE + * Call H5SH5Sget_select_hyper_nblocks to * get the the number of hyperslab blocks in * the current dataspace selection if successful - * Inputs: space_id - identifier of the dataspace - * Outputs: num_blocks - number of hyperslab blocks in + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * num_blocks - number of hyperslab blocks in * the current dataspace selection - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Xiangyang Su * Friday, November 12, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -158,22 +209,31 @@ nh5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_elem_npoints_c - * Purpose: Call H5Sget_select_elem_npoints to +/****if* H5Sf/h5sget_select_elem_npoints_c + * NAME + * h5sget_select_elem_npoints_c + * PURPOSE + * Call H5Sget_select_elem_npoints to * get the the number of element points in * the current dataspace selection if successful - * Inputs: space_id - identifier of the dataspace - * Outputs: num_points - number of element points in + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * num_points - number of element points in * the current dataspace selection - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Xiangyang Su * Monday, November 15, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -187,31 +247,40 @@ nh5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_hyper_blocklist_c - * Purpose: Call H5Sget_select_hyper_blocklist to +/****if* H5Sf/h5sget_select_hyper_blocklist_c + * NAME + * h5sget_select_hyper_blocklist_c + * PURPOSE + * Call H5Sget_select_hyper_blocklist to * get a list of the hyperslab blocks currently selected * Starting with the startblock-th block in the * list of blocks, num_blocks blocks are put into the user's * buffer. If the user's buffer fills up before numblocks * blocks are inserted, the buffer * will contain only as many blocks as fit. - * Inputs: space_id - identifier of the dataspace + * INPUTS + * space_id - identifier of the dataspace * startblock - Hyperslab block to start with * num_blocks - number of hyperslab blocks in * the current dataspace selection - * Outputs: buf - List of hyperslab blocks selected - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su + * OUTPUTS + * buf - List of hyperslab blocks selected + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Xiangyang Su * Monday, November 15, 1999 - * Modifications: + * HISTORY + * * Transpose dimension arrays because of C-FORTRAN storage order - * M.S. Breitenfeld - *---------------------------------------------------------------------------*/ + * M. Scot Breitenfeld + * SOURCE +*/ int_f nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf) +/******/ { int ret_value = -1; hid_t c_space_id; @@ -256,25 +325,34 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_bounds_c - * Purpose: Call H5Sget_select_bounds to retrieve the coordinates +/****if* H5Sf/h5sget_select_bounds_c + * NAME + * h5sget_select_bounds_c + * PURPOSE + * Call H5Sget_select_bounds to retrieve the coordinates * of the bounding box containing the current selection * and places them into user-supplied buffers - * Inputs: space_id - identifier of the dataspace - * Outputs: start - Starting coordinates of the bounding box + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * start - Starting coordinates of the bounding box * end - Ending coordinates of the bounding box, * i.e., the coordinates of the diagonally opposite corne - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Xiangyang Su * Wednesday, November 17, 1999 - * Modifications: swapped array bounds to account for C and Fortran reversed + * HISTORY + * swapped array bounds to account for C and Fortran reversed * matrix notation. - * M.S. Breitenfeld - *---------------------------------------------------------------------------*/ + * M. Scot Breitenfeld + * SOURCE +*/ int_f nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end) +/******/ { hid_t c_space_id; hsize_t c_start[H5S_MAX_RANK]; @@ -299,9 +377,11 @@ done: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_elem_pointlist_c - * Purpose: Call H5Sget_select_elem_pointlist +/****if* H5Sf/h5sget_select_elem_pointlist_c + * NAME + * h5sget_select_elem_pointlist_c + * PURPOSE + * Call H5Sget_select_elem_pointlist * get a list of element points in the * current dataspace selectin. * Starting with the startpoint-th point in the @@ -309,19 +389,26 @@ done: * buffer. If the user's buffer fills up before numpoints * points are inserted, the buffer * will contain only as many points as fit. - * Inputs: space_id - identifier of the dataspace + * INPUTS + * space_id - identifier of the dataspace * startpoint - Element point to start with * numpoints - Number of element points to get - * Outputs: buf - List of element points selected - * Returns: 0 on success, -1 on failure - * Programmer: Xiangyang Su + * OUTPUTS + * buf - List of element points selected + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Xiangyang Su * Wednesday, November 17, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf) +/******/ { int ret_value = -1; hid_t c_space_id; @@ -368,18 +455,26 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, -/*---------------------------------------------------------------------------- - * Name: h5sselect_all_c - * Purpose: Call H5Sselect_all to select entire dataspace - * Inputs: space_id - identifier of the dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5sselect_all_c + * NAME + * h5sselect_all_c + * PURPOSE + * Call H5Sselect_all to select entire dataspace + * INPUTS + * space_id - identifier of the dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Tuesday, August 10, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_all_c ( hid_t_f *space_id ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -389,18 +484,26 @@ nh5sselect_all_c ( hid_t_f *space_id ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sselect_none_c - * Purpose: Call H5Sselect_none to reset the selection region - * Inputs: space_id - identifier of the dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5sselect_none_c + * NAME + * h5sselect_none_c + * PURPOSE + * Call H5Sselect_none to reset the selection region + * INPUTS + * space_id - identifier of the dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Tuesday, August 10, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_none_c ( hid_t_f *space_id ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -410,21 +513,30 @@ nh5sselect_none_c ( hid_t_f *space_id ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sselect_valid_c - * Purpose: Call H5Sselect_valid to verify that selection +/****if* H5Sf/h5sselect_valid_c + * NAME + * h5sselect_valid_c + * PURPOSE + * Call H5Sselect_valid to verify that selection * is within dataspace extent. - * Inputs: space_id - identifier of the dataspace - * Outputs: flag - 0 if not valid selection, 1 if is valid selection, + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * flag - 0 if not valid selection, 1 if is valid selection, * and negative on failure. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Tuesday, August 10, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -437,20 +549,29 @@ nh5sselect_valid_c ( hid_t_f *space_id , int_f *flag ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_simple_extent_npoints_c - * Purpose: Call H5Sget_simple_extent_npoints to determine the number +/****if* H5Sf/h5sget_simple_extent_npoints_c + * NAME + * h5sget_simple_extent_npoints_c + * PURPOSE + * Call H5Sget_simple_extent_npoints to determine the number * of elements in a dataspace - * Inputs: space_id - identifier of the dataspace - * Outputs: npoints - number of points in a dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * npoints - number of points in a dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -463,20 +584,29 @@ nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_select_npoints_c - * Purpose: Call H5Sget_select_npoints to determine the number +/****if* H5Sf/h5sget_select_npoints_c + * NAME + * h5sget_select_npoints_c + * PURPOSE + * Call H5Sget_select_npoints to determine the number * of elements in a dataspace selection - * Inputs: space_id - identifier of the dataspace - * Outputs: npoints - number of points in a dataspace selection - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * npoints - number of points in a dataspace selection + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) +/******/ { int ret_value = 0; hssize_t c_npoints; @@ -489,20 +619,29 @@ nh5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_simple_extent_ndims_c - * Purpose: Call H5Sget_simple_extent_ndims to determine the number +/****if* H5Sf/h5sget_simple_extent_ndims_c + * NAME + * h5sget_simple_extent_ndims_c + * PURPOSE + * Call H5Sget_simple_extent_ndims to determine the number * dimensions - * Inputs: space_id - identifier of the dataspace - * Outputs: rank - number of dataspace dimensions - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * rank - number of dataspace dimensions + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -515,21 +654,30 @@ nh5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_simple_extent_type_c - * Purpose: Call H5Sget_simple_extent_type to determine the class type +/****if* H5Sf/h5sget_simple_extent_type_c + * NAME + * h5sget_simple_extent_type_c + * PURPOSE + * Call H5Sget_simple_extent_type to determine the class type * of a dataspace - * Inputs: space_id - identifier of the dataspace - * Outputs: classtype - class type; possible values are: + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * classtype - class type; possible values are: * H5S_SCALAR_F (0), H5S_SIMPLE_F (1), H5S_NULL_F (2) - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -547,20 +695,28 @@ nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5soffset_simple_c - * Purpose: Call H5Soffset_simple to set the offset of a simple +/****if* H5Sf/h5soffset_simple_c + * NAME + * h5soffset_simple_c + * PURPOSE + * Call H5Soffset_simple to set the offset of a simple * dataspace - * Inputs: space_id - identifier of the dataspace + * INPUTS + * space_id - identifier of the dataspace * offset - offset array - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset) +/******/ { hid_t c_space_id; int rank; @@ -586,22 +742,30 @@ done: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sset_extent_simple_c - * Purpose: Call H5Sset_extent_simple to set or reset size of +/****if* H5Sf/h5sset_extent_simple_c + * NAME + * h5sset_extent_simple_c + * PURPOSE + * Call H5Sset_extent_simple to set or reset size of * existing dataspace - * Inputs: space_id - identifier of the dataspace + * INPUTS + * space_id - identifier of the dataspace * rank - dataspace rank * current_size - array with the new dimension sizes * maximum_size - aray with maximum sizes of dimensions - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size) +/******/ { hsize_t c_current_size[H5S_MAX_RANK]; hsize_t c_maximum_size[H5S_MAX_RANK]; @@ -623,21 +787,31 @@ done: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sget_simple_extent_dims_c - * Purpose: Call H5Sget_simple_extent_dims to retrieve sizes of an + +/****if* H5Sf/h5sget_simple_extent_dims_c + * NAME + * h5sget_simple_extent_dims_c + * PURPOSE + * Call H5Sget_simple_extent_dims to retrieve sizes of an * existing dataspace - * Inputs: space_id - identifier of the dataspace - * Outputs: dims - array with the dimension sizes + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * dims - array with the dimension sizes * maxdims - aray with maximum sizes of dimensions - * Returns: number of dataspace dimensions (rank) on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * number of dataspace dimensions (rank) on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims) +/******/ { hid_t c_space_id; hsize_t c_dims[H5S_MAX_RANK]; @@ -668,21 +842,30 @@ done: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sis_simple_c - * Purpose: Call H5Sis_simple to detrmine if the dataspace +/****if* H5Sf/h5sis_simple_c + * NAME + * h5sis_simple_c + * PURPOSE + * Call H5Sis_simple to detrmine if the dataspace * is simple. - * Inputs: space_id - identifier of the dataspace - * Outputs: flag - 0 if not simple, 1 if is simple, + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * flag - 0 if not simple, 1 if is simple, * and negative on failure. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -696,19 +879,27 @@ nh5sis_simple_c ( hid_t_f *space_id , int_f *flag ) } -/*---------------------------------------------------------------------------- - * Name: h5sextent_copy_c - * Purpose: Call H5Sextent_copy to copy an extent of dataspace - * Inputs: dest_space_id - identifier of the destination dataspace +/****if* H5Sf/h5sextent_copy_c + * NAME + * h5sextent_copy_c + * PURPOSE + * Call H5Sextent_copy to copy an extent of dataspace + * INPUTS + * dest_space_id - identifier of the destination dataspace * source_space_id - identifier of the source dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) +/******/ { int ret_value = 0; hid_t c_dest_space_id, c_source_space_id; @@ -721,18 +912,26 @@ nh5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sset_extent_none_c - * Purpose: Call H5Sset_extent_none to remove extent from a dataspace - * Inputs: space_id - dataspace identifier - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5sset_extent_none_c + * NAME + * h5sset_extent_none_c + * PURPOSE + * Call H5Sset_extent_none to remove extent from a dataspace + * INPUTS + * space_id - dataspace identifier + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sset_extent_none_c ( hid_t_f *space_id ) +/******/ { int ret_value = 0; hid_t c_space_id; @@ -744,10 +943,13 @@ nh5sset_extent_none_c ( hid_t_f *space_id ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sselect_hyperslab_c - * Purpose: Call H5Sselect_hyperslab to select a hyperslab - * Inputs: space_id - identifier of the dataspace +/****if* H5Sf/h5sselect_hyperslab_c + * NAME + * h5sselect_hyperslab_c + * PURPOSE + * Call H5Sselect_hyperslab to select a hyperslab + * INPUTS + * space_id - identifier of the dataspace * operator - defines how the new selection is combined * with the previous one; current values are * H5S_SELECT_SET_F (0) and H5S_SELECT_OR_F (1) @@ -755,14 +957,19 @@ nh5sset_extent_none_c ( hid_t_f *space_id ) * count - number of blocks included in the hyperslab * stride - hyperslab stride (interval between blocks) * block - size of block in the hyperslab - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block) +/******/ { hsize_t c_start[H5S_MAX_RANK]; hsize_t c_count[H5S_MAX_RANK]; @@ -795,25 +1002,35 @@ done: return ret_value; } + #ifdef NEW_HYPERSLAB_API -/*---------------------------------------------------------------------------- - * Name: h5scombine_hyperslab_c - * Purpose: Call H5Scombine_hyperslab - * Inputs: space_id - identifier of the dataspace +/****if* H5Sf/h5scombine_hyperslab_c + * NAME + * h5scombine_hyperslab_c + * PURPOSE + * Call H5Scombine_hyperslab + * INPUTS + * space_id - identifier of the dataspace * operator - defines how the new selection is combined * start - offset of start of hyperslab * count - number of blocks included in the hyperslab * stride - hyperslab stride (interval between blocks) * block - size of block in the hyperslab - * Outputs: hyper_id - identifier for the new dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * OUTPUTS + * hyper_id - identifier for the new dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Monday, October 7, 2002 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id) +/******/ { int ret_value = -1; hid_t c_space_id; @@ -869,21 +1086,30 @@ DONE: if(c_block != NULL) HDfree(c_block); return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5scombine_select_c - * Purpose: Call H5Scombine_ select - * Inputs: space1_id - identifier of the first dataspace +/****if* H5Sf/h5scombine_select_c + * NAME + * h5scombine_select_c + * PURPOSE + * Call H5Scombine_ select + * INPUTS + * space1_id - identifier of the first dataspace * operator - defines how the new selection is combined * space2_id - identifier of the second dataspace - * Outputs: ds_id - identifier for the new dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * OUTPUTS + * ds_id - identifier for the new dataspace + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Monday, October 7, 2002 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id) +/******/ { int ret_value = -1; hid_t c_space1_id; @@ -901,20 +1127,28 @@ nh5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t ret_value = 0; return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sselect_select_c - * Purpose: Call H5Sselect_ select - * Inputs: space1_id - identifier of the first dataspace to modify +/****if* H5Sf/h5sselect_select_c + * NAME + * h5sselect_select_c + * PURPOSE + * Call H5Sselect_ select + * INPUTS + * space1_id - identifier of the first dataspace to modify * operator - defines how the new selection is combined * space2_id - identifier of the second dataspace - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Monday, October 7, 2002 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) +/******/ { int ret_value = -1; hid_t c_space1_id; @@ -930,19 +1164,27 @@ nh5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id) return ret_value; } #endif /*NEW_HYPERSLAB_API*/ -/*---------------------------------------------------------------------------- - * Name: h5sget_select_type_c - * Purpose: Call H5Sget_select_type - * Inputs: space_id - identifier of the dataspace - * Outputs: type - type of selection - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal +/****if* H5Sf/h5sget_select_type_c + * NAME + * h5sget_select_type_c + * PURPOSE + * Call H5Sget_select_type + * INPUTS + * space_id - identifier of the dataspace + * OUTPUTS + * type - type of selection + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Monday, October 7, 2002 - * Modifications: - *---------------------------------------------------------------------------*/ - + * HISTORY + * + * SOURCE +*/ int_f nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) +/******/ { int ret_value = -1; hid_t c_space_id; @@ -957,23 +1199,31 @@ nh5sget_select_type_c ( hid_t_f *space_id , int_f *type) } -/*---------------------------------------------------------------------------- - * Name: h5sselect_elements_c - * Purpose: Call H5Sselect_elements to select elements of a dataspace - * Inputs: space_id - identifier of the dataspace +/****if* H5Sf/h5sselect_elements_c + * NAME + * h5sselect_elements_c + * PURPOSE + * Call H5Sselect_elements to select elements of a dataspace + * INPUTS + * space_id - identifier of the dataspace * operator - defines how the new selection is combined * with the previous one; current values are * H5S_SELECT_SET_F (0) * nelements - number of elements in the selection * coord - arrays with the elements coordinates - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * Elena Pourmal * Wednesday, August 11, 1999 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord) +/******/ { int ret_value = -1; hid_t c_space_id; @@ -1004,22 +1254,31 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sdecode_c - * Purpose: Call H5Sdecode - * Inputs: +/****if* H5Sf/h5sdecode_c + * NAME + * h5sdecode_c + * PURPOSE + * Call H5Sdecode + * INPUTS + * * buf - Buffer for the data space object to be decoded. - * Outputs: + * OUTPUTS + * * obj_id - Object_id (non-negative) * - * Returns: 0 on success, -1 on failure - * Programmer: M.S. Breitenfeld + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld * March 26, 2008 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) +/******/ { int ret_value = -1; unsigned char *c_buf = NULL; /* Buffer to hold C string */ @@ -1041,21 +1300,29 @@ nh5sdecode_c ( _fcd buf, hid_t_f *obj_id ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sencode_c - * Purpose: Call H5Sencode - * Inputs: +/****if* H5Sf/h5sencode_c + * NAME + * h5sencode_c + * PURPOSE + * Call H5Sencode + * INPUTS + * * obj_id - Identifier of the object to be encoded. * buf - Buffer for the object to be encoded into. * nalloc - The size of the allocated buffer. - * Returns: 0 on success, -1 on failure - * Programmer: M.S. Breitenfeld + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld * March 26, 2008 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) +/******/ { int ret_value = -1; unsigned char *c_buf = NULL; /* Buffer to hold C string */ @@ -1102,22 +1369,31 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5sextent_equal_c - * Purpose: Call H5Sextent_equal - * Inputs: +/****if* H5Sf/h5sextent_equal_c + * NAME + * h5sextent_equal_c + * PURPOSE + * Call H5Sextent_equal + * INPUTS + * * space1_id - First dataspace identifier. * space2_id - Second dataspace identifier. - * Outputs: + * OUTPUTS + * * equal - TRUE if equal, FALSE if unequal. - * Returns: 0 on success, -1 on failure - * Programmer: M.S. Breitenfeld + * RETURNS + * 0 on success, -1 on failure + * AUTHOR + * M. Scot Breitenfeld * April 4, 2008 - * Modifications: - *---------------------------------------------------------------------------*/ + * HISTORY + * + * SOURCE +*/ int_f nh5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal) +/******/ { int ret_value = -1; |