HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
H5Spublic.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at the *
10  * root level of an installed copy of the electronic HDF5 document set and *
11  * is linked from the top-level documents page. It can also be found at *
12  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
13  * access to either file, you may request a copy from help@hdfgroup.org. *
14  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /*
17  * This file contains public declarations for the H5S module.
18  */
19 #ifndef _H5Spublic_H
20 #define _H5Spublic_H
21 
22 /* Public headers needed by this file */
23 #include "H5public.h"
24 #include "H5Ipublic.h"
25 
26 /* Define atomic datatypes */
27 #define H5S_ALL 0
28 #define H5S_UNLIMITED ((hsize_t)(hssize_t)(-1))
29 
30 /* Define user-level maximum number of dimensions */
31 #define H5S_MAX_RANK 32
32 
33 /* Different types of dataspaces */
34 typedef enum H5S_class_t {
35  H5S_NO_CLASS = -1, /*error */
36  H5S_SCALAR = 0, /*scalar variable */
37  H5S_SIMPLE = 1, /*simple data space */
38  H5S_NULL = 2 /*null data space */
39 } H5S_class_t;
40 
41 /* Different ways of combining selections */
42 typedef enum H5S_seloper_t {
43  H5S_SELECT_NOOP = -1, /* error */
44  H5S_SELECT_SET = 0, /* Select "set" operation */
45  H5S_SELECT_OR, /* Binary "or" operation for hyperslabs
46  * (add new selection to existing selection)
47  * Original region: AAAAAAAAAA
48  * New region: BBBBBBBBBB
49  * A or B: CCCCCCCCCCCCCCCC
50  */
51  H5S_SELECT_AND, /* Binary "and" operation for hyperslabs
52  * (only leave overlapped regions in selection)
53  * Original region: AAAAAAAAAA
54  * New region: BBBBBBBBBB
55  * A and B: CCCC
56  */
57  H5S_SELECT_XOR, /* Binary "xor" operation for hyperslabs
58  * (only leave non-overlapped regions in selection)
59  * Original region: AAAAAAAAAA
60  * New region: BBBBBBBBBB
61  * A xor B: CCCCCC CCCCCC
62  */
63  H5S_SELECT_NOTB, /* Binary "not" operation for hyperslabs
64  * (only leave non-overlapped regions in original selection)
65  * Original region: AAAAAAAAAA
66  * New region: BBBBBBBBBB
67  * A not B: CCCCCC
68  */
69  H5S_SELECT_NOTA, /* Binary "not" operation for hyperslabs
70  * (only leave non-overlapped regions in new selection)
71  * Original region: AAAAAAAAAA
72  * New region: BBBBBBBBBB
73  * B not A: CCCCCC
74  */
75  H5S_SELECT_APPEND, /* Append elements to end of point selection */
76  H5S_SELECT_PREPEND, /* Prepend elements to beginning of point selection */
77  H5S_SELECT_INVALID /* Invalid upper bound on selection operations */
79 
80 /* Enumerated type for the type of selection */
81 typedef enum {
82  H5S_SEL_ERROR = -1, /* Error */
83  H5S_SEL_NONE = 0, /* Nothing selected */
84  H5S_SEL_POINTS = 1, /* Sequence of points selected */
85  H5S_SEL_HYPERSLABS = 2, /* "New-style" hyperslab selection defined */
86  H5S_SEL_ALL = 3, /* Entire extent selected */
87  H5S_SEL_N /*THIS MUST BE LAST */
89 
90 #ifdef __cplusplus
91 extern "C" {
92 #endif
93 
94 /* Functions in H5S.c */
96 H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[],
97  const hsize_t maxdims[]);
98 H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank,
99  const hsize_t dims[],
100  const hsize_t max[]);
101 H5_DLL hid_t H5Scopy(hid_t space_id);
102 H5_DLL herr_t H5Sclose(hid_t space_id);
103 H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc);
104 H5_DLL hid_t H5Sdecode(const void *buf);
107 H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[],
108  hsize_t maxdims[]);
109 H5_DLL htri_t H5Sis_simple(hid_t space_id);
112  const hsize_t start[],
113  const hsize_t _stride[],
114  const hsize_t count[],
115  const hsize_t _block[]);
116 /* #define NEW_HYPERSLAB_API */
117 #ifdef NEW_HYPERSLAB_API
118 H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op,
119  const hsize_t start[],
120  const hsize_t _stride[],
121  const hsize_t count[],
122  const hsize_t _block[]);
123 H5_DLL herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op,
124  hid_t space2_id);
125 H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op,
126  hid_t space2_id);
127 #endif /* NEW_HYPERSLAB_API */
129  size_t num_elem, const hsize_t *coord);
132 H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id);
141  hsize_t numblocks, hsize_t buf[/*numblocks*/]);
143  hsize_t numpoints, hsize_t buf[/*numpoints*/]);
145  hsize_t end[]);
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 #endif /* _H5Spublic_H */
152 
H5_DLL hid_t H5Scopy(hid_t space_id)
H5_DLL herr_t H5Sextent_copy(hid_t dst_id, hid_t src_id)
H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id)
H5_DLL hid_t H5Screate(H5S_class_t type)
H5_DLL herr_t H5Sclose(hid_t space_id)
GLuint start
Definition: glcorearb.h:474
#define H5_DLL
Definition: H5api_adpt.h:406
H5S_sel_type
Definition: H5Spublic.h:81
int herr_t
Definition: H5public.h:107
H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2)
unsigned long long hsize_t
Definition: H5public.h:151
H5_DLL htri_t H5Sselect_valid(hid_t spaceid)
H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[])
H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid)
H5_DLL htri_t H5Sis_simple(hid_t space_id)
const hboost::disable_if_c< VecTraits< T >::IsVec, T >::type & max(const T &a, const T &b)
Definition: Composite.h:132
H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid)
H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, hsize_t buf[])
H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid)
H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc)
H5S_seloper_t
Definition: H5Spublic.h:42
H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[])
GLuint GLuint end
Definition: glcorearb.h:474
GLintptr offset
Definition: glcorearb.h:664
H5_DLL herr_t H5Sselect_none(hid_t spaceid)
int hid_t
Definition: H5Ipublic.h:56
GLint GLsizei count
Definition: glcorearb.h:404
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid)
H5_DLL herr_t H5Sselect_all(hid_t spaceid)
H5_DLL herr_t H5Sset_extent_none(hid_t space_id)
H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id)
H5_DLL hid_t H5Sdecode(const void *buf)
H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord)
H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[])
H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[])
signed long long hssize_t
Definition: H5public.h:152
H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t _stride[], const hsize_t count[], const hsize_t _block[])
int htri_t
Definition: H5public.h:126
H5S_class_t
Definition: H5Spublic.h:34
H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id)
H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[])