2004-10-02 07:00:42 +08:00
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* Copyright by The HDF Group. *
|
2004-10-02 07:00:42 +08:00
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
|
* All rights reserved. *
|
|
|
|
|
* *
|
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* 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. *
|
2004-10-02 07:00:42 +08:00
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
|
|
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.ued>
|
|
|
|
|
* Thursday, September 30, 2004
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Dataspace I/O functions.
|
|
|
|
|
*/
|
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Module Setup */
|
|
|
|
|
/****************/
|
|
|
|
|
|
2015-09-14 11:58:59 +08:00
|
|
|
|
#include "H5Dmodule.h" /* This source code file is part of the H5D module */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/***********/
|
|
|
|
|
/* Headers */
|
|
|
|
|
/***********/
|
2004-10-02 07:00:42 +08:00
|
|
|
|
#include "H5private.h" /* Generic Functions */
|
|
|
|
|
#include "H5Dpkg.h" /* Datasets */
|
|
|
|
|
#include "H5Eprivate.h" /* Error handling */
|
|
|
|
|
#include "H5FLprivate.h" /* Free Lists */
|
|
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Local Macros */
|
|
|
|
|
/****************/
|
|
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/******************/
|
|
|
|
|
/* Local Typedefs */
|
|
|
|
|
/******************/
|
|
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/********************/
|
|
|
|
|
/* Local Prototypes */
|
|
|
|
|
/********************/
|
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
|
|
|
|
size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/*********************/
|
|
|
|
|
/* Package Variables */
|
|
|
|
|
/*********************/
|
|
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
|
|
2005-10-21 23:52:54 +08:00
|
|
|
|
/*******************/
|
|
|
|
|
/* Local Variables */
|
|
|
|
|
/*******************/
|
|
|
|
|
|
2004-10-02 07:00:42 +08:00
|
|
|
|
/* Declare a free list to manage sequences of size_t */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
H5FL_SEQ_DEFINE(size_t);
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
/* Declare a free list to manage sequences of hsize_t */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
H5FL_SEQ_DEFINE(hsize_t);
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
2016-07-18 08:18:42 +08:00
|
|
|
|
/* Declare extern free list to manage the H5S_sel_iter_t struct */
|
|
|
|
|
H5FL_EXTERN(H5S_sel_iter_t);
|
|
|
|
|
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2012-04-17 05:20:26 +08:00
|
|
|
|
* Function: H5D__select_io
|
2004-10-02 07:00:42 +08:00
|
|
|
|
*
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
* Purpose: Perform I/O directly from application memory and a file
|
2004-10-02 07:00:42 +08:00
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
* Tuesday, November 27, 2007
|
2004-10-02 07:00:42 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
static herr_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
2004-10-02 07:00:42 +08:00
|
|
|
|
{
|
2016-07-18 08:18:42 +08:00
|
|
|
|
H5S_sel_iter_t *mem_iter = NULL; /* Memory selection iteration info */
|
|
|
|
|
hbool_t mem_iter_init = FALSE; /* Memory selection iteration info has been initialized */
|
|
|
|
|
H5S_sel_iter_t *file_iter = NULL; /* File selection iteration info */
|
|
|
|
|
hbool_t file_iter_init = FALSE; /* File selection iteration info has been initialized */
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
hsize_t *mem_off = NULL; /* Pointer to sequence offsets in memory */
|
|
|
|
|
hsize_t *file_off = NULL; /* Pointer to sequence offsets in the file */
|
|
|
|
|
size_t *mem_len = NULL; /* Pointer to sequence lengths in memory */
|
|
|
|
|
size_t *file_len = NULL; /* Pointer to sequence lengths in the file */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
size_t curr_mem_seq; /* Current memory sequence to operate on */
|
|
|
|
|
size_t curr_file_seq; /* Current file sequence to operate on */
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
size_t mem_nseq; /* Number of sequences generated in the file */
|
|
|
|
|
size_t file_nseq; /* Number of sequences generated in memory */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
size_t vec_size; /* Vector length */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_STATIC
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
/* Check args */
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HDassert(io_info);
|
|
|
|
|
HDassert(io_info->dset);
|
|
|
|
|
HDassert(io_info->store);
|
2016-02-07 23:37:33 +08:00
|
|
|
|
HDassert(TRUE == H5P_isa_class(io_info->raw_dxpl_id, H5P_DATASET_XFER));
|
2008-05-01 03:51:13 +08:00
|
|
|
|
HDassert(io_info->u.rbuf);
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
/* Allocate the vector I/O arrays */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(io_info->dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE)
|
|
|
|
|
vec_size = io_info->dxpl_cache->vec_size;
|
|
|
|
|
else
|
|
|
|
|
vec_size = H5D_IO_VECTOR_SIZE;
|
|
|
|
|
if(NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, vec_size)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array")
|
|
|
|
|
if(NULL == (mem_off = H5FL_SEQ_MALLOC(hsize_t, vec_size)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array")
|
|
|
|
|
if(NULL == (file_len = H5FL_SEQ_MALLOC(size_t, vec_size)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O length vector array")
|
|
|
|
|
if(NULL == (file_off = H5FL_SEQ_MALLOC(hsize_t, vec_size)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate I/O offset vector array")
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
/* Check for only one element in selection */
|
|
|
|
|
if(nelmts == 1) {
|
|
|
|
|
/* Get offset of first element in selections */
|
|
|
|
|
if(H5S_SELECT_OFFSET(file_space, file_off) < 0)
|
|
|
|
|
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve file selection offset")
|
|
|
|
|
if(H5S_SELECT_OFFSET(mem_space, mem_off) < 0)
|
|
|
|
|
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "can't retrieve memory selection offset")
|
|
|
|
|
|
|
|
|
|
/* Set up necessary information for I/O operation */
|
|
|
|
|
file_nseq = mem_nseq = 1;
|
|
|
|
|
curr_mem_seq = curr_file_seq = 0;
|
|
|
|
|
*file_off *= elmt_size;
|
|
|
|
|
*mem_off *= elmt_size;
|
|
|
|
|
*file_len = *mem_len = elmt_size;
|
|
|
|
|
|
|
|
|
|
/* Perform I/O on memory and file sequences */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
if(io_info->op_type == H5D_IO_OP_READ) {
|
|
|
|
|
if((tmp_file_len = (*io_info->layout_ops.readvv)(io_info,
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
file_nseq, &curr_file_seq, file_len, file_off,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
|
2004-10-02 07:00:42 +08:00
|
|
|
|
} /* end if */
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
else {
|
2008-05-01 03:51:13 +08:00
|
|
|
|
HDassert(io_info->op_type == H5D_IO_OP_WRITE);
|
|
|
|
|
if((tmp_file_len = (*io_info->layout_ops.writevv)(io_info,
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
file_nseq, &curr_file_seq, file_len, file_off,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
|
|
|
|
|
} /* end else */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
/* Decrement number of elements left to process */
|
2009-01-09 01:27:15 +08:00
|
|
|
|
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
} /* end if */
|
|
|
|
|
else {
|
|
|
|
|
size_t mem_nelem; /* Number of elements used in memory sequences */
|
|
|
|
|
size_t file_nelem; /* Number of elements used in file sequences */
|
|
|
|
|
|
2016-07-18 08:18:42 +08:00
|
|
|
|
/* Allocate the iterators */
|
|
|
|
|
if(NULL == (mem_iter = H5FL_MALLOC(H5S_sel_iter_t)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate memory iterator")
|
|
|
|
|
if(NULL == (file_iter = H5FL_MALLOC(H5S_sel_iter_t)))
|
|
|
|
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator")
|
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
/* Initialize file iterator */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(H5S_select_iter_init(file_iter, file_space, elmt_size) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
|
|
|
|
|
file_iter_init = 1; /* File selection iteration info has been initialized */
|
|
|
|
|
|
|
|
|
|
/* Initialize memory iterator */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(H5S_select_iter_init(mem_iter, mem_space, elmt_size) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator")
|
|
|
|
|
mem_iter_init = 1; /* Memory selection iteration info has been initialized */
|
|
|
|
|
|
|
|
|
|
/* Initialize sequence counts */
|
|
|
|
|
curr_mem_seq = curr_file_seq = 0;
|
|
|
|
|
mem_nseq = file_nseq = 0;
|
|
|
|
|
|
|
|
|
|
/* Loop, until all bytes are processed */
|
|
|
|
|
while(nelmts > 0) {
|
|
|
|
|
/* Check if more file sequences are needed */
|
|
|
|
|
if(curr_file_seq >= file_nseq) {
|
|
|
|
|
/* Get sequences for file selection */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(H5S_SELECT_GET_SEQ_LIST(file_space, H5S_GET_SEQ_LIST_SORTED, file_iter, vec_size, nelmts, &file_nseq, &file_nelem, file_off, file_len) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
|
|
|
|
|
|
|
|
|
|
/* Start at the beginning of the sequences again */
|
|
|
|
|
curr_file_seq = 0;
|
|
|
|
|
} /* end if */
|
|
|
|
|
|
|
|
|
|
/* Check if more memory sequences are needed */
|
|
|
|
|
if(curr_mem_seq >= mem_nseq) {
|
|
|
|
|
/* Get sequences for memory selection */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(H5S_SELECT_GET_SEQ_LIST(mem_space, 0, mem_iter, vec_size, nelmts, &mem_nseq, &mem_nelem, mem_off, mem_len) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed")
|
|
|
|
|
|
|
|
|
|
/* Start at the beginning of the sequences again */
|
|
|
|
|
curr_mem_seq = 0;
|
|
|
|
|
} /* end if */
|
|
|
|
|
|
|
|
|
|
/* Perform I/O on memory and file sequences */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
if(io_info->op_type == H5D_IO_OP_READ) {
|
|
|
|
|
if((tmp_file_len = (*io_info->layout_ops.readvv)(io_info,
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
file_nseq, &curr_file_seq, file_len, file_off,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
|
|
|
|
|
} /* end if */
|
|
|
|
|
else {
|
2008-05-01 03:51:13 +08:00
|
|
|
|
HDassert(io_info->op_type == H5D_IO_OP_WRITE);
|
|
|
|
|
if((tmp_file_len = (*io_info->layout_ops.writevv)(io_info,
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
file_nseq, &curr_file_seq, file_len, file_off,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
mem_nseq, &curr_mem_seq, mem_len, mem_off)) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
|
|
|
|
|
} /* end else */
|
|
|
|
|
|
|
|
|
|
/* Decrement number of elements left to process */
|
2009-01-09 01:27:15 +08:00
|
|
|
|
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
|
|
|
|
|
nelmts -= ((size_t)tmp_file_len / elmt_size);
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
} /* end while */
|
|
|
|
|
} /* end else */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
done:
|
2016-07-18 08:18:42 +08:00
|
|
|
|
/* Release selection iterators */
|
|
|
|
|
if(file_iter_init && H5S_SELECT_ITER_RELEASE(file_iter) < 0)
|
|
|
|
|
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
|
|
|
|
|
if(file_iter)
|
|
|
|
|
file_iter = H5FL_FREE(H5S_sel_iter_t, file_iter);
|
|
|
|
|
if(mem_iter_init && H5S_SELECT_ITER_RELEASE(mem_iter) < 0)
|
|
|
|
|
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
|
|
|
|
|
if(mem_iter)
|
|
|
|
|
mem_iter = H5FL_FREE(H5S_sel_iter_t, mem_iter);
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
|
/* Release vector arrays, if allocated */
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(file_len)
|
2009-01-09 01:27:15 +08:00
|
|
|
|
file_len = H5FL_SEQ_FREE(size_t, file_len);
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(file_off)
|
2009-01-09 01:27:15 +08:00
|
|
|
|
file_off = H5FL_SEQ_FREE(hsize_t, file_off);
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(mem_len)
|
2009-01-09 01:27:15 +08:00
|
|
|
|
mem_len = H5FL_SEQ_FREE(size_t, mem_len);
|
2016-07-18 08:18:42 +08:00
|
|
|
|
if(mem_off)
|
2009-01-09 01:27:15 +08:00
|
|
|
|
mem_off = H5FL_SEQ_FREE(hsize_t, mem_off);
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5D__select_io() */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2012-04-17 05:20:26 +08:00
|
|
|
|
* Function: H5D__select_read
|
2004-10-02 07:00:42 +08:00
|
|
|
|
*
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
* Purpose: Reads directly from file into application memory.
|
2004-10-02 07:00:42 +08:00
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
|
|
|
|
* Tuesday, July 23, 2002
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
herr_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
2004-10-02 07:00:42 +08:00
|
|
|
|
{
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
/* Call generic selection operation */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
|
2012-04-17 05:20:26 +08:00
|
|
|
|
if(H5D__select_io(io_info, type_info->src_type_size, (size_t)nelmts,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
file_space, mem_space) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
done:
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5D__select_read() */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2012-04-17 05:20:26 +08:00
|
|
|
|
* Function: H5D__select_write
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Writes directly from application memory into a file
|
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
|
|
|
|
* Tuesday, July 23, 2002
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
herr_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
{
|
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
/* Call generic selection operation */
|
2008-05-01 03:51:13 +08:00
|
|
|
|
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
|
2012-04-17 05:20:26 +08:00
|
|
|
|
if(H5D__select_io(io_info, type_info->dst_type_size, (size_t)nelmts,
|
2008-05-01 03:51:13 +08:00
|
|
|
|
file_space, mem_space) < 0)
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|
|
|
|
|
done:
|
[svn-r14307] Description:
- Extracted common code from H5D_select_read/H5D_select_write into single
routine (H5D_select_io) and made H5D_select_read/H5D_select_write
"gateway" routines, passing I/O buffer to operate on in "op" struct.
- Create optimized pathway in H5D_select_io for I/O operations on single
elements.
- Make "get linear offset of first element" callback for each type of
selection (used in "optimized pathway", above)
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2007-11-30 02:44:07 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5D__select_write() */
|
2004-10-02 07:00:42 +08:00
|
|
|
|
|