2003-02-12 21:44:31 +08:00
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* Copyright by The HDF Group. *
|
2003-02-12 21:44:31 +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 *
|
2017-04-18 03:32:16 +08:00
|
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
|
|
|
|
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
|
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
|
* help@hdfgroup.org. *
|
2003-02-12 21:44:31 +08:00
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
/* Module Info: Operations on bit vectors. A bit vector is an array of bytes
|
|
|
|
|
* with the least-significant bits in the first byte. That is,
|
|
|
|
|
* the bytes are in little-endian order.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*/
|
2003-02-12 21:44:31 +08:00
|
|
|
|
|
2015-09-14 11:58:59 +08:00
|
|
|
|
#include "H5Tmodule.h" /* This source code file is part of the H5T module */
|
2001-04-06 01:29:14 +08:00
|
|
|
|
|
2003-06-27 23:59:48 +08:00
|
|
|
|
|
2003-02-12 21:44:31 +08:00
|
|
|
|
#include "H5private.h" /*generic functions */
|
|
|
|
|
#include "H5Eprivate.h" /*error handling */
|
2004-02-06 00:10:40 +08:00
|
|
|
|
#include "H5MMprivate.h" /* Memory management */
|
2003-02-12 21:44:31 +08:00
|
|
|
|
#include "H5Tpkg.h" /*data-type functions */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
#include "H5WBprivate.h" /* Wrapped Buffers */
|
|
|
|
|
|
1998-06-13 01:31:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_copy
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Copies bits from one vector to another.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: void
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
void
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
size_t src_offset, size_t size)
|
1998-06-13 01:31:06 +08:00
|
|
|
|
{
|
2011-10-22 07:05:15 +08:00
|
|
|
|
size_t shift;
|
|
|
|
|
size_t mask_lo, mask_hi;
|
|
|
|
|
size_t s_idx, d_idx;
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
/* Normalize the offset to be a byte number and a bit offset within that
|
1998-06-17 03:38:26 +08:00
|
|
|
|
* byte.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*/
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
s_idx = src_offset / 8;
|
|
|
|
|
d_idx = dst_offset / 8;
|
1998-06-17 03:38:26 +08:00
|
|
|
|
src_offset %= 8;
|
|
|
|
|
dst_offset %= 8;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
/* Get things rolling. This means copying bits until we're aligned on a
|
1998-06-17 03:38:26 +08:00
|
|
|
|
* source byte. This the following example, five bits are copied to the
|
1998-06-13 01:31:06 +08:00
|
|
|
|
* destination.
|
|
|
|
|
*
|
|
|
|
|
* src[s_idx]
|
|
|
|
|
* +---------------+---------------+
|
|
|
|
|
* |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
|
|
|
|
|
* +---------------+---------------+
|
|
|
|
|
* ... : : : : : | | | | |
|
|
|
|
|
* ... v v v v v V V V V V
|
|
|
|
|
* ...+---------------+---------------+
|
|
|
|
|
* ...|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
|
2004-12-29 22:26:20 +08:00
|
|
|
|
* ...+---------------+---------------+
|
1998-06-13 01:31:06 +08:00
|
|
|
|
* dst[d_idx+1] dst[d_idx]
|
|
|
|
|
*/
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (src_offset && size > 0) {
|
|
|
|
|
size_t nbits = MIN3(size, 8 - dst_offset, 8 - src_offset);
|
|
|
|
|
size_t mask = ((size_t)1 << nbits) - 1;
|
|
|
|
|
|
|
|
|
|
dst[d_idx] &= (uint8_t)~(mask << dst_offset);
|
|
|
|
|
dst[d_idx] = (uint8_t)(dst[d_idx] | (((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset));
|
|
|
|
|
|
|
|
|
|
src_offset += nbits;
|
|
|
|
|
if (src_offset >= 8) {
|
|
|
|
|
s_idx++;
|
|
|
|
|
src_offset %= 8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dst_offset += nbits;
|
|
|
|
|
if (dst_offset >= 8) {
|
|
|
|
|
d_idx++;
|
|
|
|
|
dst_offset %= 8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
size -= nbits;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* The middle bits. We are aligned on a source byte which needs to be
|
1998-06-13 01:31:06 +08:00
|
|
|
|
* copied to two (or one in the degenerate case) destination bytes.
|
|
|
|
|
*
|
|
|
|
|
* src[s_idx]
|
|
|
|
|
* +---------------+
|
|
|
|
|
* |7 6 5 4 3 2 1 0|
|
|
|
|
|
* +---------------+
|
|
|
|
|
* | | | | | | | |
|
|
|
|
|
* V V V V V V V V
|
|
|
|
|
* +---------------+---------------+
|
|
|
|
|
* |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
|
|
|
|
|
* +---------------+---------------+
|
|
|
|
|
* dst[d_idx+1] dst[d_idx]
|
|
|
|
|
*
|
2005-08-14 04:53:35 +08:00
|
|
|
|
*
|
1998-06-17 03:38:26 +08:00
|
|
|
|
* Calculate shifts and masks. See diagrams below. MASK_LO in this
|
|
|
|
|
* example is 0x1f (the low five bits) and MASK_HI is 0xe0 (the high three
|
|
|
|
|
* bits). SHIFT is three since the source must be shifted right three bits
|
|
|
|
|
* to line up with the destination.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*/
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
shift = dst_offset;
|
2011-10-22 07:05:15 +08:00
|
|
|
|
mask_lo = ((size_t)1 << (8 - shift)) - 1;
|
1998-07-01 05:30:28 +08:00
|
|
|
|
mask_hi = (~mask_lo) & 0xff;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
for (/*void*/; size > 8; size -= 8, d_idx++, s_idx++) {
|
|
|
|
|
if (shift) {
|
|
|
|
|
dst[d_idx + 0] &= (uint8_t)(~(mask_lo << shift));
|
|
|
|
|
dst[d_idx + 0] |= (uint8_t)((src[s_idx] & mask_lo) << shift);
|
|
|
|
|
dst[d_idx + 1] &= (uint8_t)(~(mask_hi >> (8 - shift)));
|
|
|
|
|
dst[d_idx + 1] |= (uint8_t)((src[s_idx] & mask_hi) >> (8 - shift));
|
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
else
|
2017-12-01 09:12:37 +08:00
|
|
|
|
dst[d_idx] = src[s_idx];
|
|
|
|
|
}
|
1998-06-13 01:31:06 +08:00
|
|
|
|
|
|
|
|
|
/* Finish up */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (size > 0) {
|
|
|
|
|
size_t nbits = (size_t)MIN3 (size, 8 - dst_offset, 8 - src_offset);
|
|
|
|
|
size_t mask = ((size_t)1 << nbits) - 1;
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
dst[d_idx] &= (uint8_t)(~(mask << dst_offset));
|
|
|
|
|
dst[d_idx] = (uint8_t)(dst[d_idx] | (((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset));
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
src_offset += nbits;
|
|
|
|
|
if (src_offset >= 8) {
|
|
|
|
|
s_idx++;
|
|
|
|
|
src_offset %= 8;
|
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
dst_offset += nbits;
|
|
|
|
|
if (dst_offset >= 8) {
|
|
|
|
|
d_idx++;
|
|
|
|
|
dst_offset %= 8;
|
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
size -= nbits;
|
|
|
|
|
}
|
2012-04-17 05:20:26 +08:00
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI_VOID
|
|
|
|
|
} /* end H5T__bit_copy() */
|
1998-06-13 01:31:06 +08:00
|
|
|
|
|
2004-02-05 06:52:01 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_shift
|
2004-02-05 06:52:01 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Simulation of hardware shifting. Shifts a bit vector
|
2004-02-05 06:52:01 +08:00
|
|
|
|
* in a way similar to shifting a variable value, like
|
2005-08-14 04:53:35 +08:00
|
|
|
|
* value <<= 3, or value >>= 16. SHIFT_DIST is positive for
|
2004-04-13 04:49:36 +08:00
|
|
|
|
* left shift, negative for right shift. The bit vector starts
|
2004-04-14 02:37:06 +08:00
|
|
|
|
* at OFFSET and is SIZE long. The caller has to make sure
|
|
|
|
|
* SIZE+OFFSET doesn't exceed the size of BUF.
|
|
|
|
|
*
|
|
|
|
|
* For example, if we have a bit sequence 00011100, offset=2,
|
2005-08-14 04:53:35 +08:00
|
|
|
|
* size=3, shift_dist=2, the result will be 00010000.
|
2004-02-05 06:52:01 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: void
|
2004-02-05 06:52:01 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
herr_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
|
2004-02-05 06:52:01 +08:00
|
|
|
|
{
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
uint8_t tmp_buf[512]; /* Temporary buffer */
|
|
|
|
|
H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */
|
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2004-02-05 06:52:01 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2004-02-06 00:10:40 +08:00
|
|
|
|
|
|
|
|
|
/* Sanity check */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDassert(buf);
|
|
|
|
|
HDassert(size);
|
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (shift_dist) {
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
size_t abs_shift_dist = (size_t)ABS(shift_dist);
|
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (abs_shift_dist >= size)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_set(buf, offset, size, 0);
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
else {
|
|
|
|
|
size_t buf_size = (size / 8) + 1; /* Size of shift buffer needed */
|
|
|
|
|
uint8_t *shift_buf; /* Pointer to shift buffer */
|
|
|
|
|
|
|
|
|
|
/* Wrap the local buffer for serialized header info */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (NULL == (wb = H5WB_wrap(tmp_buf, sizeof(tmp_buf))))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't wrap buffer")
|
|
|
|
|
|
|
|
|
|
/* Get a pointer to a buffer that's large enough */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (NULL == (shift_buf = (uint8_t *)H5WB_actual(wb, buf_size)))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "can't get actual buffer")
|
|
|
|
|
|
|
|
|
|
/* Shift vector by making copies */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (shift_dist > 0) { /* left shift */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
/* Copy part to be shifted to a temporary buffer */
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(shift_buf, (size_t)0, buf, offset, size - abs_shift_dist);
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
/* Copy it back to the original buffer */
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(buf, offset + abs_shift_dist, shift_buf, (size_t)0, size - abs_shift_dist);
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
/* Zero-set the left part*/
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_set(buf, offset, abs_shift_dist, 0);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
else { /* right shift */
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(shift_buf, (size_t)0, buf, offset + abs_shift_dist, size - abs_shift_dist);
|
|
|
|
|
H5T__bit_copy(buf, offset, shift_buf, (size_t)0, size - abs_shift_dist);
|
|
|
|
|
H5T__bit_set(buf, offset + size - abs_shift_dist, abs_shift_dist, 0);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
} /* end else */
|
|
|
|
|
} /* end if */
|
2004-02-05 06:52:01 +08:00
|
|
|
|
|
|
|
|
|
done:
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
/* Release resources */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (wb && H5WB_unwrap(wb) < 0)
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
|
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_shift() */
|
2004-02-05 06:52:01 +08:00
|
|
|
|
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_get_d
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Return a small bit sequence as a number. Bit vector starts
|
2004-03-14 01:39:41 +08:00
|
|
|
|
* at OFFSET and is SIZE bits long.
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: Success: The bit sequence interpretted as an unsigned
|
|
|
|
|
* integer.
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Failure: 0
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
2005-11-15 10:55:39 +08:00
|
|
|
|
uint64_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
|
1998-07-01 05:30:28 +08:00
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
uint64_t val = 0;
|
|
|
|
|
size_t i, hs;
|
|
|
|
|
uint64_t ret_value = 0; /* Return value */
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
2002-05-29 23:07:55 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDassert(8 * sizeof(val) >= size);
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy((uint8_t*)&val, (size_t)0, buf, offset, size);
|
2006-10-03 03:59:46 +08:00
|
|
|
|
switch(H5T_native_order_g) {
|
2002-08-10 04:48:23 +08:00
|
|
|
|
case H5T_ORDER_LE:
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case H5T_ORDER_BE:
|
2017-12-01 09:12:37 +08:00
|
|
|
|
for (i = 0, hs = sizeof(val) / 2; i < hs; i++) {
|
2002-08-10 04:48:23 +08:00
|
|
|
|
uint8_t tmp = ((uint8_t*)&val)[i];
|
2006-10-03 03:59:46 +08:00
|
|
|
|
((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val) - (i + 1)];
|
|
|
|
|
((uint8_t*)&val)[sizeof(val) - (i + 1)] = tmp;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
2002-08-10 04:48:23 +08:00
|
|
|
|
break;
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
case H5T_ORDER_ERROR:
|
|
|
|
|
case H5T_ORDER_VAX:
|
|
|
|
|
case H5T_ORDER_NONE:
|
2010-10-21 21:08:44 +08:00
|
|
|
|
case H5T_ORDER_MIXED:
|
2002-08-10 04:48:23 +08:00
|
|
|
|
default:
|
2006-08-03 07:41:53 +08:00
|
|
|
|
/* Unknown endianness. Bail out. */
|
2006-10-03 03:59:46 +08:00
|
|
|
|
HGOTO_DONE(UFAIL)
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
2002-08-10 04:48:23 +08:00
|
|
|
|
/* Set return value */
|
2006-10-03 03:59:46 +08:00
|
|
|
|
ret_value = val;
|
2002-08-10 04:48:23 +08:00
|
|
|
|
|
2006-10-03 03:59:46 +08:00
|
|
|
|
done:
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_get_d() */
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_set_d
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Sets part of a bit vector to the specified unsigned value.
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: void
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
void
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
|
1998-07-01 05:30:28 +08:00
|
|
|
|
{
|
|
|
|
|
size_t i, hs;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDassert(8 * sizeof(val) >= size);
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
switch(H5T_native_order_g) {
|
2001-01-10 05:22:30 +08:00
|
|
|
|
case H5T_ORDER_LE:
|
|
|
|
|
break;
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
2001-01-10 05:22:30 +08:00
|
|
|
|
case H5T_ORDER_BE:
|
2017-12-01 09:12:37 +08:00
|
|
|
|
for (i = 0, hs = sizeof(val) / 2; i < hs; i++) {
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
uint8_t tmp = ((uint8_t *)&val)[i];
|
|
|
|
|
((uint8_t *)&val)[i] = ((uint8_t *)&val)[sizeof(val) - (i + 1)];
|
|
|
|
|
((uint8_t *)&val)[sizeof(val) - (i + 1)] = tmp;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
2001-01-10 05:22:30 +08:00
|
|
|
|
break;
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
case H5T_ORDER_ERROR:
|
|
|
|
|
case H5T_ORDER_VAX:
|
|
|
|
|
case H5T_ORDER_NONE:
|
2010-10-21 21:08:44 +08:00
|
|
|
|
case H5T_ORDER_MIXED:
|
2001-01-10 05:22:30 +08:00
|
|
|
|
default:
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDabort();
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(buf, offset, (uint8_t*)&val, (size_t)0, size);
|
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI_VOID
|
|
|
|
|
} /* end H5T__bit_set_d() */
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
1998-06-13 01:31:06 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_set
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Sets or clears bits in a contiguous region of a vector
|
|
|
|
|
* beginning at bit OFFSET and continuing for SIZE bits.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: void
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
void
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
|
1998-06-13 01:31:06 +08:00
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
int idx;
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
|
|
|
|
|
1998-06-17 03:38:26 +08:00
|
|
|
|
/* Normalize */
|
2001-08-15 06:09:56 +08:00
|
|
|
|
idx = (int)offset / 8;
|
1998-06-17 03:38:26 +08:00
|
|
|
|
offset %= 8;
|
|
|
|
|
|
|
|
|
|
/* The first partial byte */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (size && offset % 8) {
|
|
|
|
|
size_t nbits = MIN(size, 8 - offset);
|
|
|
|
|
unsigned mask = ((unsigned)1 << nbits) - 1;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (value)
|
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] | (mask << offset));
|
|
|
|
|
else
|
|
|
|
|
buf[idx] &= (uint8_t)(~(mask << offset));
|
2015-06-01 23:43:13 +08:00
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
idx++;
|
|
|
|
|
size -= nbits;
|
|
|
|
|
}
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
1998-06-17 03:38:26 +08:00
|
|
|
|
/* The middle bytes */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (size >= 8) {
|
|
|
|
|
buf[idx++] = value ? 0xff : 0x00;
|
|
|
|
|
size -= 8;
|
|
|
|
|
}
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
|
|
|
|
/* The last partial byte */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (size) {
|
|
|
|
|
if (value)
|
|
|
|
|
buf[idx] |= (uint8_t)(((unsigned)1 << size) - 1);
|
|
|
|
|
else
|
|
|
|
|
buf[idx] &= (uint8_t)(~(((unsigned)1 << size) - 1));
|
|
|
|
|
}
|
2012-04-17 05:20:26 +08:00
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI_VOID
|
|
|
|
|
} /* end H5T__bit_set() */
|
1998-06-13 01:31:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_find
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Finds the first bit with the specified VALUE within a region
|
|
|
|
|
* of a bit vector. The region begins at OFFSET and continues
|
|
|
|
|
* for SIZE bits, but the region can be searched from the least
|
|
|
|
|
* significat end toward the most significant end(H5T_BIT_LSB
|
|
|
|
|
* as DIRECTION), or from the most significant end to the least
|
|
|
|
|
* significant end(H5T_BIT_MSB as DIRECTION).
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: Success: The position of the bit found, relative to
|
|
|
|
|
* the offset.
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Failure: -1
|
1998-06-13 01:31:06 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
ssize_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
|
1998-06-13 01:31:06 +08:00
|
|
|
|
hbool_t value)
|
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
ssize_t base = (ssize_t)offset;
|
|
|
|
|
ssize_t idx, i;
|
|
|
|
|
size_t iu;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
ssize_t ret_value = (-1); /* Return value */
|
1998-06-17 03:38:26 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
2002-05-29 02:17:12 +08:00
|
|
|
|
|
1998-06-17 03:38:26 +08:00
|
|
|
|
/* Some functions call this with value=TRUE */
|
2008-08-22 04:30:19 +08:00
|
|
|
|
HDassert(TRUE == 1);
|
|
|
|
|
|
2017-12-01 09:12:37 +08:00
|
|
|
|
switch (direction) {
|
2008-08-22 04:30:19 +08:00
|
|
|
|
case H5T_BIT_LSB:
|
|
|
|
|
/* Calculate index */
|
|
|
|
|
idx = (ssize_t)(offset / 8);
|
|
|
|
|
offset %= 8;
|
|
|
|
|
|
|
|
|
|
/* Beginning */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (offset) {
|
|
|
|
|
for (iu = offset; iu < 8 && size > 0; iu++, size--)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> iu) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + (ssize_t)iu - base);
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
offset = 0;
|
|
|
|
|
idx++;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
} /* end if */
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
/* Middle */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (size >= 8) {
|
|
|
|
|
if ((value ? 0x00 : 0xff) != buf[idx])
|
|
|
|
|
for (i = 0; i < 8; i++)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> i) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + i - base);
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
size -= 8;
|
|
|
|
|
idx++;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
} /* end while */
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
/* End */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
for (i = 0; i < (ssize_t)size; i++)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> i) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + i - base);
|
2008-08-22 04:30:19 +08:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case H5T_BIT_MSB:
|
|
|
|
|
/* Calculate index */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
idx = (ssize_t)((offset + size - 1) / 8);
|
2008-08-22 04:30:19 +08:00
|
|
|
|
offset %= 8;
|
|
|
|
|
|
|
|
|
|
/* Beginning */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (size > 8 - offset && (offset + size) % 8) {
|
|
|
|
|
for (iu = (offset + size) % 8; iu > 0; --iu, --size)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> (iu - 1)) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + (ssize_t)(iu - 1) - base);
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
--idx;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
} /* end if */
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
/* Middle */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (size >= 8) {
|
|
|
|
|
if ((value ? 0x00 : 0xff) != buf[idx]) {
|
|
|
|
|
for (i = 7; i >= 0; --i)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> i) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + i - base);
|
|
|
|
|
} /* end if */
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
size -= 8;
|
|
|
|
|
--idx;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
} /* end while */
|
|
|
|
|
|
2008-08-22 04:30:19 +08:00
|
|
|
|
/* End */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (size > 0) {
|
|
|
|
|
for (iu = offset + size; iu > offset; --iu)
|
|
|
|
|
if (value == (hbool_t)((buf[idx] >> (iu - 1)) & 0x01))
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HGOTO_DONE(8 * idx + (ssize_t)(iu - 1) - base);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
2008-08-22 04:30:19 +08:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
HDassert(0 && "Unknown bit search direction");
|
|
|
|
|
} /* end switch */
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2002-08-09 00:52:55 +08:00
|
|
|
|
done:
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_find() */
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2016-06-06 08:45:37 +08:00
|
|
|
|
* Function: H5T__bit_inc
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2016-06-06 08:45:37 +08:00
|
|
|
|
* Purpose: Increment part of a bit field by adding 1. The bit field
|
2004-03-14 01:39:41 +08:00
|
|
|
|
* starts with bit position START and is SIZE bits long.
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
2016-06-06 08:45:37 +08:00
|
|
|
|
* Return: The carry-out value. TRUE if overflows, FALSE otherwise.
|
1998-07-01 05:30:28 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
2016-06-06 08:45:37 +08:00
|
|
|
|
hbool_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
|
1998-07-01 05:30:28 +08:00
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
size_t idx = start / 8;
|
|
|
|
|
unsigned carry = 1;
|
|
|
|
|
unsigned acc, mask;
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
HDassert(buf);
|
2002-05-29 02:17:12 +08:00
|
|
|
|
|
1998-07-01 05:30:28 +08:00
|
|
|
|
start %= 8;
|
|
|
|
|
|
|
|
|
|
/* The first partial byte */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (start) {
|
2016-06-06 08:45:37 +08:00
|
|
|
|
if(size + start < 8)
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
mask = ((unsigned)1 << size) - 1;
|
2016-06-06 08:45:37 +08:00
|
|
|
|
else
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
mask = ((unsigned)1 << (8 - start)) - 1;
|
2016-06-06 08:45:37 +08:00
|
|
|
|
acc = ((unsigned)buf[idx] >> start) & mask;
|
|
|
|
|
acc++;
|
|
|
|
|
carry = acc & ((unsigned)1 << MIN(size, 8 - start));
|
|
|
|
|
buf[idx] &= (uint8_t)(~(mask << start));
|
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] | ((acc & mask) << start));
|
|
|
|
|
size -= MIN(size, 8 - start);
|
|
|
|
|
start = 0;
|
|
|
|
|
idx++;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
|
|
|
|
/* The middle */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (carry && size >= 8) {
|
2016-06-06 08:45:37 +08:00
|
|
|
|
acc = buf[idx];
|
|
|
|
|
acc++;
|
|
|
|
|
carry = acc & 0x100;
|
|
|
|
|
buf[idx] = acc & 0xff;
|
|
|
|
|
idx++;
|
|
|
|
|
size -= 8;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
|
|
|
|
/* The last bits */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (carry && size > 0) {
|
2016-06-06 08:45:37 +08:00
|
|
|
|
mask = ((unsigned)1 << size) - 1;
|
|
|
|
|
acc = buf[idx] & mask;
|
|
|
|
|
acc++;
|
|
|
|
|
carry = acc & ((unsigned)1 << size);
|
|
|
|
|
buf[idx] &= (uint8_t)(~mask);
|
|
|
|
|
buf[idx] |= (uint8_t)(acc & mask);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
1998-07-01 05:30:28 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(carry ? TRUE : FALSE)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_inc() */
|
2004-02-05 06:52:01 +08:00
|
|
|
|
|
2004-03-18 01:36:34 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_dec
|
2004-03-18 01:36:34 +08:00
|
|
|
|
*
|
2016-06-06 08:45:37 +08:00
|
|
|
|
* Purpose: Decrement part of a bit field by substracting 1. The bit
|
2004-03-18 01:36:34 +08:00
|
|
|
|
* field starts with bit position START and is SIZE bits long.
|
|
|
|
|
*
|
2016-06-06 08:45:37 +08:00
|
|
|
|
* Return: The "borrow-in" value. It's TRUE if underflows, FALSE
|
|
|
|
|
* otherwise.
|
2004-03-18 01:36:34 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
2016-06-06 08:45:37 +08:00
|
|
|
|
hbool_t
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
|
2004-03-18 01:36:34 +08:00
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
size_t idx = start / 8;
|
2004-03-18 01:36:34 +08:00
|
|
|
|
size_t pos = start % 8;
|
|
|
|
|
uint8_t tmp;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
unsigned borrow = 0;
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
2004-03-18 01:36:34 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDassert(buf);
|
|
|
|
|
HDassert(size);
|
2004-03-18 01:36:34 +08:00
|
|
|
|
|
|
|
|
|
/* The first partial byte */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if ((size + start - 1) / 8 > idx) {
|
|
|
|
|
/* The bit sequence doesn't end in the same byte as starts */
|
|
|
|
|
|
2005-08-14 04:53:35 +08:00
|
|
|
|
/* Example: a sequence like 11000100 and start = 3. We substract 00001000 from
|
|
|
|
|
* it and get 10111100. If a sequence is 00000111, we do right shift for START
|
2004-03-18 01:36:34 +08:00
|
|
|
|
* bits and get 00000000. So we need to borrow from higher byte when we substract
|
|
|
|
|
* 00001000.
|
2005-08-14 04:53:35 +08:00
|
|
|
|
*/
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (!(buf[idx] >> pos))
|
2004-03-18 01:36:34 +08:00
|
|
|
|
borrow = 1;
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] - (1 << pos));
|
2004-03-18 01:36:34 +08:00
|
|
|
|
idx++;
|
2004-03-20 03:55:42 +08:00
|
|
|
|
size -= (8 - pos);
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
/* The middle bytes */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
while (borrow && size >= 8) {
|
|
|
|
|
if (buf[idx])
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
borrow = 0;
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx]--;
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
idx++;
|
|
|
|
|
size -= 8;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
/* The last partial byte */
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if (borrow && size > 0) {
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
/* Similar to the first byte case, where sequence ends in the same byte as starts */
|
|
|
|
|
tmp = buf[idx];
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx]--;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if ((buf[idx] >> size) != tmp >> size)
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] + (1 << size));
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* The bit sequence ends in the same byte as starts */
|
|
|
|
|
|
2005-08-14 04:53:35 +08:00
|
|
|
|
/* Example: a sequence like 11000100 and pos=3, size=3. We substract 00001000
|
2004-03-18 01:36:34 +08:00
|
|
|
|
* and get 10111100. A bit is borrowed from 6th bit(buf[idx]>>6=00000010, tmp>>6=00000011,
|
|
|
|
|
* not equal). We need to put this bit back by increment 1000000.
|
2005-08-14 04:53:35 +08:00
|
|
|
|
*/
|
2004-03-18 01:36:34 +08:00
|
|
|
|
tmp = buf[idx];
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] - (1 << pos));
|
2017-12-01 09:12:37 +08:00
|
|
|
|
if ((buf[idx] >> (pos + size)) != tmp >> (pos + size)) {
|
2010-10-21 21:08:44 +08:00
|
|
|
|
buf[idx] = (uint8_t)(buf[idx] + (1 << (pos + size)));
|
2004-03-18 01:36:34 +08:00
|
|
|
|
borrow = 1;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
FUNC_LEAVE_NOAPI(borrow ? TRUE : FALSE)
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_dec() */
|
2004-03-18 01:36:34 +08:00
|
|
|
|
|
2004-03-20 03:55:42 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Function: H5T__bit_neg
|
2004-03-20 03:55:42 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Purpose: Negate part of a bit sequence. The bit field starts with
|
|
|
|
|
* bit position START and is SIZE bits long.
|
2004-03-20 03:55:42 +08:00
|
|
|
|
*
|
2017-12-01 09:12:37 +08:00
|
|
|
|
* Return: void
|
2004-03-20 03:55:42 +08:00
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
void
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_neg(uint8_t *buf, size_t start, size_t size)
|
2004-03-20 03:55:42 +08:00
|
|
|
|
{
|
2017-12-01 09:12:37 +08:00
|
|
|
|
size_t idx = start / 8;
|
2004-03-20 03:55:42 +08:00
|
|
|
|
size_t pos = start % 8;
|
2010-10-21 21:08:44 +08:00
|
|
|
|
uint8_t tmp[1];
|
2005-08-14 04:53:35 +08:00
|
|
|
|
|
2012-04-17 05:20:26 +08:00
|
|
|
|
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
|
|
|
|
FUNC_ENTER_PACKAGE_NOERR
|
2004-03-20 03:55:42 +08:00
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
HDassert(buf);
|
|
|
|
|
HDassert(size);
|
2004-03-20 03:55:42 +08:00
|
|
|
|
|
|
|
|
|
/* The first partial byte */
|
2010-10-21 21:08:44 +08:00
|
|
|
|
tmp[0] = (uint8_t)~buf[idx];
|
2004-03-20 03:55:42 +08:00
|
|
|
|
|
|
|
|
|
/* Simply copy the negated bit field back to the original byte */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
if((size + start - 1) / 8 > idx) { /*bit sequence doesn't end in the same byte as starts*/
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(&(buf[idx]), pos, tmp, pos, (8-pos));
|
2004-03-20 03:55:42 +08:00
|
|
|
|
idx++;
|
|
|
|
|
size -= (8 - pos);
|
|
|
|
|
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
/* The middle bytes */
|
|
|
|
|
while(size >= 8) {
|
|
|
|
|
buf[idx] = (uint8_t)~(buf[idx]);
|
|
|
|
|
idx++;
|
|
|
|
|
size -= 8;
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|
|
|
|
|
/* The last partial byte */
|
|
|
|
|
if(size > 0) {
|
|
|
|
|
/* Similar to the first byte case, where sequence ends in the same byte as starts */
|
2010-10-21 21:08:44 +08:00
|
|
|
|
tmp[0] = (uint8_t)~buf[idx];
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(&(buf[idx]), (size_t)0, tmp, (size_t)0, size);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* bit sequence ends in the same byte as starts */
|
2012-04-17 05:20:26 +08:00
|
|
|
|
H5T__bit_copy(&(buf[idx]), pos, tmp, pos, size);
|
2017-12-01 09:12:37 +08:00
|
|
|
|
}
|
2004-03-20 03:55:42 +08:00
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI_VOID
|
2012-04-17 05:20:26 +08:00
|
|
|
|
} /* end H5T__bit_neg() */
|
[svn-r18625] Description:
Checkpoint progress on Bz#1398 - strict aliasing issues. (Lots of compiler
warnings & code cleanups also)
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.3 (amazon) in debug mode
Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2010-04-24 04:03:17 +08:00
|
|
|
|
|