HDF5  1.12.0
H5VMprivate.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 COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * Programmer: Robb Matzke <matzke@llnl.gov>
16  * Friday, October 10, 1997
17  */
18 #ifndef H5VMprivate_H
19 #define H5VMprivate_H
20 
21 /* Private headers needed by this file */
22 #include "H5private.h" /* Generic Functions */
23 #include "H5Eprivate.h" /* Error handling */
24 #include "H5MMprivate.h" /* Memory management */
25 
26 /* Vector-Vector sequence operation callback */
27 typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
28  size_t len, void *udata);
29 
30 /* Vector comparison functions like Fortran66 comparison operators */
31 #define H5VM_vector_eq_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)==0)
32 #define H5VM_vector_lt_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)<0)
33 #define H5VM_vector_gt_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)>0)
34 #define H5VM_vector_le_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)<=0)
35 #define H5VM_vector_ge_s(N,V1,V2) (H5VM_vector_cmp_s (N, V1, V2)>=0)
36 #define H5VM_vector_eq_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)==0)
37 #define H5VM_vector_lt_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)<0)
38 #define H5VM_vector_gt_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)>0)
39 #define H5VM_vector_le_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)<=0)
40 #define H5VM_vector_ge_u(N,V1,V2) (H5VM_vector_cmp_u (N, V1, V2)>=0)
41 
42 /* Other functions */
43 #define H5VM_vector_cpy(N,DST,SRC) { \
44  HDassert(sizeof(*(DST))==sizeof(*(SRC))); \
45  if (SRC) H5MM_memcpy (DST, SRC, (N)*sizeof(*(DST))); \
46  else HDmemset (DST, 0, (N)*sizeof(*(DST))); \
47 }
48 
49 #define H5VM_vector_zero(N,DST) HDmemset(DST,0,(N)*sizeof(*(DST)))
50 
51 /* Given a coordinate offset array (COORDS) of type TYPE, move the unlimited
52  * dimension (UNLIM_DIM) value to offset 0, sliding any intermediate values down
53  * one position. */
54 #define H5VM_swizzle_coords(TYPE,COORDS,UNLIM_DIM) { \
55  /* COORDS must be an array of type TYPE */ \
56  HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
57  \
58  /* Nothing to do when unlimited dimension is at position 0 */ \
59  if(0 != (UNLIM_DIM)) { \
60  TYPE _tmp = (COORDS)[UNLIM_DIM]; \
61  \
62  HDmemmove(&(COORDS)[1], &(COORDS)[0], sizeof(TYPE) * (UNLIM_DIM)); \
63  (COORDS)[0] = _tmp; \
64  } /* end if */ \
65 }
66 
67 /* Given a coordinate offset array (COORDS) of type TYPE, move the value at
68  * offset 0 to offset of the unlimied dimension (UNLIM_DIM), sliding any
69  * intermediate values up one position. Undoes the "swizzle_coords" operation.
70  */
71 #define H5VM_unswizzle_coords(TYPE,COORDS,UNLIM_DIM) { \
72  /* COORDS must be an array of type TYPE */ \
73  HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
74  \
75  /* Nothing to do when unlimited dimension is at position 0 */ \
76  if(0 != (UNLIM_DIM)) { \
77  TYPE _tmp = (COORDS)[0]; \
78  \
79  HDmemmove(&(COORDS)[0], &(COORDS)[1], sizeof(TYPE) * (UNLIM_DIM)); \
80  (COORDS)[UNLIM_DIM] = _tmp; \
81  } /* end if */ \
82 }
83 
84 /* A null pointer is equivalent to a zero vector */
85 #define H5VM_ZERO NULL
86 
87 H5_DLL hsize_t H5VM_hyper_stride(unsigned n, const hsize_t *size,
88  const hsize_t *total_size,
89  const hsize_t *offset,
90  hsize_t *stride);
91 H5_DLL htri_t H5VM_hyper_eq(unsigned n, const hsize_t *offset1,
92  const hsize_t *size1, const hsize_t *offset2,
93  const hsize_t *size2);
94 H5_DLL herr_t H5VM_hyper_fill(unsigned n, const hsize_t *_size,
95  const hsize_t *total_size,
96  const hsize_t *offset, void *_dst,
97  unsigned fill_value);
98 H5_DLL herr_t H5VM_hyper_copy(unsigned n, const hsize_t *size,
99  const hsize_t *dst_total_size,
100  const hsize_t *dst_offset, void *_dst,
101  const hsize_t *src_total_size,
102  const hsize_t *src_offset, const void *_src);
103 H5_DLL herr_t H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
104  const hsize_t *stride, void *_dst,
105  unsigned fill_value);
106 H5_DLL herr_t H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *_size,
107  const hsize_t *dst_stride, void *_dst,
108  const hsize_t *src_stride, const void *_src);
109 H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_size,
110  const hssize_t *dst_stride, void *_dst,
111  const hssize_t *src_stride, const void *_src);
112 H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size,
113  size_t count);
114 H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size,
115  hsize_t *down);
117  const hsize_t *acc, const hsize_t *offset);
118 H5_DLL hsize_t H5VM_array_offset(unsigned n, const hsize_t *total_size,
119  const hsize_t *offset);
120 H5_DLL herr_t H5VM_array_calc_pre(hsize_t offset, unsigned n,
121  const hsize_t *down, hsize_t *coords);
122 H5_DLL herr_t H5VM_array_calc(hsize_t offset, unsigned n,
123  const hsize_t *total_size, hsize_t *coords);
124 H5_DLL hsize_t H5VM_chunk_index(unsigned ndims, const hsize_t *coord,
125  const uint32_t *chunk, const hsize_t *down_nchunks);
126 H5_DLL void H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord,
127  const uint32_t *chunk, hsize_t *scaled);
128 H5_DLL hsize_t H5VM_chunk_index_scaled(unsigned ndims, const hsize_t *coord,
129  const uint32_t *chunk, const hsize_t *down_nchunks, hsize_t *scaled);
130 H5_DLL ssize_t H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[],
131  hsize_t dst_off_arr[],
132  size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[],
133  hsize_t src_off_arr[],
134  H5VM_opvv_func_t op, void *op_data);
135 H5_DLL ssize_t H5VM_memcpyvv(void *_dst,
136  size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[],
137  const void *_src,
138  size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[], hsize_t src_off_arr[]);
139 
140 
141 /*-------------------------------------------------------------------------
142  * Function: H5VM_vector_reduce_product
143  *
144  * Purpose: Product reduction of a vector. Vector elements and return
145  * value are size_t because we usually want the number of
146  * elements in an array and array dimensions are always of type
147  * size_t.
148  *
149  * Return: Success: Product of elements
150  *
151  * Failure: 1 if N is zero
152  *
153  * Programmer: Robb Matzke
154  * Friday, October 10, 1997
155  *
156  * Modifications:
157  *
158  *-------------------------------------------------------------------------
159  */
161 H5VM_vector_reduce_product(unsigned n, const hsize_t *v)
162 {
163  hsize_t ret_value = 1;
164 
165  /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
167 
168  if (n && !v) HGOTO_DONE(0)
169  while (n--) ret_value *= *v++;
170 
171 done:
173 }
174 
175 /*-------------------------------------------------------------------------
176  * Function: H5VM_vector_zerop_u
177  *
178  * Purpose: Determines if all elements of a vector are zero.
179  *
180  * Return: Success: TRUE if all elements are zero,
181  * FALSE otherwise
182  *
183  * Failure: TRUE if N is zero
184  *
185  * Programmer: Robb Matzke
186  * Friday, October 10, 1997
187  *
188  * Modifications:
189  *
190  *-------------------------------------------------------------------------
191  */
193 H5VM_vector_zerop_u(int n, const hsize_t *v)
194 {
195  htri_t ret_value=TRUE; /* Return value */
196 
197  /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
199 
200  if (!v)
202  while (n--)
203  if (*v++)
205 
206 done:
208 }
209 
210 /*-------------------------------------------------------------------------
211  * Function: H5VM_vector_zerop_s
212  *
213  * Purpose: Determines if all elements of a vector are zero.
214  *
215  * Return: Success: TRUE if all elements are zero,
216  * FALSE otherwise
217  *
218  * Failure: TRUE if N is zero
219  *
220  * Programmer: Robb Matzke
221  * Friday, October 10, 1997
222  *
223  * Modifications:
224  *
225  *-------------------------------------------------------------------------
226  */
228 H5VM_vector_zerop_s(int n, const hssize_t *v)
229 {
230  htri_t ret_value=TRUE; /* Return value */
231 
232  /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
234 
235  if (!v)
237  while (n--)
238  if (*v++)
240 
241 done:
243 }
244 
245 /*-------------------------------------------------------------------------
246  * Function: H5VM_vector_cmp_u
247  *
248  * Purpose: Compares two vectors of the same size and determines if V1 is
249  * lexicographically less than, equal, or greater than V2.
250  *
251  * Return: Success: -1 if V1 is less than V2
252  * 0 if they are equal
253  * 1 if V1 is greater than V2
254  *
255  * Failure: 0 if N is zero
256  *
257  * Programmer: Robb Matzke
258  * Friday, October 10, 1997
259  *
260  * Modifications:
261  *
262  *-------------------------------------------------------------------------
263  */
264 static H5_INLINE int H5_ATTR_UNUSED
265 H5VM_vector_cmp_u (unsigned n, const hsize_t *v1, const hsize_t *v2)
266 {
267  int ret_value=0; /* Return value */
268 
269  /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
271 
272  if (v1 == v2) HGOTO_DONE(0)
273  if (v1 == NULL) HGOTO_DONE(-1)
274  if (v2 == NULL) HGOTO_DONE(1)
275  while (n--) {
276  if (*v1 < *v2) HGOTO_DONE(-1)
277  if (*v1 > *v2) HGOTO_DONE(1)
278  v1++;
279  v2++;
280  }
281 
282 done:
284 }
285 
286 
287 /*-------------------------------------------------------------------------
288  * Function: H5VM_vector_cmp_s
289  *
290  * Purpose: Compares two vectors of the same size and determines if V1 is
291  * lexicographically less than, equal, or greater than V2.
292  *
293  * Return: Success: -1 if V1 is less than V2
294  * 0 if they are equal
295  * 1 if V1 is greater than V2
296  *
297  * Failure: 0 if N is zero
298  *
299  * Programmer: Robb Matzke
300  * Wednesday, April 8, 1998
301  *
302  * Modifications:
303  *
304  *-------------------------------------------------------------------------
305  */
306 static H5_INLINE int H5_ATTR_UNUSED
307 H5VM_vector_cmp_s (unsigned n, const hssize_t *v1, const hssize_t *v2)
308 {
309  int ret_value=0; /* Return value */
310 
311  /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
313 
314  if (v1 == v2) HGOTO_DONE(0)
315  if (v1 == NULL) HGOTO_DONE(-1)
316  if (v2 == NULL) HGOTO_DONE(1)
317  while (n--) {
318  if (*v1 < *v2) HGOTO_DONE(-1)
319  if (*v1 > *v2) HGOTO_DONE(1)
320  v1++;
321  v2++;
322  }
323 
324 done:
326 }
327 
328 
329 /*-------------------------------------------------------------------------
330  * Function: H5VM_vector_inc
331  *
332  * Purpose: Increments V1 by V2
333  *
334  * Return: void
335  *
336  * Programmer: Robb Matzke
337  * Monday, October 13, 1997
338  *
339  * Modifications:
340  *
341  *-------------------------------------------------------------------------
342  */
343 static H5_INLINE void H5_ATTR_UNUSED
344 H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2)
345 {
346  while (n--) *v1++ += *v2++;
347 }
348 
349 /* Lookup table for general log2(n) routine */
350 static const unsigned char LogTable256[] =
351 {
352  0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
353  4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
354  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
355  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
356  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
357  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
358  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
359  6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
360  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
361  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
362  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
363  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
364  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
365  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
366  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
367  7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
368 };
369 
370 
371 /*-------------------------------------------------------------------------
372  * Function: H5VM_log2_gen
373  *
374  * Purpose: Determines the log base two of a number (i.e. log2(n)).
375  * (i.e. the highest bit set in a number)
376  *
377  * Note: This is from the "Bit Twiddling Hacks" at:
378  * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup
379  *
380  * The version on the web-site is for 32-bit quantities and this
381  * version has been extended for 64-bit quantities.
382  *
383  * Return: log2(n) (always - no failure condition)
384  *
385  * Programmer: Quincey Koziol
386  * Monday, March 6, 2006
387  *
388  *-------------------------------------------------------------------------
389  */
390 static H5_INLINE unsigned H5_ATTR_UNUSED
391 H5VM_log2_gen(uint64_t n)
392 {
393  unsigned r; /* r will be log2(n) */
394  register unsigned int t, tt, ttt; /* temporaries */
395 
396  if((ttt = (unsigned)(n >> 32)))
397  if((tt = (unsigned)(n >> 48)))
398  r = (t = (unsigned)(n >> 56)) ? 56 + (unsigned)LogTable256[t] : 48 + (unsigned)LogTable256[tt & 0xFF];
399  else
400  r = (t = (unsigned)(n >> 40)) ? 40 + (unsigned)LogTable256[t] : 32 + (unsigned)LogTable256[ttt & 0xFF];
401  else
402  if((tt = (unsigned)(n >> 16)))
403  r = (t = (unsigned)(n >> 24)) ? 24 + (unsigned)LogTable256[t] : 16 + (unsigned)LogTable256[tt & 0xFF];
404  else
405  /* Added 'uint8_t' cast to pacify PGCC compiler */
406  r = (t = (unsigned)(n >> 8)) ? 8 + (unsigned)LogTable256[t] : (unsigned)LogTable256[(uint8_t)n];
407 
408  return(r);
409 } /* H5VM_log2_gen() */
410 
411 
412 /* Lookup table for specialized log2(n) of power of two routine */
413 static const unsigned MultiplyDeBruijnBitPosition[32] =
414 {
415  0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
416  31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
417 };
418 
419 
420 /*-------------------------------------------------------------------------
421  * Function: H5VM_log2_of2
422  *
423  * Purpose: Determines the log base two of a number (i.e. log2(n)).
424  * (i.e. the highest bit set in a number)
425  *
426  * Note: **N must be a power of two** and is limited to 32-bit quantities.
427  *
428  * This is from the "Bit Twiddling Hacks" at:
429  * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn
430  *
431  * Return: log2(n) (always - no failure condition)
432  *
433  * Programmer: Quincey Koziol
434  * Monday, Febraury 27, 2006
435  *
436  *-------------------------------------------------------------------------
437  */
438 static H5_INLINE H5_ATTR_PURE unsigned
439 H5VM_log2_of2(uint32_t n)
440 {
441 #ifndef NDEBUG
443 #endif /* NDEBUG */
444  return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
445 } /* H5VM_log2_of2() */
446 
447 
448 /*-------------------------------------------------------------------------
449  * Function: H5VM_power2up
450  *
451  * Purpose: Round up a number to the next power of 2
452  *
453  * Return: Return the number which is a power of 2
454  *
455  * Programmer: Vailin Choi; Nov 2014
456  *
457  *-------------------------------------------------------------------------
458  */
460 H5VM_power2up(hsize_t n)
461 {
462  hsize_t ret_value = 1; /* Return value */
463 
464  /* Returns 0 when n exceeds 2^63 */
465  if(n >= (hsize_t)1 << ((sizeof(hsize_t) * CHAR_BIT) - 1))
466  ret_value = 0;
467 
468  while(ret_value && ret_value < n)
469  ret_value <<= 1;
470 
471  return(ret_value);
472 } /* H5VM_power2up */
473 
474 
475 /*-------------------------------------------------------------------------
476  * Function: H5VM_limit_enc_size
477  *
478  * Purpose: Determine the # of bytes needed to encode values within a
479  * range from 0 to a given limit
480  *
481  * Return: Number of bytes needed
482  *
483  * Programmer: Quincey Koziol
484  * Thursday, March 13, 2008
485  *
486  *-------------------------------------------------------------------------
487  */
488 static H5_INLINE unsigned H5_ATTR_UNUSED
489 H5VM_limit_enc_size(uint64_t limit)
490 {
491  return (H5VM_log2_gen(limit) / 8) + 1;
492 } /* end H5VM_limit_enc_size() */
493 
494 static const unsigned char H5VM_bit_set_g[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
495 static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE};
496 
497 
498 /*-------------------------------------------------------------------------
499  * Function: H5VM_bit_get
500  *
501  * Purpose: Determine the value of the n'th bit in a buffer.
502  *
503  * Note: No range checking on <offset> is performed!
504  *
505  * Note #2: Bits are sequentially stored in the buffer, starting with bit
506  * offset 0 in the first byte's high-bit position, proceeding down
507  * to bit offset 7 in the first byte's low-bit position, then to
508  * bit offset 8 in the second byte's high-bit position, etc.
509  *
510  * Return: TRUE/FALSE
511  *
512  * Programmer: Quincey Koziol
513  * Tuesday, November 25, 2008
514  *
515  *-------------------------------------------------------------------------
516  */
518 H5VM_bit_get(const unsigned char *buf, size_t offset)
519 {
520  /* Test the appropriate bit in the buffer */
521  return (hbool_t)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? TRUE : FALSE);
522 } /* end H5VM_bit_get() */
523 
524 
525 /*-------------------------------------------------------------------------
526  * Function: H5VM_bit_set
527  *
528  * Purpose: Set/reset the n'th bit in a buffer.
529  *
530  * Note: No range checking on <offset> is performed!
531  *
532  * Note #2: Bits are sequentially stored in the buffer, starting with bit
533  * offset 0 in the first byte's high-bit position, proceeding down
534  * to bit offset 7 in the first byte's low-bit position, then to
535  * bit offset 8 in the second byte's high-bit position, etc.
536  *
537  * Return: None
538  *
539  * Programmer: Quincey Koziol
540  * Tuesday, November 25, 2008
541  *
542  *-------------------------------------------------------------------------
543  */
544 static H5_INLINE void H5_ATTR_UNUSED
545 H5VM_bit_set(unsigned char *buf, size_t offset, hbool_t val)
546 {
547  /* Set/reset the appropriate bit in the buffer */
548  if(val)
549  buf[offset / 8] |= H5VM_bit_set_g[offset % 8];
550  else
551  buf[offset / 8] &= H5VM_bit_clear_g[offset % 8];
552 } /* end H5VM_bit_set() */
553 
554 #endif /* H5VMprivate_H */
555 
ssize_t
int ssize_t
Definition: H5public.h:167
HGOTO_DONE
#define HGOTO_DONE(ret_val)
Definition: H5Eprivate.h:86
H5VM_chunk_index
H5_DLL hsize_t H5VM_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, const hsize_t *down_nchunks)
Definition: H5VM.c:1214
size
iblock size
Definition: H5EAcache.c:787
H5VM_array_calc
H5_DLL herr_t H5VM_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *coords)
Definition: H5VM.c:1148
H5VM_array_fill
H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size, size_t count)
Definition: H5VM.c:926
uint32_t
uint32_t
Definition: H5overflow.txt:38
H5VM_opvv
H5_DLL ssize_t H5VM_opvv(size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[], size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[], hsize_t src_off_arr[], H5VM_opvv_func_t op, void *op_data)
Definition: H5VM.c:1364
FUNC_ENTER_NOAPI_NOINIT_NOERR
#define FUNC_ENTER_NOAPI_NOINIT_NOERR
Definition: H5private.h:2188
FUNC_LEAVE_NOAPI
#define FUNC_LEAVE_NOAPI(ret_value)
Definition: H5private.h:2335
H5VM_array_down
H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
Definition: H5VM.c:983
H5VM_array_offset_pre
H5_DLL hsize_t H5VM_array_offset_pre(unsigned n, const hsize_t *acc, const hsize_t *offset)
Definition: H5VM.c:1024
ret_value
ret_value
Definition: H5EAcache.c:412
H5VM_chunk_scaled
H5_DLL void H5VM_chunk_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, hsize_t *scaled)
Definition: H5VM.c:1248
uint8_t
unsigned char uint8_t
Definition: H5private.h:429
H5VM_hyper_copy
H5_DLL herr_t H5VM_hyper_copy(unsigned n, const hsize_t *size, const hsize_t *dst_total_size, const hsize_t *dst_offset, void *_dst, const hsize_t *src_total_size, const hsize_t *src_offset, const void *_src)
Definition: H5VM.c:487
HDassert
#define HDassert(X)
Definition: H5private.h:669
htri_t
int htri_t
Definition: H5public.h:160
hssize_t
hssize_t
Definition: H5overflow.txt:45
H5VM_stride_fill
H5_DLL herr_t H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size, const hsize_t *stride, void *_dst, unsigned fill_value)
Definition: H5VM.c:653
H5_ATTR_PURE
#define H5_ATTR_PURE
Definition: H5private.h:337
H5_ATTR_UNUSED
#define H5_ATTR_UNUSED
Definition: H5private.h:333
H5VM_hyper_fill
H5_DLL herr_t H5VM_hyper_fill(unsigned n, const hsize_t *_size, const hsize_t *total_size, const hsize_t *offset, void *_dst, unsigned fill_value)
Definition: H5VM.c:409
H5_INLINE
#define H5_INLINE
Definition: H5private.h:207
H5VM_hyper_stride
H5_DLL hsize_t H5VM_hyper_stride(unsigned n, const hsize_t *size, const hsize_t *total_size, const hsize_t *offset, hsize_t *stride)
Definition: H5VM.c:258
H5VM_opvv_func_t
herr_t(* H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len, void *udata)
Definition: H5VMprivate.h:27
H5VM_stride_copy_s
H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_size, const hssize_t *dst_stride, void *_dst, const hssize_t *src_stride, const void *_src)
Definition: H5VM.c:782
POWER_OF_TWO
#define POWER_OF_TWO(n)
Definition: H5private.h:397
uint64_t
uint64_t
Definition: H5overflow.txt:39
unsigned
unsigned
Definition: H5overflow.txt:31
H5VM_hyper_eq
H5_DLL htri_t H5VM_hyper_eq(unsigned n, const hsize_t *offset1, const hsize_t *size1, const hsize_t *offset2, const hsize_t *size2)
Definition: H5VM.c:358
H5VM_array_calc_pre
H5_DLL herr_t H5VM_array_calc_pre(hsize_t offset, unsigned n, const hsize_t *down, hsize_t *coords)
Definition: H5VM.c:1106
H5VM_stride_copy
H5_DLL herr_t H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *_size, const hsize_t *dst_stride, void *_dst, const hsize_t *src_stride, const void *_src)
Definition: H5VM.c:713
H5_DLL
#define H5_DLL
Definition: H5api_adpt.h:234
TRUE
#define TRUE
Definition: H5FDmulti.c:36
H5_ATTR_CONST
#define H5_ATTR_CONST
Definition: H5private.h:336
H5VM_array_offset
H5_DLL hsize_t H5VM_array_offset(unsigned n, const hsize_t *total_size, const hsize_t *offset)
Definition: H5VM.c:1064
n
*s *s n
Definition: H5HLdbg.c:111
herr_t
int herr_t
Definition: H5public.h:128
hbool_t
bool hbool_t
Definition: H5public.h:159
H5VM_chunk_index_scaled
H5_DLL hsize_t H5VM_chunk_index_scaled(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, const hsize_t *down_nchunks, hsize_t *scaled)
Definition: H5VM.c:1314
hsize_t
hsize_t
Definition: H5overflow.txt:44
while
while(nelmts)
Definition: H5EAtest.c:250
if
if(NULL==(iblock=H5EA__iblock_protect(hdr, thing_acc)))
Definition: H5EA.c:408
H5VM_memcpyvv
H5_DLL ssize_t H5VM_memcpyvv(void *_dst, size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[], const void *_src, size_t src_max_nseq, size_t *src_curr_seq, size_t src_len_arr[], hsize_t src_off_arr[])
Definition: H5VM.c:1571
H5Eprivate.h
H5private.h
FALSE
#define FALSE
Definition: H5FDmulti.c:33
H5MMprivate.h