summaryrefslogtreecommitdiffstats
ModeNameSize
d---------CVSROOT398logstatsplain
-rw-r--r--Doxyfile6600logstatsplain
-rw-r--r--INSTALL151logstatsplain
-rw-r--r--LANGUAGE.HOWTO2239logstatsplain
-rw-r--r--LICENSE18007logstatsplain
-rw-r--r--Makefile.in2412logstatsplain
-rw-r--r--Makefile.win_make.in819logstatsplain
-rw-r--r--Makefile.win_nmake.in775logstatsplain
-rw-r--r--PLATFORMS383logstatsplain
-rw-r--r--README456logstatsplain
-rw-r--r--VERSION16logstatsplain
d---------addon72logstatsplain
-rwxr-xr-xconfigure11741logstatsplain
d---------doc1916logstatsplain
d---------examples2065logstatsplain
-rw-r--r--make.bat1908logstatsplain
d---------packages30logstatsplain
d---------qtools2904logstatsplain
d---------src5830logstatsplain
d---------tmake228logstatsplain
d---------wintools35logstatsplain
_GET_EXTENT_TYPE(space)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_NULL space"); - if(coord==NULL || num_elem==0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "elements not specified"); - if(!(op==H5S_SELECT_SET || op==H5S_SELECT_APPEND || op==H5S_SELECT_PREPEND)) - HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "unsupported operation attempted"); + if(NULL == (space = H5I_object_verify(spaceid, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + if(H5S_SCALAR == H5S_GET_EXTENT_TYPE(space)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_SCALAR space") + if(H5S_NULL == H5S_GET_EXTENT_TYPE(space)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "point doesn't support H5S_NULL space") + if(coord == NULL || num_elem == 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "elements not specified") + if(!(op == H5S_SELECT_SET || op == H5S_SELECT_APPEND || op == H5S_SELECT_PREPEND)) + HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "unsupported operation attempted") /* Call the real element selection routine */ - if((ret_value=H5S_select_elements(space,op,num_elem,coord))<0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't select elements"); + if((ret_value = H5S_select_elements(space, op, num_elem, coord)) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't select elements") done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } /* H5Sselect_elements() */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index aa8a418..bd27f09 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -258,8 +258,8 @@ H5_DLL herr_t H5S_select_all(H5S_t *space, hbool_t rel_prev); H5_DLL herr_t H5S_select_none(H5S_t *space); /* Operations on point selections */ -H5_DLL herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, - size_t num_elem, const hsize_t **coord); +H5_DLL herr_t H5S_select_elements(H5S_t *space, H5S_seloper_t op, + size_t num_elem, const hsize_t *coord); /* Operations on hyperslab selections */ H5_DLL herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t start[], diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 4a49da2..4b26cc8 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -126,8 +126,7 @@ H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); #endif /* NEW_HYPERSLAB_API */ H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, - size_t num_elemn, - const hsize_t **coord); + size_t num_elem, const hsize_t *coord); H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id); H5_DLL herr_t H5Sset_extent_none(hid_t space_id); H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id); diff --git a/test/dsets.c b/test/dsets.c index 797421f..3435087 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -6025,7 +6025,7 @@ test_random_chunks(void) if((m = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; /* Select the random points for writing */ - if(H5Sselect_elements(s, H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord) < 0) TEST_ERROR; + if(H5Sselect_elements(s, H5S_SELECT_SET, NPOINTS, coord) < 0) TEST_ERROR; /* Write into dataset */ if(H5Dwrite(d, H5T_NATIVE_INT, m, s, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; @@ -6050,7 +6050,7 @@ test_random_chunks(void) if((m = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; /* Select the random points for reading */ - if(H5Sselect_elements (s, H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord) < 0) TEST_ERROR; + if(H5Sselect_elements (s, H5S_SELECT_SET, NPOINTS, coord) < 0) TEST_ERROR; /* Read from dataset */ if(H5Dread(d, H5T_NATIVE_INT, m, s, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; @@ -6118,7 +6118,7 @@ test_random_chunks(void) if((m = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; /* Select the random points for writing */ - if(H5Sselect_elements(s, H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord) < 0) TEST_ERROR; + if(H5Sselect_elements(s, H5S_SELECT_SET, NPOINTS, coord) < 0) TEST_ERROR; /* Write into dataset */ if(H5Dwrite(d, H5T_NATIVE_INT, m, s, H5P_DEFAULT, wbuf) < 0) TEST_ERROR; @@ -6143,7 +6143,7 @@ test_random_chunks(void) if((m = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR; /* Select the random points for reading */ - if(H5Sselect_elements (s, H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord) < 0) TEST_ERROR; + if(H5Sselect_elements (s, H5S_SELECT_SET, NPOINTS, coord) < 0) TEST_ERROR; /* Read from dataset */ if(H5Dread(d, H5T_NATIVE_INT, m, s, H5P_DEFAULT, rbuf) < 0) TEST_ERROR; diff --git a/test/getname.c b/test/getname.c index 22abb79..954790f 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2725,7 +2725,7 @@ test_reg_ref(hid_t fapl) /* Create a reference to elements selection */ if((status = H5Sselect_none(space_id)) < 0) TEST_ERROR - if((status = H5Sselect_elements(space_id, H5S_SELECT_SET, num_points,(const hsize_t **)coord)) < 0) + if((status = H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, coord)) < 0) TEST_ERROR if((status = H5Rcreate(&ref[1], file_id, REFREG_DSETNAMEV, H5R_DATASET_REGION, space_id)) < 0) TEST_ERROR diff --git a/test/objcopy.c b/test/objcopy.c index 96e6954..5fdbdba 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -325,7 +325,7 @@ attach_reg_ref_attr(hid_t file_id, hid_t loc_id) /* create reg_ref of point selection */ if(H5Sselect_none(space_id) < 0) TEST_ERROR - if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t **)coord) < 0) TEST_ERROR + if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, coord) < 0) TEST_ERROR if(H5Rcreate(&ref[1], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) TEST_ERROR /* create reg_ref attribute */ @@ -408,7 +408,7 @@ create_reg_ref_dataset(hid_t file_id, hid_t loc_id) if(H5Sselect_hyperslab(space_id,H5S_SELECT_SET,start,NULL,count,NULL) < 0) TEST_ERROR if(H5Rcreate(&ref[0], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) TEST_ERROR if(H5Sselect_none(space_id) < 0) TEST_ERROR - if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, (const hsize_t **)coord) < 0) TEST_ERROR + if(H5Sselect_elements(space_id, H5S_SELECT_SET, num_points, coord) < 0) TEST_ERROR if(H5Rcreate(&ref[1], file_id, dsetnamev, H5R_DATASET_REGION, space_id) < 0) TEST_ERROR if(H5Dwrite(dsetr_id, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT,ref) < 0) TEST_ERROR if(H5Dclose(dsetr_id) < 0) TEST_ERROR diff --git a/test/tcoords.c b/test/tcoords.c index d741672..ab921d8 100644 --- a/test/tcoords.c +++ b/test/tcoords.c @@ -113,7 +113,7 @@ static void test_single_end(hid_t file) CHECK(did, FAIL, "H5Dopen"); /* Select the elements in the dataset */ - ret = H5Sselect_elements(sid, H5S_SELECT_SET, 12, (const hsize_t**)da_elmts1); + ret = H5Sselect_elements(sid, H5S_SELECT_SET, 12, da_elmts1); CHECK(ret, FAIL, "H5Sselect_elements"); msid = H5Screate_simple(4, mem1_dims, mem1_dims); @@ -143,7 +143,7 @@ static void test_single_end(hid_t file) CHECK(did, FAIL, "H5Dopen"); /* Select the elements in the dataset */ - ret = H5Sselect_elements(sid, H5S_SELECT_SET, 6, (const hsize_t**)da_elmts2); + ret = H5Sselect_elements(sid, H5S_SELECT_SET, 6, da_elmts2); CHECK(ret, FAIL, "H5Sselect_elements"); msid = H5Screate_simple(4, mem2_dims, mem2_dims); diff --git a/test/th5s.c b/test/th5s.c index 6808679..983838e 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -378,7 +378,7 @@ test_h5s_null(void) hsize_t coord[1][1]; /* Coordinates for point selection */ coord[0][0]=0; - ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t **)coord); + ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, coord); } H5E_END_TRY; VERIFY(ret, FAIL, "H5Sselect_elements"); diff --git a/test/trefer.c b/test/trefer.c index 70ad2e7..f8e2287 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -407,7 +407,7 @@ test_reference_region(void) coord1[7][0] = 9; coord1[7][1] = 0; coord1[8][0] = 7; coord1[8][1] = 1; coord1[9][0] = 3; coord1[9][1] = 3; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); ret = (int)H5Sget_select_npoints(sid2); @@ -679,7 +679,7 @@ test_reference_region_1D(void) coord1[7][0] = 89; coord1[8][0] = 97; coord1[9][0] = 03; - ret = H5Sselect_elements(sid3, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid3, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); ret = (int)H5Sget_select_npoints(sid3); @@ -1264,7 +1264,7 @@ test_reference_compat(void) coord1[7][0] = 9; coord1[7][1] = 0; coord1[8][0] = 7; coord1[8][1] = 1; coord1[9][0] = 3; coord1[9][1] = 3; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Create second dataset region */ diff --git a/test/tselect.c b/test/tselect.c index 661226e..23afc46 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -447,7 +447,7 @@ test_select_point(hid_t xfer_plist) coord1[7][0]=1; coord1[7][1]= 0; coord1[7][2]= 4; coord1[8][0]=2; coord1[8][1]= 1; coord1[8][2]= 6; coord1[9][0]=0; coord1[9][1]= 3; coord1[9][2]= 8; - ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -472,7 +472,7 @@ test_select_point(hid_t xfer_plist) coord1[7][0]=1; coord1[7][1]=14; coord1[7][2]= 6; coord1[8][0]=2; coord1[8][1]= 2; coord1[8][2]= 5; coord1[9][0]=0; coord1[9][1]= 6; coord1[9][2]=13; - ret = H5Sselect_elements(sid1, H5S_SELECT_APPEND, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid1, H5S_SELECT_APPEND, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -497,7 +497,7 @@ test_select_point(hid_t xfer_plist) coord2[7][0]=29; coord2[7][1]= 4; coord2[8][0]= 8; coord2[8][1]= 8; coord2[9][0]=19; coord2[9][1]=17; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord2); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord2); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -526,7 +526,7 @@ test_select_point(hid_t xfer_plist) coord2[7][0]=12; coord2[7][1]= 2; coord2[8][0]=21; coord2[8][1]=12; coord2[9][0]= 9; coord2[9][1]=18; - ret = H5Sselect_elements(sid2, H5S_SELECT_PREPEND, (size_t)POINT1_NPOINTS, (const hsize_t **)coord2); + ret = H5Sselect_elements(sid2, H5S_SELECT_PREPEND, (size_t)POINT1_NPOINTS, coord2); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -568,7 +568,7 @@ test_select_point(hid_t xfer_plist) coord3[7][0]= 1; coord3[7][1]=22; coord3[8][0]=12; coord3[8][1]=21; coord3[9][0]=11; coord3[9][1]= 6; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord3); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord3); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -592,7 +592,7 @@ test_select_point(hid_t xfer_plist) coord3[7][0]= 9; coord3[7][1]=16; coord3[8][0]=12; coord3[8][1]=22; coord3[9][0]=13; coord3[9][1]= 9; - ret = H5Sselect_elements(sid2, H5S_SELECT_APPEND, (size_t)POINT1_NPOINTS, (const hsize_t **)coord3); + ret = H5Sselect_elements(sid2, H5S_SELECT_APPEND, (size_t)POINT1_NPOINTS, coord3); CHECK(ret, FAIL, "H5Sselect_elements"); /* Verify correct elements selected */ @@ -945,7 +945,7 @@ test_select_combo(void) coord1[7][0]=1; coord1[7][1]= 0; coord1[7][2]= 4; coord1[8][0]=2; coord1[8][1]= 1; coord1[8][2]= 6; coord1[9][0]=0; coord1[9][1]= 3; coord1[9][2]= 8; - ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Select 1x10 hyperslab for writing memory dataset */ @@ -1780,7 +1780,7 @@ test_select_point_copy(void) coord1[7][0]=1; coord1[7][1]= 0; coord1[7][2]= 4; coord1[8][0]=2; coord1[8][1]= 1; coord1[8][2]= 6; coord1[9][0]=0; coord1[9][1]= 3; coord1[9][2]= 8; - ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Select sequence of ten points for write dataset */ @@ -1794,7 +1794,7 @@ test_select_point_copy(void) coord2[7][0]=29; coord2[7][1]= 4; coord2[8][0]= 8; coord2[8][1]= 8; coord2[9][0]=19; coord2[9][1]=17; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord2); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord2); CHECK(ret, FAIL, "H5Sselect_elements"); /* Make a copy of the dataspace to write */ @@ -1838,7 +1838,7 @@ test_select_point_copy(void) coord3[7][0]= 1; coord3[7][1]=22; coord3[8][0]=12; coord3[8][1]=21; coord3[9][0]=11; coord3[9][1]= 6; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord3); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord3); CHECK(ret, FAIL, "H5Sselect_elements"); /* Make a copy of the dataspace to read */ @@ -2227,7 +2227,7 @@ test_select_point_offset(void) coord1[7][0]=1; coord1[7][1]= 0; coord1[7][2]= 4; coord1[8][0]=2; coord1[8][1]= 1; coord1[8][2]= 6; coord1[9][0]=0; coord1[9][1]= 3; coord1[9][2]= 8; - ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord1); + ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord1); CHECK(ret, FAIL, "H5Sselect_elements"); /* Check a valid offset */ @@ -2262,7 +2262,7 @@ test_select_point_offset(void) coord2[7][0]=23; coord2[7][1]= 4; coord2[8][0]= 8; coord2[8][1]= 8; coord2[9][0]=19; coord2[9][1]=17; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord2); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord2); CHECK(ret, FAIL, "H5Sselect_elements"); /* Choose a valid offset for the memory dataspace */ @@ -2298,7 +2298,7 @@ test_select_point_offset(void) coord3[7][0]= 1; coord3[7][1]=22; coord3[8][0]=12; coord3[8][1]=21; coord3[9][0]=11; coord3[9][1]= 6; - ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, (const hsize_t **)coord3); + ret = H5Sselect_elements(sid2, H5S_SELECT_SET, (size_t)POINT1_NPOINTS, coord3); CHECK(ret, FAIL, "H5Sselect_elements"); /* Read selection from disk */ @@ -4248,7 +4248,7 @@ test_select_point_chunk(void) points[6][1]=1; points[7][0]=6; /* In same chunk as point #3, but "earlier" in chunk */ points[7][1]=6; - ret = H5Sselect_elements(pnt1_space, H5S_SELECT_SET, (size_t)SPACE7_NPOINTS, (const hsize_t **)points); + ret = H5Sselect_elements(pnt1_space, H5S_SELECT_SET, (size_t)SPACE7_NPOINTS, points); CHECK(ret, FAIL, "H5Sselect_elements"); /* Create 1st hyperslab selection */ @@ -4284,7 +4284,7 @@ test_select_point_chunk(void) points[6][1]=2; points[7][0]=7; /* In same chunk as point #3, but "earlier" in chunk */ points[7][1]=7; - ret = H5Sselect_elements(pnt2_space, H5S_SELECT_SET, (size_t)SPACE7_NPOINTS, (const hsize_t **)points); + ret = H5Sselect_elements(pnt2_space, H5S_SELECT_SET, (size_t)SPACE7_NPOINTS, points); CHECK(ret, FAIL, "H5Sselect_elements"); /* Create 2nd hyperslab selection */ @@ -5038,7 +5038,7 @@ test_select_fill_point(hssize_t *offset) CHECK(sid1, FAIL, "H5Screate_simple"); /* Select "point" selection */ - ret = H5Sselect_elements(sid1, H5S_SELECT_SET,num_points,(const hsize_t **)