mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
25f062528b
The file docs/indexing.dox tries to provide design information for the refactoring. The primary change is to replace all walking of linked lists with the use of the NCindex data structure. Ncindex is a combination of a hash table (for name-based lookup) and a vector (for walking the elements in the index). Additionally, global vectors are added to NC_HDF5_FILE_INFO_T to support direct mapping of an e.g. dimid to the NC_DIM_INFO_T object. These global vectors exist for dimensions, types, and groups because they have globally unique id numbers. WARNING: 1. since libsrc4 and libsrchdf4 share code, there are also changes in libsrchdf4. 2. Any outstanding pull requests that change libsrc4 or libhdf4 are likely to cause conflicts with this code. 3. The original reason for doing this was for performance improvements, but as noted elsewhere, this may not be significant because the meta-data read performance apparently is being dominated by the hdf5 library because we do bulk meta-data reading rather than lazy reading.
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# This shell script runs the ncdump tests.
|
|
# $Id: run_tests.sh,v 1.18 2010/05/19 13:43:39 ed Exp $
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
echo ""
|
|
echo "*** Testing ncgen and ncdump using some test CDL files."
|
|
echo "*** creating tst_small.nc from ref_tst_small.cdl..."
|
|
${NCGEN} -b -o tst_small.nc $srcdir/ref_tst_small.cdl
|
|
echo "*** creating tst_small.cdl from tst_small.nc..."
|
|
${NCDUMP} tst_small.nc > tst_small.cdl
|
|
diff -b -w tst_small.cdl $srcdir/ref_tst_small.cdl
|
|
|
|
echo "*** creating test0_ncdump.nc from test0.cdl..."
|
|
${NCGEN} -o test0_ncdump.nc -b $srcdir/test0.cdl
|
|
echo "*** creating test1_ncdump.cdl from test0_ncdump.nc..."
|
|
${NCDUMP} -n test1_ncdump test0_ncdump.nc > test1_ncdump.cdl
|
|
echo "*** creating test1_ncdump.nc from test1_ncdump.cdl..."
|
|
${NCGEN} -b test1_ncdump.cdl
|
|
echo "*** creating test2_ncdump.cdl from test1_ncdump.nc..."
|
|
${NCDUMP} test1_ncdump.nc > test2_ncdump.cdl
|
|
echo "*** checking that test1_ncdump.cdl and test2_ncdump.cdl are the same..."
|
|
diff -b -w test1_ncdump.cdl test2_ncdump.cdl
|
|
|
|
echo "*** All tests of ncgen and ncdump using test0.cdl passed!"
|
|
exit 0
|