das2C
das core C utilities (v3)
array.h
Go to the documentation of this file.
1 /* Copyright (C) 2017-2024 Chris Piker <chris-piker@uiowa.edu>
2  *
3  * This file is part of das2C, the Core Das2 C Library.
4  *
5  * Das2C is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * Das2C is distributed in the hope that it will be useful, but WITHOUT ANY
10  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * version 2.1 along with das2C; if not, see <http://www.gnu.org/licenses/>.
16  */
17 
20 /* I'm sure this kind of buffer has been done many times before, but I haven't
21  * seen an implementation that handles arbitrarily ragged arrays. Thanks to
22  * Larry Granroth, and Matt Leifert for helping me talk through the issues
23  * around this class.
24  * -cwp
25  */
26 
27 #ifndef _das_array_h_
28 #define _das_array_h_
29 
30 #include <stdarg.h>
31 #include <stddef.h>
32 #include <stdint.h>
33 #include <stdbool.h>
34 
35 #include <das2/value.h>
36 #include <das2/units.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
43 #define DASIDX_MAX 8
44 
45 /* WARNING! If the values below change, update das_varindex_merge */
46 /* and update das_varlength_merge */
47 
48 #define DASIDX_RAGGED -1
49 #define DASIDX_FUNC -2
50 #define DASIDX_UNUSED -3
51 
52 /*
53 #define DASIDX_INIT_UNUSED {-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3}
54 #define DASIDX_INIT_BEGIN { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
55 */
56 #define DASIDX_INIT_UNUSED {-3,-3,-3,-3,-3,-3,-3,-3}
57 #define DASIDX_INIT_BEGIN { 0, 0, 0, 0, 0, 0, 0, 0}
58 
59 
61 #ifndef _das_array_c_
62 extern const ptrdiff_t g_aShapeUnused[DASIDX_MAX];
63 extern const ptrdiff_t g_aShapeZeros[DASIDX_MAX];
64 extern const char g_sIdxLower[DASIDX_MAX];
65 extern const char g_sIdxUpper[DASIDX_MAX];
66 #endif
67 
82  ptrdiff_t* pShape, int iFirstInternal, int nShapeLen, char* sBuf, int nBufLen
83 );
84 
86 char* das_idx_prn(int nRank, ptrdiff_t* pIdx, size_t uLen, char* sBuf);
87 
88 
89 #define RANK_1(I) 1, (size_t[1]){I}
90 #define RANK_2(I, J) 2, (size_t[2]){I, J}
91 #define RANK_3(I, J, K) 3, (size_t[3]){I, J, K}
92 #define RANK_4(I, J, K, L) 4, (size_t[4]){I, J, K, L}
93 #define RANK_5(I, J, K, L, M) 5, (size_t[5]){I, J, K, L, M}
94 #define RANK_6(I, J, K, L, M, N) 6, (size_t[6]){I, J, K, L, M, N}
95 #define RANK_7(I, J, K, L, M, N, O) 7, (size_t[7]){I, J, K, L, M, N, O}
96 #define RANK_8(I, J, K, L, M, N, O, P) 8, (size_t[8]){I, J, K, L, M, N, O, P}
97 
98 #define DIM0 0, (NULL)
99 #define DIM1_AT(I) 1, (ptrdiff_t[1]){I}
100 #define DIM2_AT(I,J) 2, (ptrdiff_t[2]){I,J}
101 #define DIM3_AT(I,J,K) 3, (ptrdiff_t[3]){I,J,K}
102 #define DIM4_AT(I,J,K,L) 4, (ptrdiff_t[4]){I,J,K,L}
103 #define DIM5_AT(I,J,K,L,M) 5, (ptrdiff_t[5]){I,J,K,L,M}
104 #define DIM6_AT(I,J,K,L,M,N) 6, (ptrdiff_t[6]){I,J,K,L,M,N}
105 #define DIM7_AT(I,J,K,L,M,N,O) 7, (ptrdiff_t[7]){I,J,K,L,M,N,O}
106 
107 #define IDX0(I) (ptrdiff_t[1]){I}
108 #define IDX1(I,J) (ptrdiff_t[2]){I,J}
109 #define IDX2(I,J,K) (ptrdiff_t[3]){I,J,K}
110 #define IDX3(I,J,K,L) (ptrdiff_t[4]){I,J,K,L}
111 #define IDX4(I,J,K,L,M) (ptrdiff_t[5]){I,J,K,L,M}
112 #define IDX5(I,J,K,L,M,N) (ptrdiff_t[6]){I,J,K,L,M,N}
113 #define IDX6(I,J,K,L,M,N,O) (ptrdiff_t[7]){I,J,K,L,M,N,O}
114 #define IDX7(I,J,K,L,M,N,O,P) (ptrdiff_t[8]){I,J,K,L,M,N,O,P}
115 
116 #define DIM1 1
117 #define DIM2 2
118 #define DIM3 3
119 #define DIM4 4
120 #define DIM5 5
121 #define DIM6 6
122 #define DIM7 7
123 
124 #define RNG_1(i,I) 1, (ptrdiff_t[1]){i}, (ptrdiff_t[1]){I}
125 #define RNG_2(i,I,j,J) 2, (ptrdiff_t[2]){i,j}, (ptrdiff_t[2]){I,J}
126 #define RNG_3(i,I,j,J,k,K) 3, (ptrdiff_t[3]){i,j,k}, (ptrdiff_t[3]){I,J,K}
127 #define RNG_4(i,I,j,J,k,K,l,L) 4, (ptrdiff_t[4]){i,j,k,l}, (ptrdiff_t[4]){I,J,K,L}
128 #define RNG_5(i,I,j,J,k,K,l,L,m,M) 5, (ptrdiff_t[5]){i,j,k,l,m}, (ptrdiff_t[5]){I,J,K,L,M}
129 #define RNG_6(i,I,j,J,k,K,l,L,m,M,n,N) 6, (ptrdiff_t[6]){i,j,k,l,m,n}, (ptrdiff_t[6]){I,J,K,L,M,N}
130 #define RNG_7(i,I,j,J,k,K,l,L,m,M,n,N,o,O) 7, (ptrdiff_t[7]){i,j,k,l,m,n,o}, (ptrdiff_t[7]){I,J,K,L,M,N,O}
131 
159  int nRngRank, const ptrdiff_t* pMin, const ptrdiff_t* pMax, size_t* pShape
160 );
161 
164 /* Higher dimensions are handled by index buffers. These are the elements for
165  * the index buffers */
166 typedef struct child_info_t{
167  ptrdiff_t nOffset; /* Start of child elements data in child buffer */
168  size_t uCount; /* The count child elements in child buffer */
169 }das_idx_info;
170 
171 typedef struct dyna_buf{
172 
173  ubyte* pBuf; /* The beginning a continuous buffer uSize long */
174  ubyte* pHead; /* The beginning of valid values in the buffer */
175  /*ubyte* pWrite;*/ /* The beginning of the append point for the buffer */
176  size_t uSize; /* The amount of space in the backing buffer */
177  size_t uValid; /* The number of valid elements in this buffer */
178  size_t uElemSz; /* The number of bytes occupied by each element */
179 
180  ubyte* pFill; /* Pointer to fill value buffer */
181  ubyte fillBuf[sizeof(das_idx_info)]; /* Storage for short fill items */
182 
183  size_t uChunkSz; /* Alloc helper, if set, allocate in even chunks
184  * of this size. */
185  size_t uShape; /* Qube helper, how many items in this array per
186  * parent item, 0 means ragged */
187  das_val_type etype; /* The element type */
188 
189  bool bRollParent; /* The end mark. If set, adding data to the array
190  * will clear the end mark and trigger creation of
191  * a new parent. If this is set on all indexes
192  * attempting to add data will fail */
193 
194  bool bKeepMem; /* If true memory will not be deleted when the
195  * buffer is deleted */
196 
197 } DynaBuf;
198 
270 typedef struct das_array {
271  char sId[DAS_MAX_ID_BUFSZ]; /* A text identifier of this instance of the array */
272  int nRank; /* The number of index dimensions for the array */
273  das_idx_info* pIdx0; /* top lever container, may not point here */
274 
275  /* bool bTopOwned;*/ /* Same as pIdx0 == &index0 */
276  das_idx_info index0; /* Storage for element 0 of buffer 0, if needed */
277 
278  /* Pointers to item arrays. One array is needed for each dimension,
279  * these may point to internal locations if the array is owned */
280  DynaBuf* pBufs[DASIDX_MAX];
281 
282  /* bool bOwned[16]; */ /* Same as pBufs[i] == &(bufs[i]) */
283  DynaBuf bufs[DASIDX_MAX]; /* Storage for dynamic buffers, if needed */
284 
285  /* Current compare function, set automatically if a known type is used,
286  * otherwise user needs to supply their own */
287  int (*compare)(const ubyte* vpFirst, const ubyte* vpSecond);
288 
289  /* Where to send/read data when streaming */
290  int nSrcPktId;
291  size_t uStartItem;
292  size_t uItems;
293 
294  /* Since so many datasets and functions can reference the same array,
295  * a reference count is needed to make sure they aren't deleted if
296  * still in use. */
297  int refcount;
298 
299  /* Used to notify the owner of my memory that I'm not using it anymore. */
300  struct das_array* pMemOwner;
301 
302  unsigned int uFlags; /* Store flags indicating intended use */
303 
304  das_units units;
305 
313  void* pUser;
314 
315 } DasAry;
316 
393  const char* id, das_val_type et, size_t sz_each, const ubyte* fill,
394  int rank, size_t* shape, das_units units
395 );
396 
397 
403 DAS_API bool DasAry_init(
404  DasAry* pThis, const char* id, das_val_type et, size_t sz_each,
405  const ubyte* fill, int rank, size_t* shape, das_units units
406 );
407 
429 DAS_API DasAry* new_DasPtrAry(const char* sType, int rank, size_t* shape);
430 
434 #define D2ARY_AS_SUBSEQ 0x00000001
435 
440 #define D2ARY_FILL_TERM 0x00000003
441 
446 #define D2ARY_AS_STRING 0x00000007
447 
473 DAS_API unsigned int DasAry_setUsage(DasAry* pThis, unsigned int uFlags);
474 
478 DAS_API unsigned int DasAry_getUsage(DasAry* pThis);
479 
484 DAS_API int inc_DasAry(DasAry* pThis);
485 
489 DAS_API int ref_DasAry(const DasAry* pThis);
490 
498 DAS_API void dec_DasAry(DasAry* pThis);
499 
502 DAS_API void DasAry_deInit(DasAry* pThis);
503 
504 
543 DAS_API ubyte* DasAry_disownElements(
544  DasAry* pThis, size_t* pLen, size_t* pOffset
545 );
546 
555 DAS_API bool DasAry_ownsElements(const DasAry* pThis);
556 
563 DAS_API const char* DasAry_id(const DasAry* pThis);
564 
571 #define DasAry_rank(pThis) pThis->nRank
572 
573 /* DAS_API int DasAry_rank(const DasAry* pThis); */
574 
578 DAS_API das_units DasAry_units(const DasAry* pThis);
579 
590 DAS_API das_val_type DasAry_valType(const DasAry* pThis);
591 
595 DAS_API const char* DasAry_valTypeStr(const DasAry* pThis);
596 
605 DAS_API char* DasAry_toStr(const DasAry* pThis, char* sInfo, size_t uLen);
606 
614 DAS_API size_t DasAry_size(const DasAry* pThis);
615 
622 DAS_API size_t DasAry_valSize(const DasAry* pThis);
623 
624 
645 DAS_API size_t DasAry_memUsed(const DasAry* pThis);
646 
662 DAS_API size_t DasAry_memOwned(const DasAry* pThis);
663 
664 
677 DAS_API size_t DasAry_memIndexed(const DasAry* pThis);
678 
679 
721 DAS_API size_t DasAry_lengthIn(const DasAry* pThis, int nIdx, ptrdiff_t* pLoc);
722 
742 DAS_API int DasAry_shape(const DasAry* pThis, ptrdiff_t* pShape);
743 
744 
768 DAS_API int DasAry_stride(
769  const DasAry* pThis, ptrdiff_t* pShape, ptrdiff_t* pStride
770 );
771 
776 DAS_API const ubyte* DasAry_getFill(const DasAry* pThis);
777 
794 DAS_API bool DasAry_setFill(DasAry* pThis, das_val_type vt, const ubyte* pFill);
795 
796 
819 DAS_API bool DasAry_validAt(const DasAry* pThis, ptrdiff_t* pLoc);
820 
852 DAS_API const ubyte* DasAry_getAt(const DasAry* pThis, das_val_type et, ptrdiff_t* pLoc);
853 
856 #define DasAry_getFloatAt(pThis, pLoc) *((float*)(DasAry_getAt(pThis, vtFloat, pLoc)))
859 #define DasAry_getDoubleAt(pThis, pLoc) *((double*)(DasAry_getAt(pThis, vtDouble, pLoc)))
862 #define DasAry_getByteAt(pThis, pLoc) *((ubyte*)(DasAry_getAt(pThis, vtUByte, pLoc)))
865 #define DasAry_getUShortAt(pThis, pLoc) *((uint16_t*)(DasAry_getAt(pThis, etUint16, pLoc)))
868 #define DasAry_getShortAt(pThis, pLoc) *((int16_t*)(DasAry_getAt(pThis, etInt16, pLoc)))
871 #define DasAry_getIntAt(pThis, pLoc) *((int32_t*)(DasAry_getAt(pThis, etInt32, pLoc)))
874 #define DasAry_getLongAt(pThis, pLoc) *((int64_t*)(DasAry_getAt(pThis, etInt64, pLoc)))
877 #define DasAry_getTimeAt(pThis, pLoc) *((das_time*)(DasAry_getAt(pThis, vtTime, pLoc)))
880 #define DasAry_getTextAt(pThis, pLoc) *((char**)(DasAry_getAt(pThis, vtText, pLoc)))
881 
883 #define DasAry_getPtrAt(pThis, pLoc) *((void**)(DasAry_getAt(pThis, vtUnknown, pLoc)))
884 
885 
901 DAS_API bool DasAry_putAt(DasAry* pThis, ptrdiff_t* pStart, const ubyte* pVals, size_t uVals);
902 
945 DAS_API const ubyte* DasAry_getIn(
946  const DasAry* pThis, das_val_type et, int nDim, ptrdiff_t* pLoc, size_t* pCount
947 );
948 
956 DAS_API ubyte* DasAry_getBuf(
957  DasAry* pThis, das_val_type et, int nDim, ptrdiff_t* pLoc, size_t* pCount
958 );
959 
962 #define DasAry_getFloatsIn(T, ...) (const float*) DasAry_getIn(T, vtFloat, __VA_ARGS__)
963 
966 #define DasAry_getDoublesIn(T, ...) (const double*) DasAry_getIn(T, vtDouble, __VA_ARGS__)
967 
970 #define DasAry_getCharsIn(T, ...) (const char*) DasAry_getIn(T, vtUByte, __VA_ARGS__)
971 
974 #define DasAry_getBytesIn(T, ...) (const ubyte*) DasAry_getIn(T, vtUByte, __VA_ARGS__)
975 
978 #define DasAry_getUShortsIn(T, ...) (const uint16_t*) DasAry_getIn(T, vtUShort, __VA_ARGS__)
979 
982 #define DasAry_getShortsIn(T, ...) (const int16_t*) DasAry_getIn(T, vtShort, __VA_ARGS__)
983 
986 #define DasAry_getIntsIn(T, ...) (const int32_t*) DasAry_getIn(T, vtInt, __VA_ARGS__)
987 
990 #define DasAry_getLongsIn(T, ...) (const int64_t*) DasAry_getIn(T, vtLong, __VA_ARGS__)
991 
994 #define DasAry_getTimesIn(T, ...) (const das_time*) DasAry_getIn(T, vtTime, __VA_ARGS__)
995 
998 #define DasAry_getTextIn(T, ...) (const char**) DasAry_getIn(T, vtText, __VA_ARGS__)
999 
1020 DAS_API const ubyte* DasAry_getAllVals(
1021  const DasAry* pThis, size_t* pElSize, size_t* pElements
1022 );
1023 
1058  DasAry* pThis, const char* id, int nIndices, ptrdiff_t* pLoc
1059 );
1060 
1092 DAS_API size_t DasAry_qubeIn(DasAry* pThis, int iRecDim);
1093 
1110 DAS_API ubyte* DasAry_append(DasAry* pThis, const ubyte* pVals, size_t uCount);
1111 
1139 DAS_API void DasAry_markEnd(DasAry* pThis, int iDim);
1140 
1141 /* Remove some number of records in a given index.
1142  *
1143  * This does not actually delete any data it just removes references to it.
1144  * Thus any subsets of this array will still reference the existing values.
1145  *
1146  * @see rmLastRec() for the definition of a record
1147  */
1148 /* size_t DasAry_rmHead(Array* pThis, size_t uCount, int nIndex);*/
1149 
1150 /* Remove N records from the end of the array
1151  *
1152  * For rank 1 arrays, a 'record' is just a single value, for higher rank
1153  * arrays a record is the number of values represented by a change in the
1154  * first index. For example, for the array:
1155  * @code
1156  * a[][10][4]
1157  * @endcode
1158  * calling
1159  * @code
1160  * rmTail(pArray, 2)
1161  * @endcode
1162  * will result in 80 individual values being remove from the array.
1163  *
1164  * @param pThis the array to change
1165  * @param uRecs the number of records to remove. If uRecs is greater than
1166  * the shape of the first index, everything is removed and an error
1167  * is thrown.
1168  * @returns The new size of the array
1169  * @memberof DasAry
1170  */
1171 /* size_t DasAry_rmTail(Array* pThis, size_t uRecs); */
1172 
1183 DAS_API size_t DasAry_clear(DasAry* pThis);
1184 
1193 DAS_API int DasAry_cmp(DasAry* pThis, const ubyte* vpFirst, const ubyte* vpSecond );
1194 
1205 DAS_API void DasAry_setSrc(DasAry* pThis, int nPktId, size_t uStartItem, size_t uItems);
1206 
1207 
1208 #ifdef __cplusplus
1209 }
1210 #endif
1211 
1212 #endif /* _das_array_h_ */
char * das_shape_prnRng(ptrdiff_t *pShape, int iFirstInternal, int nShapeLen, char *sBuf, int nBufLen)
Print shape information using symbols i,j,k etc for index positions.
char * das_idx_prn(int nRank, ptrdiff_t *pIdx, size_t uLen, char *sBuf)
print a generice set of ptrdiff_t values to a character array
DAS_API void DasAry_deInit(DasAry *pThis)
Similar to dec_dasAry, but for stack objects.
DAS_API size_t DasAry_memUsed(const DasAry *pThis)
Get number of bytes currently used for data values and associated indexes by this dynamic array.
DAS_API const ubyte * DasAry_getFill(const DasAry *pThis)
Return the fill value for this array.
const ptrdiff_t g_aShapeUnused[DASIDX_MAX]
Global instance of unused array, suitable for memcpy.
DAS_API ubyte * DasAry_getBuf(DasAry *pThis, das_val_type et, int nDim, ptrdiff_t *pLoc, size_t *pCount)
This is the writable pointer version of DasAry_getIn.
DAS_API DasAry * new_DasPtrAry(const char *sType, int rank, size_t *shape)
A convenience wrapper for storing arrays of pointers.
#define DASIDX_MAX
The maximum number of array indices in das2.
Definition: array.h:43
DAS_API const ubyte * DasAry_getAllVals(const DasAry *pThis, size_t *pElSize, size_t *pElements)
Forget all the fancy indexing, just get a pointer to all the elements.
DAS_API size_t DasAry_memOwned(const DasAry *pThis)
Get the number of bytes currently owned for use in storing data values and indexes.
DAS_API bool DasAry_init(DasAry *pThis, const char *id, das_val_type et, size_t sz_each, const ubyte *fill, int rank, size_t *shape, das_units units)
Same as new_DasAry, but for initializing stack objects instead of making new heap objects.
DAS_API size_t DasAry_memIndexed(const DasAry *pThis)
Get the number of bytes needed to store these values and thier associated indexes.
int das_rng2shape(int nRngRank, const ptrdiff_t *pMin, const ptrdiff_t *pMax, size_t *pShape)
Calculate a strided array shape from a min/max range.
const char * das_units
Handle SI and other units, with accommodations for Epoch systems, from units.h.
Definition: units.h:139
das_val_type
Enumeration of types stored in Das Array (DasAry) objects from value.h.
Definition: value.h:64
Dynamic recursive ragged arrays.
Definition: array.h:270
DAS_API int inc_DasAry(DasAry *pThis)
Increment the count of objects using this Das Array.
DAS_API bool DasAry_ownsElements(const DasAry *pThis)
Does this array own it's own memory?
DAS_API char * DasAry_toStr(const DasAry *pThis, char *sInfo, size_t uLen)
Get a informational string representing the array.
DAS_API const char * DasAry_valTypeStr(const DasAry *pThis)
Get the type of value stored in the array as a text string.
DAS_API size_t DasAry_valSize(const DasAry *pThis)
Get the size in bytes of each element stored in the das array.
DAS_API int DasAry_shape(const DasAry *pThis, ptrdiff_t *pShape)
Return current valid ranges for this array indices.
DAS_API bool DasAry_putAt(DasAry *pThis, ptrdiff_t *pStart, const ubyte *pVals, size_t uVals)
Set values starting at a complete index.
DAS_API unsigned int DasAry_setUsage(DasAry *pThis, unsigned int uFlags)
Set usage flags to assist arbitrary consumers understand how to use this array.
DAS_API void DasAry_setSrc(DasAry *pThis, int nPktId, size_t uStartItem, size_t uItems)
Record which packets contain data destine for this array.
DAS_API int DasAry_stride(const DasAry *pThis, ptrdiff_t *pShape, ptrdiff_t *pStride)
Return the strides used for offest calculations.
DAS_API const ubyte * DasAry_getIn(const DasAry *pThis, das_val_type et, int nDim, ptrdiff_t *pLoc, size_t *pCount)
Get a pointer to the elements contained by a partial index.
DAS_API const char * DasAry_id(const DasAry *pThis)
Get the name of an array.
DAS_API size_t DasAry_size(const DasAry *pThis)
Get the total number of data values in an array, regardless of it's shape.
DAS_API int DasAry_cmp(DasAry *pThis, const ubyte *vpFirst, const ubyte *vpSecond)
Compare two items of the type in the array.
DAS_API das_val_type DasAry_valType(const DasAry *pThis)
Get the type of value stored in the array if knownh.
DAS_API size_t DasAry_clear(DasAry *pThis)
Clear all values from the array.
DAS_API ubyte * DasAry_disownElements(DasAry *pThis, size_t *pLen, size_t *pOffset)
Take ownership of array element memory.
DAS_API ubyte * DasAry_append(DasAry *pThis, const ubyte *pVals, size_t uCount)
Append some number of items to the end of the array.
DAS_API void DasAry_markEnd(DasAry *pThis, int iDim)
Mark a ragged dimension as finished.
DAS_API bool DasAry_validAt(const DasAry *pThis, ptrdiff_t *pLoc)
Is a valid item located at a complete index.
DAS_API size_t DasAry_lengthIn(const DasAry *pThis, int nIdx, ptrdiff_t *pLoc)
Return the current max value + 1 for any index.
DAS_API const ubyte * DasAry_getAt(const DasAry *pThis, das_val_type et, ptrdiff_t *pLoc)
Get a pointer to an element at a complete index.
DAS_API das_units DasAry_units(const DasAry *pThis)
Get the units for the values in the array.
DAS_API size_t DasAry_qubeIn(DasAry *pThis, int iRecDim)
Use fill values to make sure the last subset in a dimension is a QUBE.
DAS_API DasAry * new_DasAry(const char *id, das_val_type et, size_t sz_each, const ubyte *fill, int rank, size_t *shape, das_units units)
Creates a new dynamic array buffer.
DAS_API unsigned int DasAry_getUsage(DasAry *pThis)
Returns the usage flags for this array.
DAS_API bool DasAry_setFill(DasAry *pThis, das_val_type vt, const ubyte *pFill)
Change the fill value for this array.
DAS_API void dec_DasAry(DasAry *pThis)
Maybe remove the array.
DAS_API int ref_DasAry(const DasAry *pThis)
Return the reference count of objects using this array.
DAS_API DasAry * DasAry_subSetIn(DasAry *pThis, const char *id, int nIndices, ptrdiff_t *pLoc)
Get a lower rank array that is a sub-set of the current array.
void * pUser
User data pointer.
Definition: array.h:313
Defines units used for items in the stream, most notably time units that reference an epoch and a ste...
#define DAS_MAX_ID_BUFSZ
The size of an char buffer large enough to hold valid object IDs.
Definition: util.h:311
A generic value type for use in arrays, datums and variables.