diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.distdep | 963 | ||||
-rw-r--r-- | src/H5D.c | 16 | ||||
-rw-r--r-- | src/H5S.c | 68 | ||||
-rw-r--r-- | src/H5Shyper.c | 212 | ||||
-rw-r--r-- | src/H5Spoint.c | 66 | ||||
-rw-r--r-- | src/H5Sprivate.h | 5 | ||||
-rw-r--r-- | src/H5Spublic.h | 2 | ||||
-rw-r--r-- | src/H5Sselect.c | 98 |
8 files changed, 835 insertions, 595 deletions
diff --git a/src/.distdep b/src/.distdep index 516813c..15be2c8 100644 --- a/src/.distdep +++ b/src/.distdep @@ -1,3 +1,80 @@ +H5.o: \ + H5.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h +H5A.o: \ + H5A.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Apkg.h \ + H5Aprivate.h +H5AC.o: \ + H5AC.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h H5B.o: \ H5B.c \ H5private.h \ @@ -12,17 +89,110 @@ H5B.o: \ H5Bprivate.h \ H5Bpublic.h \ H5Eprivate.h \ - H5Epublic.h -H5Fcore.o: \ - H5Fcore.c \ + H5Epublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h +H5D.o: \ + H5D.c \ H5private.h \ H5public.h \ H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ H5Eprivate.h \ H5Epublic.h \ + H5HLprivate.h \ + H5HLpublic.h \ + H5MFprivate.h \ + H5MFpublic.h +H5E.o: \ + H5E.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h +H5F.o: \ + H5F.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h +H5Farray.o: \ + H5Farray.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ H5Fprivate.h \ - H5Fpublic.h + H5Fpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MFprivate.h \ + H5MFpublic.h +H5Fcore.o: \ + H5Fcore.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h H5Ffamily.o: \ H5Ffamily.c \ H5private.h \ @@ -30,9 +200,48 @@ H5Ffamily.o: \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ + H5Ipublic.h +H5Fistore.o: \ + H5Fistore.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MFprivate.h \ + H5MFpublic.h +H5Flow.o: \ + H5Flow.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ H5Fprivate.h \ - H5Fpublic.h + H5Fpublic.h \ + H5Dpublic.h \ + H5MMprivate.h \ + H5MMpublic.h H5Fmpio.o: \ H5Fmpio.c \ H5private.h \ @@ -74,6 +283,19 @@ H5Fsec2.o: \ H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h +H5Fsplit.o: \ + H5Fsplit.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5MFprivate.h \ + H5MFpublic.h H5Fstdio.o: \ H5Fstdio.c \ H5private.h \ @@ -87,6 +309,57 @@ H5Fstdio.o: \ H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h +H5G.o: \ + H5G.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Gpkg.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5HLprivate.h \ + H5HLpublic.h \ + H5Iprivate.h \ + H5MMprivate.h +H5Gent.o: \ + H5Gent.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Gpkg.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h H5Gnode.o: \ H5Gnode.c \ H5private.h \ @@ -116,7 +389,10 @@ H5Gnode.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Gstab.o: \ H5Gstab.c \ H5private.h \ @@ -145,8 +421,25 @@ H5Gstab.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h + H5Sprivate.h +H5HG.o: \ + H5HG.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h H5HL.o: \ H5HL.c \ H5private.h \ @@ -161,7 +454,10 @@ H5HL.o: \ H5Eprivate.h \ H5Epublic.h \ H5HLprivate.h \ - H5HLpublic.h + H5HLpublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h H5I.o: \ H5I.c \ H5private.h \ @@ -169,9 +465,7 @@ H5I.o: \ H5config.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h + H5Eprivate.h H5MF.o: \ H5MF.c \ H5private.h \ @@ -179,14 +473,15 @@ H5MF.o: \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h + H5Ipublic.h H5MM.o: \ H5MM.c \ H5private.h \ H5public.h \ - H5config.h + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h H5O.o: \ H5O.c \ H5private.h \ @@ -214,36 +509,37 @@ H5O.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h -H5Ocomp.o: \ - H5Ocomp.c \ + H5Sprivate.h +H5Oattr.o: \ + H5Oattr.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ H5Sprivate.h \ - H5Spublic.h -H5Ocont.o: \ - H5Ocont.c \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Apkg.h +H5Ocomp.o: \ + H5Ocomp.c \ H5private.h \ H5public.h \ H5config.h \ @@ -264,11 +560,9 @@ H5Ocont.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Oname.o: \ - H5Oname.c \ + H5Tpublic.h +H5Ocont.o: \ + H5Ocont.c \ H5private.h \ H5public.h \ H5config.h \ @@ -289,31 +583,9 @@ H5Oname.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Onull.o: \ - H5Onull.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h -H5Ostab.o: \ - H5Ostab.c \ + H5Tpublic.h +H5Odtype.o: \ + H5Odtype.c \ H5private.h \ H5public.h \ H5config.h \ @@ -334,132 +606,37 @@ H5Ostab.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Tbit.o: \ - H5Tbit.c \ + H5Tpublic.h +H5Oefl.o: \ + H5Oefl.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Iprivate.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ + H5HLprivate.h \ + H5HLpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h -H5Tconv.o: \ - H5Tconv.c \ - H5Iprivate.h \ - H5Ipublic.h \ - H5public.h \ - H5config.h \ - H5private.h \ - H5Eprivate.h \ - H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h -H5Flow.o: \ - H5Flow.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h -H5Fsplit.o: \ - H5Fsplit.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h -H5Gent.o: \ - H5Gent.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Gpkg.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5HLprivate.h \ - H5HLpublic.h -H5HG.o: \ - H5HG.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HGprivate.h \ - H5HGpublic.h -H5Tinit.o: \ - H5Tinit.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Tpkg.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Gprivate.h -H5Farray.o: \ - H5Farray.c \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h +H5Olayout.o: \ + H5Olayout.c \ H5private.h \ H5public.h \ H5config.h \ @@ -480,51 +657,45 @@ H5Farray.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h -H5Odtype.o: \ - H5Odtype.c \ + H5Zprivate.h +H5Omtime.o: \ + H5Omtime.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Oefl.o: \ - H5Oefl.c \ + H5Tpublic.h +H5Oname.o: \ + H5Oname.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5HLprivate.h \ - H5HLpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ @@ -533,31 +704,24 @@ H5Oefl.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h -H5Olayout.o: \ - H5Olayout.c \ +H5Onull.o: \ + H5Onull.c \ H5private.h \ H5public.h \ H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h + H5Tprivate.h H5Osdspace.o: \ H5Osdspace.c \ H5private.h \ @@ -580,9 +744,7 @@ H5Osdspace.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h + H5Tpublic.h H5Oshared.o: \ H5Oshared.c \ H5private.h \ @@ -605,21 +767,9 @@ H5Oshared.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5E.o: \ - H5E.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h -H5Oattr.o: \ - H5Oattr.c \ + H5Tpublic.h +H5Ostab.o: \ + H5Ostab.c \ H5private.h \ H5public.h \ H5config.h \ @@ -640,28 +790,24 @@ H5Oattr.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Z.o: \ - H5Z.c \ + H5Tpublic.h +H5P.o: \ + H5P.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Iprivate.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ @@ -669,7 +815,10 @@ H5Z.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h \ - H5Zpublic.h + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h H5Sall.o: \ H5Sall.c \ H5private.h \ @@ -692,11 +841,9 @@ H5Sall.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5Ssimp.o: \ - H5Ssimp.c \ + H5Tpublic.h +H5Shyper.o: \ + H5Shyper.c \ H5private.h \ H5public.h \ H5config.h \ @@ -717,152 +864,32 @@ H5Ssimp.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5V.o: \ - H5V.c \ + H5Tpublic.h +H5Spoint.o: \ + H5Spoint.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5.o: \ - H5.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ H5Sprivate.h \ H5Spublic.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5F.o: \ - H5F.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5G.o: \ - H5G.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gpkg.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5HLprivate.h -H5P.o: \ - H5P.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ H5Bprivate.h \ H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h -H5Shyper.o: \ - H5Shyper.c \ + H5HGpublic.h +H5Ssimp.o: \ + H5Ssimp.c \ H5private.h \ H5public.h \ H5config.h \ @@ -883,17 +910,16 @@ H5Shyper.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5Spoint.o: \ - H5Spoint.c \ + H5Tpublic.h +H5Sselect.o: \ + H5Sselect.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ + H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ H5Sprivate.h \ @@ -910,32 +936,23 @@ H5Spoint.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h -H5TB.o: \ - H5TB.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h -H5A.o: \ - H5A.c \ + H5Tpublic.h \ + H5Zprivate.h \ + H5Zpublic.h +H5T.o: \ + H5T.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -946,71 +963,85 @@ H5A.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ + H5Iprivate.h \ H5Eprivate.h \ H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h -H5S.o: \ - H5S.c \ + H5MMprivate.h +H5Tbit.o: \ + H5Tbit.c \ H5private.h \ H5public.h \ H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Iprivate.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Gprivate.h +H5Tconv.o: \ + H5Tconv.c \ H5Iprivate.h \ H5Ipublic.h \ + H5public.h \ + H5config.h \ + H5private.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ - H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h -H5Sselect.o: \ - H5Sselect.c \ + H5Bpublic.h +H5Tinit.o: \ + H5Tinit.c \ H5private.h \ H5public.h \ H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h \ - H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ H5Tprivate.h -H5Omtime.o: \ - H5Omtime.c \ +H5TB.o: \ + H5TB.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Eprivate.h +H5V.o: \ + H5V.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5Fprivate.h \ @@ -1023,26 +1054,28 @@ H5Omtime.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h -H5D.o: \ - H5D.c \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h +H5Z.o: \ + H5Z.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ - H5ACprivate.h \ - H5ACpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ @@ -1050,79 +1083,27 @@ H5D.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HLprivate.h \ - H5HLpublic.h \ - H5MFprivate.h \ - H5MFpublic.h -H5T.o: \ - H5T.c \ + H5Zpublic.h +H5S.o: \ + H5S.c \ H5private.h \ H5public.h \ H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ H5Iprivate.h \ + H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5MMprivate.h -H5AC.o: \ - H5AC.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Ipublic.h \ H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h -H5Fistore.o: \ - H5Fistore.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h + H5Tprivate.h @@ -575,12 +575,20 @@ H5Dread (hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, NULL == (mem_space = H5I_object(mem_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } + /* Check for valid selection */ + if(H5S_select_valid(mem_space)!=TRUE) { + HRETURN_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent"); + } /* end if */ } if (H5S_ALL != file_space_id) { if (H5_DATASPACE != H5I_group(file_space_id) || NULL == (file_space = H5I_object(file_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } + /* Check for valid selection */ + if(H5S_select_valid(file_space)!=TRUE) { + HRETURN_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent"); + } /* end if */ } if (H5P_DEFAULT == plist_id) { xfer_parms = &H5D_xfer_dflt; @@ -666,12 +674,20 @@ H5Dwrite (hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, NULL == (mem_space = H5I_object(mem_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } + /* Check for valid selection */ + if(H5S_select_valid(mem_space)!=TRUE) { + HRETURN_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent"); + } /* end if */ } if (H5S_ALL != file_space_id) { if (H5_DATASPACE != H5I_group(file_space_id) || NULL == (file_space = H5I_object(file_space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } + /* Check for valid selection */ + if(H5S_select_valid(file_space)!=TRUE) { + HRETURN_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent"); + } /* end if */ } if (H5P_DEFAULT == plist_id) { xfer_parms = &H5D_xfer_dflt; @@ -237,6 +237,10 @@ H5S_close(H5S_t *ds) assert(ds); + /* If there was a previous offset for the selection, release it */ + if(ds->select.offset!=NULL) + ds->select.offset=H5MM_xfree(ds->select.offset); + /* Release selection (this should come before the extent release) */ H5S_select_release(ds); @@ -485,8 +489,7 @@ H5S_copy(const H5S_t *src) FUNC_ENTER(H5S_copy, NULL); if (NULL==(dst = H5MM_malloc(sizeof(H5S_t)))) { - HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, - "memory allocation failed"); + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } *dst = *src; @@ -933,6 +936,11 @@ H5S_read(H5G_entry_t *ent) /* Default to entire dataspace being selected */ ds->select.type=H5S_SEL_ALL; + /* Allocate space for the offset and set it to zeros */ + if (NULL==(ds->select.offset = H5MM_calloc(ds->extent.u.simple.rank*sizeof(hssize_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + } + FUNC_LEAVE(ds); } @@ -1181,6 +1189,15 @@ H5S_set_extent_simple (H5S_t *space, int rank, const hsize_t *dims, assert(rank>=0); assert(0==rank || dims); + /* If there was a previous offset for the selection, release it */ + if(space->select.offset!=NULL) + space->select.offset=H5MM_xfree(space->select.offset); + + /* Allocate space for the offset and set it to zeros */ + if (NULL==(space->select.offset = H5MM_calloc(rank*sizeof(hssize_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + } + /* shift out of the previous state to a "simple" dataspace */ switch (space->extent.type) { case H5S_SCALAR: @@ -1567,7 +1584,7 @@ H5Sset_extent_none (hid_t space_id) H5TRACE1("e","i",space_id); /* Check args */ - if ((space = H5I_object(space_id)) == NULL) { + if (H5_DATASPACE != H5I_group(space_id) || NULL == (space = H5I_object(space_id))) { HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a data space"); } @@ -1580,6 +1597,51 @@ H5Sset_extent_none (hid_t space_id) FUNC_LEAVE(SUCCEED); } /* end H5Sset_extent_none() */ +/*-------------------------------------------------------------------------- + NAME + H5Soffset_simple + PURPOSE + Changes the offset of a selection within a simple dataspace extent + USAGE + herr_t H5Soffset_simple(space_id, offset) + hid_t space_id; IN: Dataspace object to reset + const hssize_t *offset; IN: Offset to position the selection at + RETURNS + SUCCEED/FAIL + DESCRIPTION + This function creates an offset for the selection within an extent, allowing + the same shaped selection to be moved to different locations within a + dataspace without requiring it to be re-defined. +--------------------------------------------------------------------------*/ +herr_t +H5Soffset_simple (hid_t space_id, const hssize_t *offset) +{ + H5S_t *space = NULL; /* dataspace to modify */ + + FUNC_ENTER(H5Soffset_simple, FAIL); + H5TRACE2("e","i*Hs",space_id,offset); + + /* Check args */ + if (H5_DATASPACE != H5I_group(space_id) || NULL == (space = H5I_object(space_id))) { + HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a data space"); + } + if (offset == NULL) { + HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no offset specified"); + } + + /* Allocate space for new offset */ + if(space->select.offset==NULL) { + if (NULL==(space->select.offset = H5MM_malloc(sizeof(hssize_t)*space->extent.u.simple.rank))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + } + } + + /* Copy the offset over */ + HDmemcpy(space->select.offset,offset,sizeof(hssize_t)*space->extent.u.simple.rank); + + FUNC_LEAVE(SUCCEED); +} /* end H5Soffset_simple() */ + /*------------------------------------------------------------------------- * Function: H5S_debug * diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 7a646aa..ebf6cfe 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -41,8 +41,8 @@ static intn H5S_hyper_bsearch(hssize_t size, H5S_hyper_bound_t *barr, size_t count); static H5S_hyper_region_t * H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, - H5S_hyper_bound_t **lo_bounds, - H5S_hyper_bound_t **hi_bounds, hssize_t *pos); + H5S_hyper_bound_t **lo_bounds, H5S_hyper_bound_t **hi_bounds, hssize_t *pos, + hssize_t *offset); static size_t H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info); static size_t H5S_hyper_fwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info); @@ -164,8 +164,8 @@ H5S_hyper_compare_regions (const void *r1, const void *r2) */ static H5S_hyper_region_t * H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, - H5S_hyper_bound_t **lo_bounds, - H5S_hyper_bound_t **hi_bounds, hssize_t *pos) + H5S_hyper_bound_t **lo_bounds, H5S_hyper_bound_t **hi_bounds, hssize_t *pos, + hssize_t *offset) { H5S_hyper_region_t *ret_value=NULL; /* Pointer to array to return */ H5S_hyper_node_t *node; /* Region node for a given boundary */ @@ -196,47 +196,42 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, #endif /* QAK */ for(i=0; i<bound_count; i++) { /* Skip past already iterated regions */ - if(pos[0]==(-1) || - (pos[0]>=lo_bounds[0][i].bound && pos[0] <= - hi_bounds[0][i].bound)) { + if(pos[0]==(-1) || ((pos[0]+offset[0])>=lo_bounds[0][i].bound && (pos[0]+offset[0]) <= hi_bounds[0][i].bound)) { /* Check if we've allocated the array yet */ if(num_reg==0) { /* Allocate array */ ret_value=H5MM_malloc(sizeof(H5S_hyper_region_t)); /* Initialize with first region */ - ret_value[0].start=MAX(lo_bounds[0][i].bound,pos[0]); - ret_value[0].end=hi_bounds[0][i].bound; + ret_value[0].start=MAX(lo_bounds[0][i].bound,pos[0])+offset[0]; + ret_value[0].end=hi_bounds[0][i].bound+offset[0]; /* Increment the number of regions */ num_reg++; } else { /* - * Check if we should merge this region into the current - * region. - */ + * Check if we should merge this region into the current + * region. + */ if(lo_bounds[0][i].bound<ret_value[curr_reg].end) { ret_value[curr_reg].end=MAX(hi_bounds[0][i].bound, - ret_value[curr_reg].end); - } else { - /* no overlap with previous region, add new region */ + ret_value[curr_reg].end)+(offset!=NULL ? offset[0] : 0 ); + } else { /* no overlap with previous region, add new region */ /* Check if this is actually a different region */ if(lo_bounds[0][i].bound!=ret_value[curr_reg].start && hi_bounds[0][i].bound!=ret_value[curr_reg].end) { /* Enlarge array */ - ret_value=H5MM_realloc(ret_value, - (sizeof(H5S_hyper_region_t)* - (num_reg+1))); + ret_value=H5MM_realloc(ret_value,(sizeof(H5S_hyper_region_t)*(num_reg+1))); /* Initialize with new region */ - ret_value[num_reg].start=lo_bounds[0][i].bound; - ret_value[num_reg].end=hi_bounds[0][i].bound; + ret_value[num_reg].start=lo_bounds[0][i].bound+offset[0]; + ret_value[num_reg].end=hi_bounds[0][i].bound+offset[0]; /* - * Increment the number of regions & the current - * region. - */ + * Increment the number of regions & the current + * region. + */ num_reg++; curr_reg++; } /* end if */ @@ -248,13 +243,19 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, /* Generate list of regions based on the current position */ #ifdef QAK printf("%s: check 2.0, bound_count=%d\n",FUNC,bound_count); + printf("%s: check 2.0, pos[%d]=%d, offset[%d]=%d, hi_bounds[%d][%d].bound=%d\n",FUNC,(int)dim,(int)pos[dim],(int)dim,(int)offset[dim], + (int)dim,(int)0,(int)hi_bounds[dim][0].bound); #endif /* QAK */ next_dim=dim+1; /* Skip past bounds which don't overlap */ i=0; - while(pos[dim]>hi_bounds[dim][i].bound && i<bound_count) + while(pos[dim]>(hi_bounds[dim][i].bound+offset[dim]) && i<bound_count) i++; - for(; pos[dim]>=lo_bounds[dim][i].bound && i<bound_count; i++) { +#ifdef QAK + printf("%s: check 2.0.5, lo_bounds[%d][%d].bound=%d\n",FUNC, + (int)dim,(int)i,(int)lo_bounds[dim][i].bound); +#endif /* QAK */ + for(; pos[dim]>=(lo_bounds[dim][i].bound+offset[dim]) && i<bound_count; i++) { #ifdef QAK printf("%s: check 2.1, i=%d, num_reg=%d, pos[%d]=%d\n", @@ -270,8 +271,7 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, /* Check if each boundary overlaps in the higher dimensions */ node=lo_bounds[dim][i].node; temp_dim=dim; - while(temp_dim>=0 && pos[temp_dim]>=node->start[temp_dim] && - pos[temp_dim]<=node->end[temp_dim]) + while(temp_dim>=0 && pos[temp_dim]>=(node->start[temp_dim]+offset[temp_dim]) && pos[temp_dim]<=(node->end[temp_dim]+offset[temp_dim])) temp_dim--; /* Yes, all previous positions match, this is a valid region */ @@ -288,36 +288,28 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, ret_value=H5MM_malloc(sizeof(H5S_hyper_region_t)); /* Initialize with first region */ - ret_value[0].start=MAX(node->start[next_dim],pos[next_dim]); - ret_value[0].end=node->end[next_dim]; + ret_value[0].start=MAX(node->start[next_dim],pos[next_dim])+offset[next_dim]; + ret_value[0].end=node->end[next_dim]+offset[next_dim]; #ifdef QAK - printf("%s: check 3.2, lo_bounds=%d, start=%d, " - "hi_bounds=%d, end=%d\n", - FUNC, (int)node->start[next_dim], - (int)ret_value[curr_reg].start, - (int)node->end[next_dim], - (int)ret_value[curr_reg].end); + printf("%s: check 3.2, lo_bounds=%d, start=%d, hi_bounds=%d, end=%d\n", + FUNC, (int)node->start[next_dim], (int)ret_value[curr_reg].start, + (int)node->end[next_dim], (int)ret_value[curr_reg].end); #endif /* QAK */ /* Increment the number of regions */ num_reg++; } else { #ifdef QAK - printf("%s: check 4.0, lo_bounds=%d, start=%d, " - "hi_bounds=%d, end=%d\n", - FUNC, (int)node->start[next_dim], - (int)ret_value[curr_reg].start, - (int)node->end[next_dim], - (int)ret_value[curr_reg].end); + printf("%s: check 4.0, lo_bounds=%d, start=%d, hi_bounds=%d, end=%d\n", + FUNC, (int)node->start[next_dim], (int)ret_value[curr_reg].start, + (int)node->end[next_dim], (int)ret_value[curr_reg].end); #endif /* QAK */ /* Enlarge array */ - ret_value=H5MM_realloc(ret_value, - (sizeof(H5S_hyper_region_t)* - (num_reg+1))); + ret_value=H5MM_realloc(ret_value,(sizeof(H5S_hyper_region_t)*(num_reg+1))); /* Initialize with new region */ - ret_value[num_reg].start=node->start[next_dim]; - ret_value[num_reg].end=node->end[next_dim]; + ret_value[num_reg].start=node->start[next_dim]+offset[next_dim]; + ret_value[num_reg].end=node->end[next_dim]+offset[next_dim]; /* Increment the number of regions & the current region */ num_reg++; @@ -328,8 +320,7 @@ H5S_hyper_get_regions (size_t *num_regions, intn dim, size_t bound_count, /* Sort region list and eliminate duplicates if necessary */ if(num_reg>1) { - qsort(ret_value,num_reg,sizeof(H5S_hyper_region_t), - H5S_hyper_compare_regions); + qsort(ret_value,num_reg,sizeof(H5S_hyper_region_t),H5S_hyper_compare_regions); for(i=1,curr_reg=0,uniq_reg=1; i<num_reg; i++) { if(ret_value[curr_reg].start!=ret_value[i].start && ret_value[curr_reg].end!=ret_value[i].end) { @@ -400,7 +391,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) if((regions=H5S_hyper_get_regions(&num_regions,dim, fhyper_info->space->select.sel_info.hyper_lst->count, fhyper_info->lo_bounds, fhyper_info->hi_bounds, - fhyper_info->iter->hyp.pos))!=NULL) { + fhyper_info->iter->hyp.pos,fhyper_info->space->select.offset))!=NULL) { /* * Check if this is the second to last dimension in dataset (Which @@ -419,15 +410,12 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) /* Set up hyperslab I/O parameters which apply to all regions */ /* Copy the location of the region in the file */ - HDmemcpy(file_offset, fhyper_info->iter->hyp.pos, - (fhyper_info->space->extent.u.simple.rank * - sizeof(hssize_t))); + HDmemcpy(file_offset, fhyper_info->iter->hyp.pos, (fhyper_info->space->extent.u.simple.rank * sizeof(hssize_t))); file_offset[fhyper_info->space->extent.u.simple.rank]=0; /* Set the hyperslab size to copy */ hsize[0]=1; - H5V_array_fill(hsize, hsize, sizeof(hsize[0]), - fhyper_info->space->extent.u.simple.rank); + H5V_array_fill(hsize, hsize, sizeof(hsize[0]), fhyper_info->space->extent.u.simple.rank); hsize[fhyper_info->space->extent.u.simple.rank]=fhyper_info->elmt_size; /* Set the memory offset to the origin */ @@ -438,8 +426,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) #ifdef QAK printf("%s: check 2.2, i=%d\n",FUNC,(int)i); #endif /* QAK */ - region_size=MIN(fhyper_info->nelmts, - (regions[i].end-regions[i].start)+1); + region_size=MIN(fhyper_info->nelmts, (regions[i].end-regions[i].start)+1); hsize[fhyper_info->space->extent.u.simple.rank-1]=region_size; file_offset[fhyper_info->space->extent.u.simple.rank-1]=regions[i].start; @@ -447,12 +434,9 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) * Gather from file. */ if (H5F_arr_read (fhyper_info->f, fhyper_info->layout, - fhyper_info->comp, fhyper_info->efl, - hsize, hsize, zero, file_offset, - fhyper_info->xfer_mode, - fhyper_info->dst/*out*/)<0) { - HRETURN_ERROR (H5E_DATASPACE, H5E_READERROR, 0, - "read error"); + fhyper_info->comp, fhyper_info->efl, hsize, hsize, zero, + file_offset, fhyper_info->xfer_mode, fhyper_info->dst/*out*/)<0) { + HRETURN_ERROR (H5E_DATASPACE, H5E_READERROR, 0, "read error"); } #ifdef QAK printf("%s: check 2.3, region #%d\n",FUNC,(int)i); @@ -462,8 +446,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) #endif /* QAK */ /* Advance the pointer in the buffer */ - fhyper_info->dst = ((uint8 *)fhyper_info->dst) + - region_size*fhyper_info->elmt_size; + fhyper_info->dst = ((uint8 *)fhyper_info->dst) + region_size*fhyper_info->elmt_size; /* Increment the number of elements read */ num_read+=region_size; @@ -475,8 +458,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) if(region_size==(hsize_t)((regions[i].end-regions[i].start)+1)) fhyper_info->iter->hyp.pos[dim+1]=(-1); else - fhyper_info->iter->hyp.pos[dim+1] = regions[i].start + - region_size; + fhyper_info->iter->hyp.pos[dim+1] = regions[i].start + region_size; /* Decrement the iterator count */ fhyper_info->iter->hyp.elmt_left-=region_size; @@ -492,17 +474,15 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) /* Step through each region in this dimension */ for(i=0; i<num_regions && fhyper_info->nelmts>0; i++) { /* Step through each location in each region */ - for(j=regions[i].start; - j<=regions[i].end && fhyper_info->nelmts>0; - j++) { + for(j=regions[i].start; j<=regions[i].end && fhyper_info->nelmts>0; j++) { #ifdef QAK printf("%s: check 4.0, dim=%d, location=%d\n",FUNC,dim,j); #endif /* QAK */ /* - * If we are moving to a new position in this dim, reset - * the next lower dim. location. - */ + * If we are moving to a new position in this dim, reset + * the next lower dim. location. + */ if(fhyper_info->iter->hyp.pos[dim]!=j) fhyper_info->iter->hyp.pos[dim+1]=(-1); @@ -659,7 +639,7 @@ H5S_hyper_fwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) if((regions=H5S_hyper_get_regions(&num_regions,dim, fhyper_info->space->select.sel_info.hyper_lst->count, fhyper_info->lo_bounds, fhyper_info->hi_bounds, - fhyper_info->iter->hyp.pos))!=NULL) { + fhyper_info->iter->hyp.pos,fhyper_info->space->select.offset))!=NULL) { /* Check if this is the second to last dimension in dataset */ /* (Which means that we've got a list of the regions in the fastest */ @@ -890,7 +870,7 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) if((regions=H5S_hyper_get_regions(&num_regions,dim, fhyper_info->space->select.sel_info.hyper_lst->count, fhyper_info->lo_bounds, fhyper_info->hi_bounds, - fhyper_info->iter->hyp.pos))!=NULL) { + fhyper_info->iter->hyp.pos,fhyper_info->space->select.offset))!=NULL) { /* Check if this is the second to last dimension in dataset */ /* (Which means that we've got a list of the regions in the fastest */ @@ -909,30 +889,24 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) /* Set up hyperslab I/O parameters which apply to all regions */ /* Set up the size of the memory space */ - HDmemcpy(mem_size, fhyper_info->space->extent.u.simple.size, - fhyper_info->space->extent.u.simple.rank*sizeof(hsize_t)); + HDmemcpy(mem_size, fhyper_info->space->extent.u.simple.size, fhyper_info->space->extent.u.simple.rank*sizeof(hsize_t)); mem_size[fhyper_info->space->extent.u.simple.rank]=fhyper_info->elmt_size; /* Copy the location of the region in the file */ - HDmemcpy(mem_offset, fhyper_info->iter->hyp.pos, - (fhyper_info->space->extent.u.simple.rank * - sizeof(hssize_t))); + HDmemcpy(mem_offset, fhyper_info->iter->hyp.pos, (fhyper_info->space->extent.u.simple.rank * sizeof(hssize_t))); mem_offset[fhyper_info->space->extent.u.simple.rank]=0; /* Set the hyperslab size to copy */ hsize[0]=1; - H5V_array_fill(hsize, hsize, sizeof(hsize[0]), - fhyper_info->space->extent.u.simple.rank); + H5V_array_fill(hsize, hsize, sizeof(hsize[0]), fhyper_info->space->extent.u.simple.rank); hsize[fhyper_info->space->extent.u.simple.rank]=fhyper_info->elmt_size; /* Set the memory offset to the origin */ - HDmemset (zero, 0, ((fhyper_info->space->extent.u.simple.rank+1)* - sizeof(*zero))); + HDmemset (zero, 0, ((fhyper_info->space->extent.u.simple.rank+1)* sizeof(*zero))); /* perform I/O on data from regions */ for(i=0; i<num_regions && fhyper_info->nelmts>0; i++) { - region_size=MIN(fhyper_info->nelmts, - (regions[i].end-regions[i].start)+1); + region_size=MIN(fhyper_info->nelmts, (regions[i].end-regions[i].start)+1); hsize[fhyper_info->space->extent.u.simple.rank-1]=region_size; mem_offset[fhyper_info->space->extent.u.simple.rank-1]=regions[i].start; #ifdef QAK @@ -951,8 +925,7 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) } /* Advance the pointer in the buffer */ - fhyper_info->dst = ((uint8 *)fhyper_info->dst) + - region_size*fhyper_info->elmt_size; + fhyper_info->dst = ((uint8 *)fhyper_info->dst) + region_size*fhyper_info->elmt_size; /* Increment the number of elements read */ num_read+=region_size; @@ -981,17 +954,15 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) /* Step through each region in this dimension */ for(i=0; i<num_regions && fhyper_info->nelmts>0; i++) { /* Step through each location in each region */ - for(j=regions[i].start; - j<=regions[i].end && fhyper_info->nelmts>0; - j++) { + for(j=regions[i].start; j<=regions[i].end && fhyper_info->nelmts>0; j++) { #ifdef QAK printf("%s: check 4.0, dim=%d, location=%d\n",FUNC,dim,j); #endif /* QAK */ /* - * If we are moving to a new position in this dim, reset - * the next lower dim. location. - */ + * If we are moving to a new position in this dim, reset + * the next lower dim. location. + */ if(fhyper_info->iter->hyp.pos[dim]!=j) fhyper_info->iter->hyp.pos[dim+1]=(-1); @@ -1164,7 +1135,7 @@ H5S_hyper_mwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info) if((regions=H5S_hyper_get_regions(&num_regions,dim, fhyper_info->space->select.sel_info.hyper_lst->count, fhyper_info->lo_bounds, fhyper_info->hi_bounds, - fhyper_info->iter->hyp.pos))!=NULL) { + fhyper_info->iter->hyp.pos,fhyper_info->space->select.offset))!=NULL) { #ifdef QAK printf("%s: check 2.0, rank=%d\n", @@ -1915,4 +1886,57 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src) done: FUNC_LEAVE (ret_value); } /* end H5S_hyper_copy() */ + +/*-------------------------------------------------------------------------- + NAME + H5S_hyper_select_valid + PURPOSE + Check whether the selection fits within the extent, with the current + offset defined. + USAGE + hbool_t H5S_hyper_select_valid(space); + H5S_t *space; IN: Dataspace pointer to query + RETURNS + TRUE if the selection fits within the extent, FALSE if it does not and + FAIL on an error. + DESCRIPTION + Determines if the current selection at the current offet fits within the + extent for the dataspace. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hbool_t +H5S_hyper_select_valid (const H5S_t *space) +{ + H5S_hyper_node_t *curr; /* Hyperslab information nodes */ + intn i; /* Counter */ + hbool_t ret_value=TRUE; /* return value */ + + FUNC_ENTER (H5S_hyper_select_valid, FAIL); + + assert(space); + + /* Check each point to determine whether selection+offset is within extent */ + curr=space->select.sel_info.hyper_lst->head; + while(curr!=NULL && ret_value==TRUE) { + /* Check each dimension */ + for(i=0; i<space->extent.u.simple.rank; i++) { + /* Check if an offset has been defined */ + /* Bounds check the selected point + offset against the extent */ + if(((curr->start[i]+space->select.offset[i])>(hssize_t)space->extent.u.simple.size[i]) + || ((curr->start[i]+space->select.offset[i])<0) + || ((curr->end[i]+space->select.offset[i])>(hssize_t)space->extent.u.simple.size[i]) + || ((curr->end[i]+space->select.offset[i])<0)) { + ret_value=FALSE; + break; + } /* end if */ + } /* end for */ + + curr=curr->next; + } /* end while */ + + FUNC_LEAVE (ret_value); +} /* end H5S_hyper_select_valid() */ diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 91141a4..d375e0d 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -259,10 +259,13 @@ H5S_point_fgath (H5F_t *f, const struct H5O_layout_t *layout, while(num_read<nelmts) { if(file_iter->pnt.elmt_left>0) { /* Copy the location of the point to get */ - HDmemcpy(file_offset, file_iter->pnt.curr->pnt, - ndims*sizeof(hssize_t)); + HDmemcpy(file_offset, file_iter->pnt.curr->pnt,ndims*sizeof(hssize_t)); file_offset[ndims] = 0; + /* Add in the offset */ + for(i=0; i<file_space->extent.u.simple.rank; i++) + file_offset[i] += file_space->select.offset[i]; + /* Go read the point */ if (H5F_arr_read (f, layout, comp, efl, hsize, hsize, zero, file_offset, xfer_mode, buf/*out*/)<0) { @@ -375,6 +378,10 @@ H5S_point_fscat (H5F_t *f, const struct H5O_layout_t *layout, HDmemcpy(file_offset,file_iter->pnt.curr->pnt,ndims*sizeof(hssize_t)); file_offset[ndims] = 0; + /* Add in the offset, if there is one */ + for(i=0; i<file_space->extent.u.simple.rank; i++) + file_offset[i] += file_space->select.offset[i]; + #ifdef QAK printf("%s: check 3.0\n",FUNC); { @@ -466,7 +473,7 @@ H5S_point_mgath (const void *_buf, size_t elmt_size, if(mem_iter->pnt.elmt_left>0) { /* Compute the location of the point to get */ for(i=space_ndims-1,acc=1,off=0; i>=0; i--) { - off+=mem_iter->pnt.curr->pnt[i]*acc; + off+=(mem_iter->pnt.curr->pnt[i]+mem_space->select.offset[i])*acc; acc*=mem_size[i]; } /* end for */ @@ -550,7 +557,7 @@ H5S_point_mscat (const void *_tconv_buf, size_t elmt_size, if(mem_iter->pnt.elmt_left>0) { /* Compute the location of the point to get */ for(i=space_ndims-1,acc=1,off=0; i>=0; i--) { - off+=mem_iter->pnt.curr->pnt[i]*acc; + off+=(mem_iter->pnt.curr->pnt[i]+mem_space->select.offset[i])*acc; acc*=mem_size[i]; } /* end for */ @@ -718,4 +725,55 @@ H5S_point_copy (H5S_t *dst, const H5S_t *src) done: FUNC_LEAVE (ret_value); } /* end H5S_point_copy() */ + +/*-------------------------------------------------------------------------- + NAME + H5S_point_select_valid + PURPOSE + Check whether the selection fits within the extent, with the current + offset defined. + USAGE + hbool_t H5S_point_select_valid(space); + H5S_t *space; IN: Dataspace pointer to query + RETURNS + TRUE if the selection fits within the extent, FALSE if it does not and + FAIL on an error. + DESCRIPTION + Determines if the current selection at the current offet fits within the + extent for the dataspace. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hbool_t +H5S_point_select_valid (const H5S_t *space) +{ + H5S_pnt_node_t *curr; /* Point information nodes */ + intn i; /* Counter */ + hbool_t ret_value=TRUE; /* return value */ + + FUNC_ENTER (H5S_point_select_valid, FAIL); + + assert(space); + + /* Check each point to determine whether selection+offset is within extent */ + curr=space->select.sel_info.pnt_lst->head; + while(curr!=NULL) { + /* Check each dimension */ + for(i=0; i<space->extent.u.simple.rank; i++) { + /* Check if an offset has been defined */ + /* Bounds check the selected point + offset against the extent */ + if(((curr->pnt[i]+space->select.offset[i])>(hssize_t)space->extent.u.simple.size[i]) + || ((curr->pnt[i]+space->select.offset[i])<0)) { + ret_value=FALSE; + break; + } /* end if */ + } /* end for */ + + curr=curr->next; + } /* end while */ + + FUNC_LEAVE (ret_value); +} /* end H5S_point_select_valid() */ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 611ea27..842c114 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -99,7 +99,7 @@ typedef struct { /* Selection information container */ typedef struct { H5S_sel_type type; /* Type of selection (list of points or hyperslabs) */ - hsize_t *offset; /* Offset within the extent (NULL means a 0 offset) */ + hssize_t *offset; /* Offset within the extent (NULL means a 0 offset) */ hsize_t *order; /* Selection order. (NULL means a specific ordering of points) */ hsize_t num_elem; /* Number of elements in selection */ union { @@ -227,6 +227,7 @@ hsize_t H5S_select_npoints (const H5S_t *space); intn H5S_extend (H5S_t *space, const hsize_t *size); herr_t H5S_set_extent_simple (H5S_t *space, int rank, const hsize_t *dims, const hsize_t *max); +hbool_t H5S_select_valid (const H5S_t *space); herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent, intn fwidth); @@ -288,6 +289,7 @@ herr_t H5S_point_add (H5S_t *space, size_t num_elemn, const hssize_t **coord); herr_t H5S_point_release (H5S_t *space); hsize_t H5S_point_npoints (const H5S_t *space); herr_t H5S_point_copy (H5S_t *dst, const H5S_t *src); +hbool_t H5S_point_select_valid (const H5S_t *space); /* "All" select functions */ herr_t H5S_all_init (const struct H5O_layout_t *layout, @@ -341,5 +343,6 @@ hsize_t H5S_hyper_npoints (const H5S_t *space); int H5S_hyper_compare_regions (const void *r1, const void *r2); int H5S_hyper_compare_bounds (const void *r1, const void *r2); herr_t H5S_hyper_copy (H5S_t *dst, const H5S_t *src); +hbool_t H5S_hyper_select_valid (const H5S_t *space); #endif diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 881e692..9dca348 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -66,6 +66,8 @@ herr_t H5Sset_extent_none (hid_t space_id); herr_t H5Sextent_copy (hid_t dst_id,hid_t src_id); herr_t H5Sselect_all (hid_t spaceid); herr_t H5Sselect_none (hid_t spaceid); +herr_t H5Soffset_simple (hid_t space_id, const hssize_t *offset); +hbool_t H5Sselect_valid (hid_t spaceid); #ifdef __cplusplus } diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 7f7650b..2188470 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -104,7 +104,14 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src) /* Copy regular fields */ dst->select=src->select; -/* Need to copy offset and order information still */ +/* Need to copy order information still */ + + /* Copy offset information */ + if (NULL==(dst->select.offset = H5MM_calloc(src->extent.u.simple.rank*sizeof(hssize_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + } + if(src->select.offset!=NULL) + HDmemcpy(dst->select.offset,src->select.offset,(src->extent.u.simple.rank*sizeof(hssize_t))); /* Perform correct type of copy based on the type of selection */ switch (src->extent.type) { @@ -631,7 +638,7 @@ H5S_select_npoints (const H5S_t *space) { herr_t ret_value=FAIL; /* return value */ - FUNC_ENTER (H5Sselect_npoints, FAIL); + FUNC_ENTER (H5S_select_npoints, FAIL); assert(space); @@ -701,3 +708,90 @@ H5S_sel_iter_release (const H5S_t *space, H5S_sel_iter_t *sel_iter) FUNC_LEAVE (ret_value); } /* H5S_sel_iter_release() */ + +/*-------------------------------------------------------------------------- + NAME + H5Sselect_valid + PURPOSE + Check whether the selection fits within the extent, with the current + offset defined. + USAGE + hbool_t H5Sselect_void(dsid) + hid_t dsid; IN: Dataspace ID to query + RETURNS + TRUE if the selection fits within the extent, FALSE if it does not and + FAIL on an error. + DESCRIPTION + Determines if the current selection at the current offet fits within the + extent for the dataspace. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hbool_t +H5Sselect_valid (hid_t spaceid) +{ + H5S_t *space = NULL; /* Dataspace to modify selection of */ + hbool_t ret_value=FAIL; /* return value */ + + FUNC_ENTER (H5Sselect_valid, 0); + H5TRACE1("b","i",spaceid); + + /* Check args */ + if (H5_DATASPACE != H5I_group(spaceid) || + NULL == (space=H5I_object(spaceid))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a data space"); + } + + ret_value = H5S_select_valid(space); + + FUNC_LEAVE (ret_value); +} /* H5Sselect_valid() */ + +/*-------------------------------------------------------------------------- + NAME + H5S_select_valid + PURPOSE + Check whether the selection fits within the extent, with the current + offset defined. + USAGE + hbool_t H5Sselect_void(space) + H5S_t *space; IN: Dataspace pointer to query + RETURNS + TRUE if the selection fits within the extent, FALSE if it does not and + FAIL on an error. + DESCRIPTION + Determines if the current selection at the current offet fits within the + extent for the dataspace. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +hbool_t +H5S_select_valid (const H5S_t *space) +{ + hbool_t ret_value=FAIL; /* return value */ + + FUNC_ENTER (H5S_select_valid, FAIL); + + assert(space); + + switch(space->select.type) { + case H5S_SEL_POINTS: /* Sequence of points selected */ + ret_value=H5S_point_select_valid(space); + break; + + case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ + ret_value=H5S_hyper_select_valid(space); + break; + + case H5S_SEL_ALL: /* Entire extent selected */ + case H5S_SEL_NONE: /* Nothing selected */ + ret_value=TRUE; + break; + } /* end switch */ + + FUNC_LEAVE (ret_value); +} /* H5S_select_valid() */ |